From 976cd8c211cc0081258af0ee0ff5c596c905f810 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 28 Feb 2024 12:13:15 +1100 Subject: [PATCH] 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. --- scripts/startup/bl_ui/properties_paint_common.py | 16 ++++++++-------- scripts/startup/bl_ui/space_view3d.py | 16 ++++++++-------- source/blender/makesrna/intern/rna_brush.cc | 10 +++++----- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/scripts/startup/bl_ui/properties_paint_common.py b/scripts/startup/bl_ui/properties_paint_common.py index 3707557e256..28372796a74 100644 --- a/scripts/startup/bl_ui/properties_paint_common.py +++ b/scripts/startup/bl_ui/properties_paint_common.py @@ -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") diff --git a/scripts/startup/bl_ui/space_view3d.py b/scripts/startup/bl_ui/space_view3d.py index 4eee74c358d..248f0926603 100644 --- a/scripts/startup/bl_ui/space_view3d.py +++ b/scripts/startup/bl_ui/space_view3d.py @@ -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") diff --git a/source/blender/makesrna/intern/rna_brush.cc b/source/blender/makesrna/intern/rna_brush.cc index 68842587189..96ae8064129 100644 --- a/source/blender/makesrna/intern/rna_brush.cc +++ b/source/blender/makesrna/intern/rna_brush.cc @@ -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");