patch from venomgfx, show number of textures assigned to lamps and world in the conte...
authorCampbell Barton <ideasman42@gmail.com>
Thu, 2 Sep 2010 18:13:06 +0000 (18:13 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 2 Sep 2010 18:13:06 +0000 (18:13 +0000)
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_world.py

index e43b3379aca3ad78e8e29a7c6a4fddb4fedb9387..a5ac3bd62ae89f1b524087c1feeb61d1786e7304 100644 (file)
@@ -54,13 +54,15 @@ class DATA_PT_context_lamp(DataButtonsPanel, bpy.types.Panel):
 
         split = layout.split(percentage=0.65)
 
+        texture_count = len(lamp.texture_slots.keys())
+
         if ob:
             split.template_ID(ob, "data")
-            split.separator()
         elif lamp:
             split.template_ID(space, "pin_id")
-            split.separator()
 
+        if texture_count != 0:
+            split.label(text=str(texture_count), icon='TEXTURE')
 
 class DATA_PT_preview(DataButtonsPanel, bpy.types.Panel):
     bl_label = "Preview"
index 9f93137252e63d3d58a75f8df72b1267ed872696..a165fa82921331e8b31c6e6a91e0cb24a56cfdd1 100644 (file)
@@ -50,6 +50,8 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
         scene = context.scene
         world = context.world
         space = context.space_data
+        
+        texture_count = len(world.texture_slots.keys())
 
         split = layout.split(percentage=0.65)
         if scene:
@@ -57,6 +59,8 @@ class WORLD_PT_context_world(WorldButtonsPanel, bpy.types.Panel):
         elif world:
             split.template_ID(space, "pin_id")
 
+        if texture_count != 0:
+            split.label(text=str(texture_count), icon='TEXTURE')
 
 class WORLD_PT_preview(WorldButtonsPanel, bpy.types.Panel):
     bl_label = "Preview"