[Bf-blender-cvs] [ca4ac742f4b] blender-v2.92-release: UI: clarify edit-mesh face center behavior
Campbell Barton
noreply at git.blender.org
Fri Jan 29 06:44:17 CET 2021
Commit: ca4ac742f4b15254b59b4f77392af6d2a3d6ecec
Author: Campbell Barton
Date: Fri Jan 29 16:41:15 2021 +1100
Branches: blender-v2.92-release
https://developer.blender.org/rBca4ac742f4b15254b59b4f77392af6d2a3d6ecec
UI: clarify edit-mesh face center behavior
- Grey out in wire/xray display.
- Expand the description for when this is used.
While this is working, the intended behavior wasn't clear,
address T85177.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
M source/blender/makesrna/intern/rna_space.c
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index f2fd04499f5..3ed50a8c0a3 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6227,17 +6227,20 @@ class VIEW3D_PT_overlay_edit_mesh(Panel):
overlay = view.overlay
display_all = overlay.show_overlays
+ is_any_solid_shading = not (shading.show_xray or (shading.type == 'WIREFRAME'))
+
col = layout.column()
col.active = display_all
split = col.split()
sub = split.column()
- sub.active = not ((shading.type == 'WIREFRAME') or shading.show_xray)
+ sub.active = is_any_solid_shading
sub.prop(overlay, "show_edges", text="Edges")
sub = split.column()
sub.prop(overlay, "show_faces", text="Faces")
sub = split.column()
+ sub.active = is_any_solid_shading
sub.prop(overlay, "show_face_center", text="Center")
row = col.row(align=True)
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c
index 2ee84f70752..8f3b254e6e1 100644
--- a/source/blender/makesrna/intern/rna_space.c
+++ b/source/blender/makesrna/intern/rna_space.c
@@ -4020,7 +4020,10 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
prop = RNA_def_property(srna, "show_face_center", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "overlay.edit_flag", V3D_OVERLAY_EDIT_FACE_DOT);
- RNA_def_property_ui_text(prop, "Draw Face Center", "Display face center");
+ RNA_def_property_ui_text(
+ prop,
+ "Draw Face Center",
+ "Display face center when face selection is enabled in solid shading modes");
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
prop = RNA_def_property(srna, "show_edge_crease", PROP_BOOLEAN, PROP_NONE);
More information about the Bf-blender-cvs
mailing list