Geometry Nodes: require vertex groups data in nodes modifier
Without this, the modifier evaluation code might remove any vertex groups from the mesh for performance reasons. We can't say for sure whether the node group will need the vertex groups, but it is quite likely. Ref T83357.
This commit is contained in:
parent
6714b800d1
commit
9ee7270e0a
Notes:
blender-bot
2023-02-14 11:21:40 +01:00
Referenced by issue #83357, Design to support instancing (GeometrySet) for mesh objects
|
@ -1063,6 +1063,15 @@ static void freeData(ModifierData *md)
|
|||
}
|
||||
}
|
||||
|
||||
static void requiredDataMask(Object *UNUSED(ob),
|
||||
ModifierData *UNUSED(md),
|
||||
CustomData_MeshMasks *r_cddata_masks)
|
||||
{
|
||||
/* We don't know what the node tree will need. If there are vertex groups, it is likely that the
|
||||
* node tree wants to access them. */
|
||||
r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
|
||||
}
|
||||
|
||||
ModifierTypeInfo modifierType_Nodes = {
|
||||
/* name */ "GeometryNodes",
|
||||
/* structName */ "NodesModifierData",
|
||||
|
@ -1087,7 +1096,7 @@ ModifierTypeInfo modifierType_Nodes = {
|
|||
/* modifyVolume */ nullptr,
|
||||
|
||||
/* initData */ initData,
|
||||
/* requiredDataMask */ nullptr,
|
||||
/* requiredDataMask */ requiredDataMask,
|
||||
/* freeData */ freeData,
|
||||
/* isDisabled */ isDisabled,
|
||||
/* updateDepsgraph */ updateDepsgraph,
|
||||
|
|
Loading…
Reference in New Issue