diff options
author | William Reynish <billrey@me.com> | 2019-02-28 23:53:14 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-02-28 23:53:14 +0300 |
commit | 962af13b18d9a6747dad4513896fe118bd780996 (patch) | |
tree | fb43f79f6ff21e92ee040155837d80d051366721 /release/scripts/startup/bl_ui/properties_object.py | |
parent | 993f43dc9ed30a674628299f661df0c6e6e63e36 (diff) |
UI: Properties hierarchical nesting
Make hierarchy more clear and consistent in Render, Object and Particles
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_object.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_object.py | 62 |
1 files changed, 47 insertions, 15 deletions
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index e87127c1274..24df32c1e94 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -257,19 +257,33 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): col.active = is_dupli col.prop(obj, "display_type", text="Display As") - split = flow.split(factor=0.6) - split.prop(obj, "show_bounds", text="Bounds") - row = split.row() - row.active = obj.show_bounds or (obj.display_type == 'BOUNDS') - row.prop(obj, "display_bounds_type", text="") - if is_geometry or is_empty_image or is_gpencil: # Only useful with object having faces/materials... col = flow.column() col.prop(obj, "color") -class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): +class OBJECT_PT_display_bounds(ObjectButtonsPanel, Panel): + bl_label = "Boundary" + bl_parent_id = "OBJECT_PT_display" + bl_options = {'DEFAULT_CLOSED'} + + def draw_header(self, context): + + obj = context.object + + self.layout.prop(obj, "show_bounds", text="") + + def draw(self, context): + layout = self.layout + obj = context.object + layout.use_property_split = True + + layout.active = obj.show_bounds or (obj.display_type == 'BOUNDS') + layout.prop(obj, "display_bounds_type", text="Shape") + + +class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): bl_label = "Instancing" bl_options = {'DEFAULT_CLOSED'} @@ -287,13 +301,6 @@ class OBJECT_PT_duplication(ObjectButtonsPanel, Panel): if ob.instance_type == 'VERTS': layout.prop(ob, "use_instance_vertices_rotation", text="Rotation") - elif ob.instance_type == 'FACES': - col = flow.column() - col.prop(ob, "use_instance_faces_scale", text="Scale") - sub = col.column() - sub.active = ob.use_instance_faces_scale - sub.prop(ob, "instance_faces_scale", text="Inherit Scale") - elif ob.instance_type == 'COLLECTION': col = flow.column() col.prop(ob, "instance_collection", text="Collection") @@ -310,6 +317,29 @@ from .properties_animviz import ( ) +class OBJECT_PT_instancing_size(ObjectButtonsPanel, Panel): + bl_label = "Size" + bl_parent_id = "OBJECT_PT_instancing" + + @classmethod + def poll(cls, context): + ob = context.object + return ob.instance_type == 'FACES' + + def draw_header(self, context): + + ob = context.object + self.layout.prop(ob, "use_instance_faces_scale", text="") + + def draw(self, context): + layout = self.layout + ob = context.object + layout.use_property_split = True + + layout.active = ob.use_instance_faces_scale + layout.prop(ob, "instance_faces_scale", text="Inherit Scale") + + class OBJECT_PT_motion_paths(MotionPathButtonsPanel, Panel): #bl_label = "Object Motion Paths" bl_context = "object" @@ -362,10 +392,12 @@ classes = ( OBJECT_PT_relations, COLLECTION_MT_specials, OBJECT_PT_collections, - OBJECT_PT_duplication, + OBJECT_PT_instancing, + OBJECT_PT_instancing_size, OBJECT_PT_motion_paths, OBJECT_PT_motion_paths_display, OBJECT_PT_display, + OBJECT_PT_display_bounds, OBJECT_PT_custom_props, ) |