Geometry Nodes: quiet warning when using object info node

Some object types don't have a geometry component in the depsgraph.
Before, there always was a warning printed when such an object was
used in the object info node (e.g. to get its location).
This commit is contained in:
2021-04-09 10:07:49 +02:00
parent 2110239547
commit 22574f741c

View File

@@ -173,7 +173,7 @@ static void add_object_relation(const ModifierUpdateDepsgraphContext *ctx, Objec
add_collection_object_relations_recursive(ctx, *collection_instance);
}
}
else {
else if (ELEM(object.type, OB_MESH, OB_POINTCLOUD, OB_VOLUME)) {
DEG_add_object_relation(ctx->node, &object, DEG_OB_COMP_GEOMETRY, "Nodes Modifier");
}
}