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

@@ -12,12 +12,16 @@ class DataButtonsPanel(bpy.types.Panel):
class DATA_PT_camera(DataButtonsPanel):
__idname__ = "DATA_PT_camera"
__label__ = "Lens"
def poll(self, context):
return (context.object.type == 'CAMERA')
def draw(self, context):
layout = self.layout
ob = context.object
cam = context.camera
space = context.space_data
layout = self.layout
split = layout.split(percentage=0.65)
@@ -62,7 +66,7 @@ class DATA_PT_camera(DataButtonsPanel):
class DATA_PT_camera_display(DataButtonsPanel):
__idname__ = "DATA_PT_camera_display"
__label__ = "Display"
def draw(self, context):
cam = context.camera
layout = self.layout
@@ -83,4 +87,4 @@ class DATA_PT_camera_display(DataButtonsPanel):
col.itemR(cam, "draw_size", text="Size")
bpy.types.register(DATA_PT_camera)
bpy.types.register(DATA_PT_camera_display)
bpy.types.register(DATA_PT_camera_display)