diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-01-23 18:56:26 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-01-23 18:56:26 +0300 |
commit | fb671035be082a67e6ffc58fb098c0d5140ba6b0 (patch) | |
tree | d8befc157c786d22c4ae66aa490b990adc7958ef /source/blender/editors/gpencil | |
parent | 8482ba6d2e1a97e038175a7fb693ed40c03ca5d9 (diff) | |
parent | d9d11e2faf0502eab215f8f13661972f9b459d3a (diff) |
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_brush.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/gpencil/gpencil_brush.c b/source/blender/editors/gpencil/gpencil_brush.c index 690fee61005..c2f1e9f091a 100644 --- a/source/blender/editors/gpencil/gpencil_brush.c +++ b/source/blender/editors/gpencil/gpencil_brush.c @@ -424,7 +424,8 @@ static bool gp_brush_strength_apply(tGP_BrushEditData *gso, * - We divide the strength, so that users can set "sane" values. * Otherwise, good default values are in the range of 0.093 */ - inf = gp_brush_influence_calc(gso, radius, co) / 20.0f; + inf = gp_brush_influence_calc(gso, radius, co) / 2.0f; + CLAMP_MIN(inf, 0.01f); /* apply */ if (gp_brush_invert_check(gso)) { @@ -435,12 +436,12 @@ static bool gp_brush_strength_apply(tGP_BrushEditData *gso, /* make line more opaque - increase stroke strength */ pt->strength += inf; } - /* smooth the strength */ - BKE_gpencil_smooth_stroke_strength(gps, pt_index, inf); - /* Strength should stay within [0.0, 1.0] */ CLAMP(pt->strength, 0.0f, 1.0f); + /* smooth the strength */ + BKE_gpencil_smooth_stroke_strength(gps, pt_index, inf); + return true; } |