[Bf-blender-cvs] [745576b16e3] master: UI: Clean up sub-panel for new boolean modifier options

Hans Goudey noreply at git.blender.org
Tue Mar 9 04:22:24 CET 2021


Commit: 745576b16e32343fedd8040f284b9001d8b72c77
Author: Hans Goudey
Date:   Mon Mar 8 22:22:16 2021 -0500
Branches: master
https://developer.blender.org/rB745576b16e32343fedd8040f284b9001d8b72c77

UI: Clean up sub-panel for new boolean modifier options

A few changes to make this consistent with other modifier panels:
 - Title case for UI labels
 - Use property split (and therefore decorators)
 - Declare sublayout variables after getting modifier info

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

M	source/blender/makesrna/intern/rna_modifier.c
M	source/blender/modifiers/intern/MOD_boolean.c

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

diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index 8624384e3ec..98a2b683f18 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -2791,7 +2791,7 @@ static void rna_def_modifier_boolean(BlenderRNA *brna)
 
   prop = RNA_def_property(srna, "use_hole_tolerant", PROP_BOOLEAN, PROP_NONE);
   RNA_def_property_boolean_sdna(prop, NULL, "flag", eBooleanModifierFlag_HoleTolerant);
-  RNA_def_property_ui_text(prop, "Hole tolerant", "Better results when there are holes (slower)");
+  RNA_def_property_ui_text(prop, "Hole Tolerant", "Better results when there are holes (slower)");
   RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
   /* BMesh debugging options, only used when G_DEBUG is set */
@@ -3139,7 +3139,8 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
   RNA_def_property_flag(prop, PROP_PROPORTIONAL);
   RNA_def_property_range(prop, 1, FLT_MAX);
   RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
-  RNA_def_property_ui_text(prop, "Aspect X", "Horizontal aspect ratio (only used for camera projectors)");
+  RNA_def_property_ui_text(
+      prop, "Aspect X", "Horizontal aspect ratio (only used for camera projectors)");
   RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
   prop = RNA_def_property(srna, "aspect_y", PROP_FLOAT, PROP_NONE);
@@ -3147,7 +3148,8 @@ static void rna_def_modifier_uvproject(BlenderRNA *brna)
   RNA_def_property_flag(prop, PROP_PROPORTIONAL);
   RNA_def_property_range(prop, 1, FLT_MAX);
   RNA_def_property_ui_range(prop, 1, 1000, 1, 3);
-  RNA_def_property_ui_text(prop, "Aspect Y", "Vertical aspect ratio (only used for camera projectors)");
+  RNA_def_property_ui_text(
+      prop, "Aspect Y", "Vertical aspect ratio (only used for camera projectors)");
   RNA_def_property_update(prop, 0, "rna_Modifier_update");
 
   prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_NONE);
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 74a0687e64b..6ffbf518dd1 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -864,13 +864,15 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
 static void solver_options_panel_draw(const bContext *UNUSED(C), Panel *panel)
 {
   uiLayout *layout = panel->layout;
-  uiLayout *col = uiLayoutColumn(layout, true);
 
   PointerRNA *ptr = modifier_panel_get_property_pointers(panel, NULL);
 
   const bool use_exact = RNA_enum_get(ptr, "solver") == eBooleanModifierSolver_Exact;
   const bool operand_object = RNA_enum_get(ptr, "operand_type") == eBooleanModifierFlag_Object;
 
+  uiLayoutSetPropSep(layout, true);
+
+  uiLayout *col = uiLayoutColumn(layout, true);
   if (use_exact) {
     /* When operand is collection, we always use_self. */
     if (operand_object) {
@@ -883,7 +885,6 @@ static void solver_options_panel_draw(const bContext *UNUSED(C), Panel *panel)
   }
 
   if (G.debug) {
-    col = uiLayoutColumn(layout, true);
     uiItemR(col, ptr, "debug_options", 0, NULL, ICON_NONE);
   }
 }



More information about the Bf-blender-cvs mailing list