[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31726] trunk/blender/release/scripts/ui: patch from venomgfx, show number of textures assigned to lamps and world in the context panel

Campbell Barton ideasman42 at gmail.com
Thu Sep 2 20:13:06 CEST 2010


Revision: 31726
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31726
Author:   campbellbarton
Date:     2010-09-02 20:13:06 +0200 (Thu, 02 Sep 2010)

Log Message:
-----------
patch from venomgfx, show number of textures assigned to lamps and world in the context panel

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_data_lamp.py
    trunk/blender/release/scripts/ui/properties_world.py

Modified: trunk/blender/release/scripts/ui/properties_data_lamp.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_lamp.py	2010-09-02 14:43:22 UTC (rev 31725)
+++ trunk/blender/release/scripts/ui/properties_data_lamp.py	2010-09-02 18:13:06 UTC (rev 31726)
@@ -54,13 +54,15 @@
 
         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"

Modified: trunk/blender/release/scripts/ui/properties_world.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_world.py	2010-09-02 14:43:22 UTC (rev 31725)
+++ trunk/blender/release/scripts/ui/properties_world.py	2010-09-02 18:13:06 UTC (rev 31726)
@@ -50,6 +50,8 @@
         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 @@
         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"





More information about the Bf-blender-cvs mailing list