forked from bartvdbraak/blender
patch from venomgfx, show number of textures assigned to lamps and world in the context panel
This commit is contained in:
parent
0d12c77097
commit
d8d3cc69ef
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user