diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-09-02 22:13:06 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-09-02 22:13:06 +0400 |
commit | d8d3cc69ef80cef398381ad9af6931a07f8e3a47 (patch) | |
tree | e04f2aa4dd9aed21e39980ebf0e4371980052517 /release | |
parent | 0d12c77097b19bfa688c99480f755184ad46342b (diff) |
patch from venomgfx, show number of textures assigned to lamps and world in the context panel
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/ui/properties_data_lamp.py | 6 | ||||
-rw-r--r-- | release/scripts/ui/properties_world.py | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/release/scripts/ui/properties_data_lamp.py b/release/scripts/ui/properties_data_lamp.py index e43b3379aca..a5ac3bd62ae 100644 --- a/release/scripts/ui/properties_data_lamp.py +++ b/release/scripts/ui/properties_data_lamp.py @@ -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" diff --git a/release/scripts/ui/properties_world.py b/release/scripts/ui/properties_world.py index 9f93137252e..a165fa82921 100644 --- a/release/scripts/ui/properties_world.py +++ b/release/scripts/ui/properties_world.py @@ -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" |