diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-10-28 16:51:40 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-10-28 16:51:40 +0300 |
commit | 43f97393bb5e394c2a7320a0236f1d64f12fa9af (patch) | |
tree | 41009a8c12ad2dda2a513ee367d711869bc01fb3 /source/blender/gpencil_modifiers/intern | |
parent | e96b7c0092ea4d193ded1c1e16e5ff72009088e2 (diff) |
Fix 92550: GPencil Vertex Group is not apply as expected when is inverted
When use Invert option, the weight must be inverted not omitted. This change invert the value if the point had assigned weight to get the right result.
Diffstat (limited to 'source/blender/gpencil_modifiers/intern')
-rw-r--r-- | source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c index 595a0c1cc5e..9ea146c77f2 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c @@ -156,7 +156,7 @@ float get_modifier_point_weight(MDeformVert *dvert, bool inverse, int def_nr) MDeformWeight *dw = BKE_defvert_find_index(dvert, def_nr); weight = dw ? dw->weight : -1.0f; if ((weight >= 0.0f) && (inverse)) { - return -1.0f; + return 1.0f - weight; } if ((weight < 0.0f) && (!inverse)) { |