diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2019-12-01 22:29:11 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2019-12-09 18:57:39 +0300 |
commit | 448669a630d318a5cd090af3083c985740a68e8e (patch) | |
tree | 80183ed40a349268fa97dd42969f90843258c91f /source/blender/editors/sculpt_paint/paint_stroke.c | |
parent | 40e2f4469a76f7fab5501b877c929db181dbc6a4 (diff) |
Fix T72092: Clay Strips Brush stroke crash with Brush Detail Size
Some other areas in the brush code outside sculpt mode assume that
pressure is multiplied directly on top of the initial size. This patch
calculates the pixel radius correctly using the brush size from sculpt
mode to get the dyntopo detail size.
When the new brush input system is in place, all these values will come
directly from the brush input code with all the custom curves applied
per brush, so all paint modes will have a correct brush behavior and all
this sculpt mode specific code won't be necessary.
Reviewed By: jbakker
Maniphest Tasks: T72092
Differential Revision: https://developer.blender.org/D6339
Diffstat (limited to 'source/blender/editors/sculpt_paint/paint_stroke.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_stroke.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c index fc0c6d748cb..372ea954630 100644 --- a/source/blender/editors/sculpt_paint/paint_stroke.c +++ b/source/blender/editors/sculpt_paint/paint_stroke.c @@ -335,6 +335,7 @@ static bool paint_brush_update(bContext *C, ups->size_pressure_value = stroke->cached_size_pressure; ups->pixel_radius = BKE_brush_size_get(scene, brush); + ups->initial_pixel_radius = BKE_brush_size_get(scene, brush); if (BKE_brush_use_size_pressure(brush) && paint_supports_dynamic_size(brush, mode)) { ups->pixel_radius *= stroke->cached_size_pressure; |