diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-03 00:44:47 +0300 |
---|---|---|
committer | Germano Cavalcante <germano.costa@ig.com.br> | 2020-03-03 00:44:58 +0300 |
commit | 5a77748e470df308cd325311bab9bf21beb6f77e (patch) | |
tree | c0d9edb63c38bf97cede574c6f41faeda2e037f8 /source/blender/modifiers/intern | |
parent | 98c74c6a6ec40655e3db462bd4e1335588a10546 (diff) |
Fix T74377: Weld Modifier destroys vertex groups
Differential Revision: https://developer.blender.org/D6997
Diffstat (limited to 'source/blender/modifiers/intern')
-rw-r--r-- | source/blender/modifiers/intern/MOD_weld.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_weld.c b/source/blender/modifiers/intern/MOD_weld.c index 1f641e56c76..803c8e1853f 100644 --- a/source/blender/modifiers/intern/MOD_weld.c +++ b/source/blender/modifiers/intern/MOD_weld.c @@ -1890,6 +1890,18 @@ static void initData(ModifierData *md) wmd->defgrp_name[0] = '\0'; } +static void requiredDataMask(Object *UNUSED(ob), + ModifierData *md, + CustomData_MeshMasks *r_cddata_masks) +{ + WeldModifierData *wmd = (WeldModifierData *)md; + + /* Ask for vertexgroups if we need them. */ + if (wmd->defgrp_name[0] != '\0') { + r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT; + } +} + ModifierTypeInfo modifierType_Weld = { /* name */ "Weld", /* structName */ "WeldModifierData", @@ -1908,7 +1920,7 @@ ModifierTypeInfo modifierType_Weld = { /* applyModifier */ applyModifier, /* initData */ initData, - /* requiredDataMask */ NULL, + /* requiredDataMask */ requiredDataMask, /* freeData */ NULL, /* isDisabled */ NULL, /* updateDepsgraph */ NULL, |