2.5 Buttons:
* Added more material buttons by William. Thanks. I made some minor adjustments and added Specular Shader Model RNA. * Code cleanup and some consistency tweaks of button files. Notes: Preview render now only shows up when there is an active world, material, texture or lamp. * Made sure initial panels with ID Datablocks are shown, even when no block is active.
This commit is contained in:
@@ -7,18 +7,17 @@ class DataButtonsPanel(bpy.types.Panel):
|
||||
__context__ = "data"
|
||||
|
||||
def poll(self, context):
|
||||
ob = context.object
|
||||
return (ob and ob.type == 'EMPTY')
|
||||
return (context.object.type == 'EMPTY')
|
||||
|
||||
class DATA_PT_empty(DataButtonsPanel):
|
||||
__idname__ = "DATA_PT_empty"
|
||||
__label__ = "Empty"
|
||||
|
||||
def draw(self, context):
|
||||
ob = context.object
|
||||
layout = self.layout
|
||||
ob = context.object
|
||||
|
||||
layout.itemR(ob, "empty_draw_type")
|
||||
layout.itemR(ob, "empty_draw_size")
|
||||
|
||||
bpy.types.register(DATA_PT_empty)
|
||||
bpy.types.register(DATA_PT_empty)
|
||||
Reference in New Issue
Block a user