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/sculpt_intern.h | |
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/sculpt_intern.h')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt_intern.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_intern.h b/source/blender/editors/sculpt_paint/sculpt_intern.h index 324ca250c86..e9ad31d6f25 100644 --- a/source/blender/editors/sculpt_paint/sculpt_intern.h +++ b/source/blender/editors/sculpt_paint/sculpt_intern.h @@ -319,8 +319,8 @@ typedef struct StrokeCache { float location[3]; float last_location[3]; - /* This radius variable is not affected by pressure curves */ - float dyntopo_radius; + /* Original pixel radius with the pressure curve applied for dyntopo detail size */ + float dyntopo_pixel_radius; bool is_last_valid; |