diff options
author | mano-wii <germano.costa@ig.com.br> | 2020-02-12 14:35:27 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2020-02-12 14:35:27 +0300 |
commit | 24b5d5aa61682d44376d28097fc0a8f9c5c397bb (patch) | |
tree | bb994df7c7cd17dbc960ac9eabae4cb9a8599db4 /source/blender/modifiers/intern | |
parent | a1e50cfe6b4dbc360b6118c63a0dc7445023c37b (diff) |
Modifiers: Weld Modifier - simplify invert_vgroup code
No functional change
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weld.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_weld.c b/source/blender/modifiers/intern/MOD_weld.c index 64a0667a41a..1f641e56c76 100644 --- a/source/blender/modifiers/intern/MOD_weld.c +++ b/source/blender/modifiers/intern/MOD_weld.c @@ -37,6 +37,7 @@ #include "DNA_mesh_types.h" #include "DNA_meshdata_types.h" +#include "DNA_modifier_types.h" #include "DNA_object_types.h" #include "BKE_deform.h" @@ -1623,7 +1624,6 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex const MPoly *mpoly, *mp; uint totvert, totedge, totloop, totpoly; uint i; - const bool invert_vgroup = (wmd->flag & MOD_WELD_INVERT_VGROUP) != 0; mvert = mesh->mvert; totvert = mesh->totvert; @@ -1634,12 +1634,12 @@ static Mesh *weldModifier_doWeld(WeldModifierData *wmd, const ModifierEvalContex MDeformVert *dvert, *dv; dvert = CustomData_get_layer(&mesh->vdata, CD_MDEFORMVERT); if (dvert) { + const bool invert_vgroup = (wmd->flag & MOD_WELD_INVERT_VGROUP) != 0; dv = &dvert[0]; v_mask = BLI_BITMAP_NEW(totvert, __func__); for (i = 0; i < totvert; i++, dv++) { - const bool found = invert_vgroup ? 1.0f - defvert_find_weight(dv, defgrp_index) > 0.0f : - defvert_find_weight(dv, defgrp_index) > 0.0f; - if (found) { + const bool found = defvert_find_weight(dv, defgrp_index) > 0.0f; + if (found != invert_vgroup) { BLI_BITMAP_ENABLE(v_mask, i); v_mask_act++; } |