From d8d3cc69ef80cef398381ad9af6931a07f8e3a47 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 Sep 2010 18:13:06 +0000 Subject: [PATCH] patch from venomgfx, show number of textures assigned to lamps and world in the context panel --- release/scripts/ui/properties_data_lamp.py | 6 ++++-- 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"