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

This commit is contained in:
Campbell Barton 2010-09-02 18:13:06 +00:00
parent 0d12c77097
commit d8d3cc69ef
2 changed files with 8 additions and 2 deletions

@ -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"

@ -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"