Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Reynish <billreynish>2018-09-03 20:33:23 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-03 20:35:25 +0300
commit549592274ab1898966a24c1413fe8df3f7f2e35f (patch)
treeec573846501e8bf2176769f52f6735f40bd37c07
parent544c8453d524579e008948645957df0422a7c4d0 (diff)
UI: tweak object viewport display panel, use grid flow.
-rw-r--r--release/scripts/startup/bl_ui/properties_data_armature.py2
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py36
2 files changed, 23 insertions, 15 deletions
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")