Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-04-16 12:23:28 +0300
committerJacques Lucke <jacques@blender.org>2021-04-16 12:23:28 +0300
commit382b06c80cacb0ee940f2783f4619580b04aa502 (patch)
tree44b705e1077d96bd11519a57d179f9d0c6ab4a45 /source/blender/modifiers
parent919558854d624f5db40acfa9f5674ac8c94873b6 (diff)
Fix T85691: attributes used by geometry nodes were removed automatically
This has technically been fixed by rB3e87d8a4315d794efff659e40f0bb9e34e2aec8a, but the fix there is questionable, because it disables an optimization for vertex groups entirely. This fix is a little bit more precise in that it only disables the optimization when the object is used by some geometry nodes modifier.
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 4a384063571..02a1dc07c93 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -179,6 +179,14 @@ static void add_object_relation(const ModifierUpdateDepsgraphContext *ctx, Objec
}
else if (ELEM(object.type, OB_MESH, OB_POINTCLOUD, OB_VOLUME)) {
DEG_add_object_relation(ctx->node, &object, DEG_OB_COMP_GEOMETRY, "Nodes Modifier");
+ /* We don't know exactly what attributes from the other object we will need. */
+ CustomData_MeshMasks mask;
+ mask.vmask = CD_MASK_PROP_ALL | CD_MASK_MDEFORMVERT;
+ mask.pmask = CD_MASK_PROP_ALL;
+ mask.lmask = CD_MASK_PROP_ALL;
+ mask.fmask = CD_MASK_PROP_ALL;
+ mask.emask = CD_MASK_PROP_ALL;
+ DEG_add_customdata_mask(ctx->node, &object, &mask);
}
}
}