UI: Show preset controls for brush strength, size, and jitter curves

Toggles the new `show_presets` option on for the recently added brush
size, strength, and jitter curves across paint modes to allow users
to set these custom curves to any of the defined internal presets.

Pull Request: https://projects.blender.org/blender/blender/pulls/147000
This commit is contained in:
Sean Kim
2025-09-30 00:34:20 +02:00
committed by Sean Kim
parent 41a1e871ef
commit a40d484b1a
2 changed files with 6 additions and 6 deletions

View File

@@ -572,7 +572,7 @@ class StrokePanel(BrushPanel):
if settings.show_jitter_curve and self.is_popover is False:
subcol = col.column()
subcol.active = brush.use_pressure_jitter
subcol.template_curve_mapping(brush, "curve_jitter", brush=True)
subcol.template_curve_mapping(brush, "curve_jitter", brush=True, show_presets=True)
col.row().prop(brush, "jitter_unit", expand=True)
col.separator()
@@ -1186,7 +1186,7 @@ def brush_shared_settings(layout, context, brush, popover=False):
if paint.show_size_curve and not popover:
subcol = layout.column()
subcol.active = brush.use_pressure_size
subcol.template_curve_mapping(brush, "curve_size", brush=True)
subcol.template_curve_mapping(brush, "curve_size", brush=True, show_presets=True)
if size_mode:
layout.row().prop(size_owner, "use_locked_size", expand=True)
layout.separator()
@@ -1208,7 +1208,7 @@ def brush_shared_settings(layout, context, brush, popover=False):
if paint.show_strength_curve and not popover:
subcol = layout.column()
subcol.active = brush.use_pressure_strength
subcol.template_curve_mapping(brush, "curve_strength", brush=True)
subcol.template_curve_mapping(brush, "curve_strength", brush=True, show_presets=True)
layout.separator()
if direction:
@@ -1707,7 +1707,7 @@ def brush_basic_grease_pencil_paint_settings(layout, context, brush, props, *, c
if paint.show_size_curve:
col = layout.column()
col.active = brush.use_pressure_size
col.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True)
col.template_curve_mapping(gp_settings, "curve_sensitivity", brush=True, show_presets=True)
row = layout.row(align=True)
row.prop(brush, "strength", slider=True, text="Strength")
@@ -1723,7 +1723,7 @@ def brush_basic_grease_pencil_paint_settings(layout, context, brush, props, *, c
if paint.show_strength_curve:
col = layout.column()
col.active = brush.use_pressure_strength
col.template_curve_mapping(gp_settings, "curve_strength", brush=True)
col.template_curve_mapping(gp_settings, "curve_strength", brush=True, show_presets=True)
if props:
layout.prop(props, "subdivision")

View File

@@ -2144,7 +2144,7 @@ class VIEW3D_PT_tools_grease_pencil_v3_brush_random(View3DPanel, Panel):
emboss=False)
if paint.show_jitter_curve:
col.active = gp_settings.use_jitter_pressure
col.template_curve_mapping(gp_settings, "curve_jitter", brush=True)
col.template_curve_mapping(gp_settings, "curve_jitter", brush=True, show_presets=True)
class VIEW3D_PT_tools_grease_pencil_v3_brush_stabilizer(Panel, View3DPanel):