[Bf-blender-cvs] [43f97393bb5] blender-v3.0-release: Fix 92550: GPencil Vertex Group is not apply as expected when is inverted

Antonio Vazquez noreply at git.blender.org
Thu Oct 28 15:51:51 CEST 2021


Commit: 43f97393bb5e394c2a7320a0236f1d64f12fa9af
Author: Antonio Vazquez
Date:   Thu Oct 28 15:51:40 2021 +0200
Branches: blender-v3.0-release
https://developer.blender.org/rB43f97393bb5e394c2a7320a0236f1d64f12fa9af

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.

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencil_util.c

===================================================================

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)) {



More information about the Bf-blender-cvs mailing list