custom properties panels for most ID types. use subclassing to keep panel UI definitions minimal
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
# <pep8 compliant>
|
||||
import bpy
|
||||
from rna_prop_ui import PropertyPanel
|
||||
|
||||
narrowui = 180
|
||||
|
||||
@@ -42,6 +43,10 @@ class OBJECT_PT_context_object(ObjectButtonsPanel):
|
||||
row.prop(ob, "name", text="")
|
||||
|
||||
|
||||
class OBJECT_PT_custom_props(ObjectButtonsPanel, PropertyPanel):
|
||||
_context_path = "object"
|
||||
|
||||
|
||||
class OBJECT_PT_transform(ObjectButtonsPanel):
|
||||
bl_label = "Transform"
|
||||
|
||||
@@ -300,16 +305,6 @@ class OBJECT_PT_animation(ObjectButtonsPanel):
|
||||
row.active = (ob.parent is not None)
|
||||
|
||||
|
||||
class OBJECT_PT_properties(ObjectButtonsPanel):
|
||||
bl_label = "Properties"
|
||||
bl_default_closed = True
|
||||
|
||||
def draw(self, context):
|
||||
import rna_prop_ui
|
||||
# reload(rna_prop_ui)
|
||||
|
||||
rna_prop_ui.draw(self.layout, context, "object")
|
||||
|
||||
bpy.types.register(OBJECT_PT_context_object)
|
||||
bpy.types.register(OBJECT_PT_transform)
|
||||
bpy.types.register(OBJECT_PT_transform_locks)
|
||||
@@ -318,4 +313,5 @@ 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_properties)
|
||||
|
||||
bpy.types.register(OBJECT_PT_custom_props)
|
||||
|
Reference in New Issue
Block a user