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:
2009-06-13 21:22:21 +00:00
parent 646d4041e2
commit c3c38155ad
17 changed files with 268 additions and 130 deletions

View File

@@ -6,16 +6,13 @@ class ObjectButtonsPanel(bpy.types.Panel):
__region_type__ = "WINDOW"
__context__ = "object"
def poll(self, context):
return (context.object != None)
class OBJECT_PT_transform(ObjectButtonsPanel):
__idname__ = "OBJECT_PT_transform"
__label__ = "Transform"
def draw(self, context):
ob = context.object
layout = self.layout
ob = context.object
row = layout.row()
row.column().itemR(ob, "location")
@@ -27,8 +24,8 @@ class OBJECT_PT_groups(ObjectButtonsPanel):
__label__ = "Groups"
def draw(self, context):
ob = context.object
layout = self.layout
ob = context.object
row = layout.row()
row.itemR(ob, "pass_index")
@@ -54,8 +51,8 @@ class OBJECT_PT_display(ObjectButtonsPanel):
__label__ = "Display"
def draw(self, context):
ob = context.object
layout = self.layout
ob = context.object
row = layout.row()
row.itemR(ob, "max_draw_type", text="Type")
@@ -74,8 +71,8 @@ class OBJECT_PT_duplication(ObjectButtonsPanel):
__label__ = "Duplication"
def draw(self, context):
ob = context.object
layout = self.layout
ob = context.object
layout.itemR(ob, "dupli_type", expand=True)
@@ -108,8 +105,8 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
__label__ = "Animation"
def draw(self, context):
ob = context.object
layout = self.layout
ob = context.object
split = layout.split()
@@ -131,5 +128,4 @@ bpy.types.register(OBJECT_PT_transform)
bpy.types.register(OBJECT_PT_groups)
bpy.types.register(OBJECT_PT_display)
bpy.types.register(OBJECT_PT_duplication)
bpy.types.register(OBJECT_PT_animation)
bpy.types.register(OBJECT_PT_animation)