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:
authorHans Goudey <h.goudey@me.com>2021-03-09 06:22:16 +0300
committerHans Goudey <h.goudey@me.com>2021-03-09 06:22:16 +0300
commit745576b16e32343fedd8040f284b9001d8b72c77 (patch)
tree46445fa7dea45408a196678176c9c01c4dc8705e
parentd25ab68cf4b28c01281dd689a3926887fa7d32a4 (diff)
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
-rw-r--r--source/blender/makesrna/intern/rna_modifier.c8
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c5
2 files changed, 8 insertions, 5 deletions
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);
}
}