diff options
author | Hans Goudey <h.goudey@me.com> | 2022-05-20 14:33:42 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-05-20 14:33:42 +0300 |
commit | cea37b3127636ac02e65c050513a3060ac6800ab (patch) | |
tree | 9575ce6ae89756902bb86ead7324c3c871f41ceb /source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc | |
parent | a89f829f12f56214b0e463b33f24edf27228db1f (diff) |
Curves: Support pressure in sculpt brushes
Multiply the radius and strength of sculpt brushes by the pressure
when "use pressure" is turned on. The brush system isn't responsible
for this, so the pressure needs to be stored in `StrokeExtension`.
Differential Revision: https://developer.blender.org/D14996
Diffstat (limited to 'source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc')
-rw-r--r-- | source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc index d10cf239dd2..16df721a853 100644 --- a/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc +++ b/source/blender/editors/sculpt_paint/curves_sculpt_grow_shrink.cc @@ -321,8 +321,8 @@ struct CurvesEffectOperationExecutor { const CurvesSculpt &curves_sculpt = *scene_->toolsettings->curves_sculpt; brush_ = BKE_paint_brush_for_read(&curves_sculpt.paint); - brush_radius_re_ = BKE_brush_size_get(scene_, brush_); - brush_strength_ = BKE_brush_alpha_get(scene_, brush_); + brush_radius_re_ = brush_radius_get(*scene_, *brush_, stroke_extension); + brush_strength_ = brush_strength_get(*scene_, *brush_, stroke_extension); brush_radius_sq_re_ = pow2f(brush_radius_re_); falloff_shape_ = eBrushFalloffShape(brush_->falloff_shape); |