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 <billrey@me.com>2020-04-17 17:54:03 +0300
committerJulian Eisel <julian@blender.org>2020-04-17 18:00:57 +0300
commit7fc60bff14a6241c4a51cbc57b93774a90a0ea13 (patch)
tree3ca219e885c249a98c6f6a6188f4db43ff63237d /release/scripts/startup/bl_ui/properties_data_mesh.py
parent219049bb3b763b58e71fdf0091309136e6b513a8 (diff)
UI: Layout changes for new checkbox layout possibilities
Follow-up to previous commit. Some examples: {F8473507} {F8473508} {F8473509} {F8473510} For more screenshots, please see D7430. We use column or row headings here to bring more structure, and to give the eye visual anchors which aid eye-scanning. The left-aligned checkboxes likewise help with this. And we keep the adherence to the center line, so the alignment matches up between the various buttons and controls. * Changes the property split percentage from 50/50% to 40/60%. This is needed to give enough space for the checkboxes. But in most cases this looks better anyway - see Transform panel. In some cases it simply fills out the available space more efficently. * Fix various hacks where we previously used manually defined splits. When we did this, the alignment was never quite right, and the layout code was a mess. * Adds column headings to many places where a list of checkboxes all share a common purpose or leading text. * Add checkbox + value configurations various places where a checkbox only serves to enable the value slider * Removes most uses of grid flow layout. The grid flow layouts combine poorly with column headings, and also they would mess alignment up badly. The grid flow layouts also often made buttons and controls jump around on the screen if you would just resize editors slightly, causing visual confusion, making users lose their place. The logic for at what time the list of items would re-flow was often flawed, jumping to multiple columns too fast or too late - and frankly, the grid flow layouts would often just look bad. Maniphest Task: https://developer.blender.org/T65965 Differential Revision: https://developer.blender.org/D7430 Reviewed by: Brecht Van Lommel, Pablo Vazquez. Most work here by William Reynish, few changes by Julian Eisel.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_mesh.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_mesh.py42
1 files changed, 18 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_mesh.py b/release/scripts/startup/bl_ui/properties_data_mesh.py
index d91b2ceb7f7..425c94dfdcd 100644
--- a/release/scripts/startup/bl_ui/properties_data_mesh.py
+++ b/release/scripts/startup/bl_ui/properties_data_mesh.py
@@ -190,27 +190,20 @@ class DATA_PT_normals(MeshButtonsPanel, Panel):
COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
def draw(self, context):
- pass
-
-
-class DATA_PT_normals_auto_smooth(MeshButtonsPanel, Panel):
- bl_label = "Auto Smooth"
- bl_parent_id = "DATA_PT_normals"
- COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_EEVEE', 'BLENDER_WORKBENCH'}
-
- def draw_header(self, context):
- mesh = context.mesh
-
- self.layout.prop(mesh, "use_auto_smooth", text="")
-
- def draw(self, context):
layout = self.layout
layout.use_property_split = True
mesh = context.mesh
- layout.active = mesh.use_auto_smooth and not mesh.has_custom_normals
- layout.prop(mesh, "auto_smooth_angle", text="Angle")
+ col = layout.column(align=False, heading="Auto Smooth")
+ col.use_property_decorate = False
+ row = col.row(align=True)
+ sub = row.row(align=True)
+ sub.prop(mesh, "use_auto_smooth", text="")
+ sub = sub.row(align=True)
+ sub.active = mesh.use_auto_smooth and not mesh.has_custom_normals
+ sub.prop(mesh, "auto_smooth_angle", text="")
+ row.prop_decorator(mesh, "auto_smooth_angle")
class DATA_PT_texture_space(MeshButtonsPanel, Panel):
@@ -485,9 +478,11 @@ class DATA_PT_remesh(MeshButtonsPanel, Panel):
col.prop(mesh, "remesh_voxel_adaptivity")
col.prop(mesh, "use_remesh_fix_poles")
col.prop(mesh, "use_remesh_smooth_normals")
- col.prop(mesh, "use_remesh_preserve_volume")
- col.prop(mesh, "use_remesh_preserve_paint_mask")
- col.prop(mesh, "use_remesh_preserve_sculpt_face_sets")
+
+ col = layout.column(heading="Preserve")
+ col.prop(mesh, "use_remesh_preserve_volume", text="Volume")
+ col.prop(mesh, "use_remesh_preserve_paint_mask", text="Paint Mask")
+ col.prop(mesh, "use_remesh_preserve_sculpt_face_sets", text="Face Sets")
col.operator("object.voxel_remesh", text="Voxel Remesh")
else:
col.operator("object.quadriflow_remesh", text="QuadriFlow Remesh")
@@ -515,12 +510,12 @@ class DATA_PT_customdata(MeshButtonsPanel, Panel):
else:
col.operator("mesh.customdata_custom_splitnormals_add", icon='ADD')
- col = layout.column()
+ col = layout.column(heading="Store")
col.enabled = obj is not None and obj.mode != 'EDIT'
- col.prop(me, "use_customdata_vertex_bevel")
- col.prop(me, "use_customdata_edge_bevel")
- col.prop(me, "use_customdata_edge_crease")
+ col.prop(me, "use_customdata_vertex_bevel", text="Vertex Bevel Weight")
+ col.prop(me, "use_customdata_edge_bevel", text="Edge Bevel Weight")
+ col.prop(me, "use_customdata_edge_crease", text="Edge Crease")
class DATA_PT_custom_props_mesh(MeshButtonsPanel, PropertyPanel, Panel):
@@ -544,7 +539,6 @@ classes = (
DATA_PT_vertex_colors,
DATA_PT_face_maps,
DATA_PT_normals,
- DATA_PT_normals_auto_smooth,
DATA_PT_texture_space,
DATA_PT_remesh,
DATA_PT_customdata,