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.
This commit is contained in:
Antonio Vazquez 2021-10-28 15:51:40 +02:00
parent e96b7c0092
commit 43f97393bb
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #92550, Vertex Group weight is discarded when Vertex Group Influence of a Grease Pencil modifier is Inverted
1 changed files with 1 additions and 1 deletions

View File

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