diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-06-03 17:45:34 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-06-04 11:34:05 +0300 |
commit | f4e0a19d4f1b656c2159d3cdd944d31ebaf9dba5 (patch) | |
tree | b033021ae021a2fa486bb60ad803c9ee7f234bb4 /source | |
parent | 053082e9d858370894d121430e07cc43108fe6cc (diff) |
Fix T88803: GPencil Thickness modifier produces thicker lines
There was a double apply of the thickness due a bug in the fading new parameter.
Differential Revision: https://developer.blender.org/D11483
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c index 512e3af063a..126949cd659 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilthick.c @@ -170,8 +170,10 @@ static void deformStroke(GpencilModifierData *md, weight *= curvef; } - float fac_begin = mmd->flag & GP_THICK_NORMALIZE ? 1 : mmd->thickness_fac; - target *= interpf(fac_begin, mmd->fading_end_factor, factor_depth); + /* Apply distance fading. */ + if (mmd->flag & GP_THICK_FADING) { + target = interpf(target, mmd->fading_end_factor, factor_depth); + } pt->pressure = interpf(target, pt->pressure, weight); |