diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-11 16:47:49 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-11 16:47:49 +0300 |
commit | a4382badb91cce4e2d419425a9a06385f0aeb7fd (patch) | |
tree | 7804e408ecc0ed8454e390a38eedc87be7190428 /release/scripts/startup/bl_ui/properties_paint_common.py | |
parent | 6599d2f03b2af9be752cf73a8fd59a6e7a535686 (diff) |
Curves: Adjust sculpt mode UI layouts
This patch adjusts the UI layouts for the tool header and the tool
properties in sculpt mode in a few ways. The goals are to better group
related settings, keep fundamental settings easily accessible, fix the
availability of some options, and make better use of space.
1. Remove ID template in tool header
2. Rename "Add Amount" to "Count" for add brush
3. Add "use pressure" toggles to radius and strength sliders
4. Move strength falloff to a popover
5. Move many "Add" brush settings to popover called "Curve Shape"
6. Move two "Grow/Shrink" options to a popover called "Scaling"
7. Don't display "Falloff" panel in properties when it has no effect
See the differential revision for screenshots and more reasoning.
Differential Revision: https://developer.blender.org/D14922
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_paint_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_paint_common.py | 32 |
1 files changed, 26 insertions, 6 deletions
diff --git a/release/scripts/startup/bl_ui/properties_paint_common.py b/release/scripts/startup/bl_ui/properties_paint_common.py index e3decd7fcdd..b8136f26e90 100644 --- a/release/scripts/startup/bl_ui/properties_paint_common.py +++ b/release/scripts/startup/bl_ui/properties_paint_common.py @@ -405,7 +405,13 @@ class FalloffPanel(BrushPanel): if not super().poll(context): return False settings = cls.paint_settings(context) - return (settings and settings.brush and settings.brush.curve) + if not (settings and settings.brush and settings.brush.curve): + return False + if cls.get_brush_mode(context) == 'SCULPT_CURVES': + brush = settings.brush + if brush.curves_sculpt_tool in {'ADD', 'DELETE'}: + return False + return True def draw(self, context): layout = self.layout @@ -432,7 +438,13 @@ class FalloffPanel(BrushPanel): row.operator("brush.curve_preset", icon='LINCURVE', text="").shape = 'LINE' row.operator("brush.curve_preset", icon='NOCURVE', text="").shape = 'MAX' - if mode in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT', 'SCULPT_CURVES'} and brush.sculpt_tool != 'POSE': + show_fallof_shape = False + if mode in {'SCULPT', 'PAINT_VERTEX', 'PAINT_WEIGHT'} and brush.sculpt_tool != 'POSE': + show_fallof_shape = True + if not show_fallof_shape and mode == 'SCULPT_CURVES' and context.space_data.type == 'PROPERTIES': + show_fallof_shape = True + + if show_fallof_shape: col.separator() row = col.row(align=True) row.use_property_split = True @@ -772,11 +784,19 @@ def brush_settings(layout, context, brush, popover=False): elif mode == 'SCULPT_CURVES': if brush.curves_sculpt_tool == 'ADD': layout.prop(brush.curves_sculpt_settings, "add_amount") - layout.prop(brush.curves_sculpt_settings, "points_per_curve") layout.prop(brush.curves_sculpt_settings, "curve_length") - layout.prop(brush.curves_sculpt_settings, "interpolate_length") - layout.prop(brush.curves_sculpt_settings, "interpolate_shape") - layout.prop(brush.curves_sculpt_settings, "interpolate_point_count") + col = layout.column(heading="Interpolate", align=True) + col.prop(brush.curves_sculpt_settings, "interpolate_length", text="Length") + col.prop(brush.curves_sculpt_settings, "interpolate_shape", text="Shape") + col.prop(brush.curves_sculpt_settings, "interpolate_point_count", text="Point Count") + + col = layout.column() + col.active = not brush.curves_sculpt_settings.interpolate_length + col.prop(brush.curves_sculpt_settings, "curve_length") + + col = layout.column() + col.active = not brush.curves_sculpt_settings.interpolate_point_count + col.prop(brush.curves_sculpt_settings, "points_per_curve") use_frontface = True elif brush.curves_sculpt_tool == 'GROW_SHRINK': layout.prop(brush.curves_sculpt_settings, "scale_uniform") |