[Bf-blender-cvs] [549592274ab] blender2.8: UI: tweak object viewport display panel, use grid flow.

William Reynish noreply at git.blender.org
Mon Sep 3 19:38:46 CEST 2018


Commit: 549592274ab1898966a24c1413fe8df3f7f2e35f
Author: William Reynish
Date:   Mon Sep 3 19:33:23 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB549592274ab1898966a24c1413fe8df3f7f2e35f

UI: tweak object viewport display panel, use grid flow.

===================================================================

M	release/scripts/startup/bl_ui/properties_data_armature.py
M	release/scripts/startup/bl_ui/properties_object.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_armature.py b/release/scripts/startup/bl_ui/properties_data_armature.py
index 8ea20ada390..d29b2d88d98 100644
--- a/release/scripts/startup/bl_ui/properties_data_armature.py
+++ b/release/scripts/startup/bl_ui/properties_data_armature.py
@@ -85,7 +85,7 @@ class DATA_PT_display(ArmatureButtonsPanel, Panel):
         col.prop(arm, "show_bone_custom_shapes", text="Shapes")
         col.prop(arm, "show_group_colors", text="Group Colors")
         if ob:
-            col.prop(ob, "show_x_ray", text="X-Ray")
+            col.prop(ob, "show_x_ray", text="In Front")
         col.prop(arm, "use_deform_delay", text="Delay Refresh")
 
 
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 79b2f7b8df8..17b4876c7f3 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -222,6 +222,7 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
     def draw(self, context):
         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
@@ -231,44 +232,51 @@ class OBJECT_PT_display(ObjectButtonsPanel, Panel):
         is_empty_image = (obj_type == 'EMPTY' and obj.empty_draw_type == 'IMAGE')
         is_dupli = (obj.dupli_type != 'NONE')
 
-        col = flow.column(align=True)
+        col = flow.column()
         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
-        col = flow.column(align=True)
         if is_geometry or is_dupli:
+            col = flow.column()
             col.prop(obj, "show_wire", text="Wireframe")
         if obj_type == 'MESH' or is_dupli:
-            col.prop(obj, "show_all_edges")
-
-        col = flow.column()
-        col.prop(obj, "show_bounds", text="Bounds")
-        sub = col.column()
-        sub.active = obj.show_bounds
-        sub.prop(obj, "draw_bounds_type")
+            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.prop(obj, "show_x_ray", text="X-Ray")
+        col = flow.column()
+        col.prop(obj, "show_x_ray", 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. draw type for duplis
             col.active = is_dupli
-        col.prop(
-            obj, "draw_type",
-            text="Maximum Draw Type" if is_wire else "Maximum Draw Type",
-        )
+        col.prop(obj, "draw_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.draw_type == 'BOUNDS')
+        row.prop(obj, "draw_bounds_type", text="")
+
 
         if is_geometry or is_empty_image:
             # Only useful with object having faces/materials...
+            col = flow.column()
             col.prop(obj, "color")



More information about the Bf-blender-cvs mailing list