diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_object.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_object.py | 67 |
1 files changed, 19 insertions, 48 deletions
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py index a805b965af2..8ce53ed30eb 100644 --- a/release/scripts/startup/bl_ui/properties_object.py +++ b/release/scripts/startup/bl_ui/properties_object.py @@ -212,7 +212,6 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): layout = self.layout layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) obj = context.object obj_type = obj.type @@ -222,35 +221,22 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): is_dupli = (obj.instance_type != 'NONE') is_gpencil = (obj_type == 'GPENCIL') - col = flow.column() + col = layout.column(heading="Show") col.prop(obj, "show_name", text="Name") - - col = flow.column() col.prop(obj, "show_axis", text="Axis") # Makes no sense for cameras, armatures, etc.! # but these settings do apply to dupli instances if is_geometry or is_dupli: - col = flow.column() col.prop(obj, "show_wire", text="Wireframe") if obj_type == 'MESH' or is_dupli: - col = flow.column() col.prop(obj, "show_all_edges", text="All Edges") - - col = flow.column() if is_geometry: col.prop(obj, "show_texture_space", text="Texture Space") - col = flow.column() col.prop(obj.display, "show_shadows", text="Shadow") - - col = flow.column() col.prop(obj, "show_in_front", text="In Front") # if obj_type == 'MESH' or is_empty_image: # col.prop(obj, "show_transparent", text="Transparency") - - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) - - col = flow.column() if is_wire: # wire objects only use the max. display type for duplis col.active = is_dupli @@ -258,28 +244,17 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel): if is_geometry or is_dupli or is_empty_image or is_gpencil: # Only useful with object having faces/materials... - col = flow.column() col.prop(obj, "color") - -class OBJECT_PT_display_bounds(ObjectButtonsPanel, Panel): - bl_label = "Bounds" - 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") + col = layout.column(align=False, heading="Bounds") + col.use_property_decorate = False + row = col.row(align=True) + sub = row.row(align=True) + sub.prop(obj, "show_bounds", text="") + sub = sub.row(align=True) + sub.active = obj.show_bounds or (obj.display_type == 'BOUNDS') + sub.prop(obj, "display_bounds_type", text="") + row.prop_decorator(obj, "display_bounds_type") class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): @@ -295,7 +270,6 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): row.prop(ob, "instance_type", expand=True) layout.use_property_split = True - flow = layout.grid_flow(row_major=True, columns=0, even_columns=True, even_rows=False, align=False) if ob.instance_type == 'VERTS': layout.prop(ob, "use_instance_vertices_rotation", text="Align to Vertex Normal") @@ -305,9 +279,9 @@ class OBJECT_PT_instancing(ObjectButtonsPanel, Panel): col.prop(ob, "instance_collection", text="Collection") if ob.instance_type != 'NONE' or ob.particle_systems: - col = flow.column(align=True) - col.prop(ob, "show_instancer_for_viewport") - col.prop(ob, "show_instancer_for_render") + col = layout.column(heading="Show Instancer", align=True) + col.prop(ob, "show_instancer_for_viewport", text="Viewport") + col.prop(ob, "show_instancer_for_render", text="Render") class OBJECT_PT_instancing_size(ObjectButtonsPanel, Panel): @@ -385,19 +359,17 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel): layout = self.layout layout.use_property_split = True - flow = layout.grid_flow(row_major=False, columns=0, even_columns=True, even_rows=False, align=False) layout = self.layout ob = context.object - col = flow.column() - col.prop(ob, "hide_viewport", text="Show in Viewports", toggle=False, invert_checkbox=True) - col = flow.column() - col.prop(ob, "hide_render", text="Show in Renders", toggle=False, invert_checkbox=True) - col = flow.column() - col.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) + layout.prop(ob, "hide_select", text="Selectable", toggle=False, invert_checkbox=True) + + col = layout.column(heading="Show in") + col.prop(ob, "hide_viewport", text="Viewports", toggle=False, invert_checkbox=True) + col.prop(ob, "hide_render", text="Renders", toggle=False, invert_checkbox=True) if context.object.type == 'GPENCIL': - col = flow.column() + col = layout.column(heading="Grease Pencil") col.prop(ob, "use_grease_pencil_lights", toggle=False) @@ -419,7 +391,6 @@ classes = ( OBJECT_PT_motion_paths, OBJECT_PT_motion_paths_display, OBJECT_PT_display, - OBJECT_PT_display_bounds, OBJECT_PT_visibility, OBJECT_PT_custom_props, ) |