Cleanup: follow RNA naming conventions for boolean types

- Use `use_*_interpolate` matching sequencers use_frame_interpolate.
- Use `use_uniform_scale` matching sequencers use_uniform_scale.
This commit is contained in:
Campbell Barton
2024-02-28 12:13:15 +11:00
parent 59abe4a757
commit 976cd8c211
3 changed files with 21 additions and 21 deletions

View File

@@ -800,25 +800,25 @@ def brush_settings(layout, context, brush, popover=False):
if brush.curves_sculpt_tool == 'ADD':
layout.prop(brush.curves_sculpt_settings, "add_amount")
col = layout.column(heading="Interpolate", align=True)
col.prop(brush.curves_sculpt_settings, "interpolate_length", text="Length")
col.prop(brush.curves_sculpt_settings, "interpolate_radius", text="Radius")
col.prop(brush.curves_sculpt_settings, "interpolate_shape", text="Shape")
col.prop(brush.curves_sculpt_settings, "interpolate_point_count", text="Point Count")
col.prop(brush.curves_sculpt_settings, "use_length_interpolate", text="Length")
col.prop(brush.curves_sculpt_settings, "use_radius_interpolate", text="Radius")
col.prop(brush.curves_sculpt_settings, "use_shape_interpolate", text="Shape")
col.prop(brush.curves_sculpt_settings, "use_point_count_interpolate", text="Point Count")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_length
col.active = not brush.curves_sculpt_settings.use_length_interpolate
col.prop(brush.curves_sculpt_settings, "curve_length", text="Length")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_radius
col.active = not brush.curves_sculpt_settings.use_radius_interpolate
col.prop(brush.curves_sculpt_settings, "curve_radius", text="Radius")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_point_count
col.active = not brush.curves_sculpt_settings.use_point_count_interpolate
col.prop(brush.curves_sculpt_settings, "points_per_curve", text="Points")
elif brush.curves_sculpt_tool == 'GROW_SHRINK':
layout.prop(brush.curves_sculpt_settings, "scale_uniform")
layout.prop(brush.curves_sculpt_settings, "use_uniform_scale")
layout.prop(brush.curves_sculpt_settings, "minimum_length")

View File

@@ -8757,21 +8757,21 @@ class VIEW3D_PT_curves_sculpt_add_shape(Panel):
brush = settings.brush
col = layout.column(heading="Interpolate", align=True)
col.prop(brush.curves_sculpt_settings, "interpolate_length", text="Length")
col.prop(brush.curves_sculpt_settings, "interpolate_radius", text="Radius")
col.prop(brush.curves_sculpt_settings, "interpolate_shape", text="Shape")
col.prop(brush.curves_sculpt_settings, "interpolate_point_count", text="Point Count")
col.prop(brush.curves_sculpt_settings, "use_length_interpolate", text="Length")
col.prop(brush.curves_sculpt_settings, "use_radius_interpolate", text="Radius")
col.prop(brush.curves_sculpt_settings, "use_shape_interpolate", text="Shape")
col.prop(brush.curves_sculpt_settings, "use_point_count_interpolate", text="Point Count")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_length
col.active = not brush.curves_sculpt_settings.use_length_interpolate
col.prop(brush.curves_sculpt_settings, "curve_length", text="Length")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_radius
col.active = not brush.curves_sculpt_settings.use_radius_interpolate
col.prop(brush.curves_sculpt_settings, "curve_radius", text="Radius")
col = layout.column()
col.active = not brush.curves_sculpt_settings.interpolate_point_count
col.active = not brush.curves_sculpt_settings.use_point_count_interpolate
col.prop(brush.curves_sculpt_settings, "points_per_curve", text="Points")
@@ -8813,7 +8813,7 @@ class VIEW3D_PT_curves_sculpt_grow_shrink_scaling(Panel):
settings = UnifiedPaintPanel.paint_settings(context)
brush = settings.brush
layout.prop(brush.curves_sculpt_settings, "scale_uniform")
layout.prop(brush.curves_sculpt_settings, "use_uniform_scale")
layout.prop(brush.curves_sculpt_settings, "minimum_length")

View File

@@ -2155,7 +2155,7 @@ static void rna_def_curves_sculpt_options(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Points per Curve", "Number of control points in a newly added curve");
prop = RNA_def_property(srna, "scale_uniform", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_SCALE_UNIFORM);
RNA_def_property_ui_text(prop,
"Scale Uniform",
@@ -2167,27 +2167,27 @@ static void rna_def_curves_sculpt_options(BlenderRNA *brna)
RNA_def_property_ui_text(
prop, "Minimum Length", "Avoid shrinking curves shorter than this length");
prop = RNA_def_property(srna, "interpolate_length", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_length_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(
prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_LENGTH);
RNA_def_property_ui_text(
prop, "Interpolate Length", "Use length of the curves in close proximity");
prop = RNA_def_property(srna, "interpolate_radius", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_radius_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(
prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_RADIUS);
RNA_def_property_boolean_default(prop, true);
RNA_def_property_ui_text(
prop, "Interpolate Radius", "Use radius of the curves in close proximity");
prop = RNA_def_property(srna, "interpolate_point_count", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_point_count_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(
prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_POINT_COUNT);
RNA_def_property_ui_text(prop,
"Interpolate Point Count",
"Use the number of points from the curves in close proximity");
prop = RNA_def_property(srna, "interpolate_shape", PROP_BOOLEAN, PROP_NONE);
prop = RNA_def_property(srna, "use_shape_interpolate", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, nullptr, "flag", BRUSH_CURVES_SCULPT_FLAG_INTERPOLATE_SHAPE);
RNA_def_property_ui_text(
prop, "Interpolate Shape", "Use shape of the curves in close proximity");