custom properties panels for most ID types. use subclassing to keep panel UI definitions minimal

This commit is contained in:
2010-01-08 08:54:41 +00:00
parent ceab17ee17
commit b8ca67ca33
15 changed files with 132 additions and 40 deletions

View File

@@ -18,6 +18,7 @@
# <pep8 compliant>
import bpy
from rna_prop_ui import PropertyPanel
narrowui = 180
@@ -58,6 +59,10 @@ class DATA_PT_context_camera(DataButtonsPanel):
layout.template_ID(space, "pin_id")
class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel):
_context_path = "object.data"
class DATA_PT_camera(DataButtonsPanel):
bl_label = "Lens"
@@ -140,6 +145,9 @@ class DATA_PT_camera_display(DataButtonsPanel):
sub.active = cam.show_passepartout
sub.prop(cam, "passepartout_alpha", text="Alpha", slider=True)
bpy.types.register(DATA_PT_context_camera)
bpy.types.register(DATA_PT_camera)
bpy.types.register(DATA_PT_camera_display)
bpy.types.register(DATA_PT_custom_props_camera)