Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-05-20 14:33:42 +0300
committerHans Goudey <h.goudey@me.com>2022-05-20 14:33:42 +0300
commitcea37b3127636ac02e65c050513a3060ac6800ab (patch)
tree9575ce6ae89756902bb86ead7324c3c871f41ceb /source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
parenta89f829f12f56214b0e463b33f24edf27228db1f (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_snake_hook.cc')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc b/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
index e009b443839..4095c9427e1 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_snake_hook.cc
@@ -112,8 +112,8 @@ struct SnakeHookOperatorExecutor {
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);
falloff_shape_ = static_cast<eBrushFalloffShape>(brush_->falloff_shape);
curves_to_world_mat_ = object_->obmat;