Merge branch 'blender-v2.93-release'
authorJacques Lucke <jacques@blender.org>
Wed, 26 May 2021 14:20:24 +0000 (16:20 +0200)
committerJacques Lucke <jacques@blender.org>
Wed, 26 May 2021 14:20:24 +0000 (16:20 +0200)
source/blender/depsgraph/DEG_depsgraph_build.h
source/blender/depsgraph/intern/depsgraph_build.cc
source/blender/modifiers/intern/MOD_nodes.cc

index 5f9e78837a77872e67f2dc2b3414970fc44c71ad..b4acf9b010c4c926f98e08d24c0fd71cb4da235a 100644 (file)
@@ -189,6 +189,8 @@ void DEG_add_customdata_mask(struct DepsNodeHandle *handle,
 struct ID *DEG_get_id_from_handle(struct DepsNodeHandle *node_handle);
 struct Depsgraph *DEG_get_graph_from_handle(struct DepsNodeHandle *node_handle);
 
+bool DEG_object_has_geometry_component(struct Object *object);
+
 /* ************************************************ */
 
 #ifdef __cplusplus
index 6c1e91d068b18efa0befb7da1bd121d3db688127..9e9191c5ab96ef3d5ef5e9b633bbae3612e6acd2 100644 (file)
@@ -62,6 +62,7 @@
 
 #include "intern/depsgraph_registry.h"
 #include "intern/depsgraph_relation.h"
+#include "intern/depsgraph_tag.h"
 #include "intern/depsgraph_type.h"
 
 /* ****************** */
@@ -109,6 +110,11 @@ void DEG_add_object_relation(DepsNodeHandle *node_handle,
   deg_node_handle->builder->add_node_handle_relation(comp_key, deg_node_handle, description);
 }
 
+bool DEG_object_has_geometry_component(Object *object)
+{
+  return deg::geometry_tag_to_component(&object->id) != deg::NodeType::UNDEFINED;
+}
+
 void DEG_add_collection_geometry_relation(DepsNodeHandle *node_handle,
                                           Collection *collection,
                                           const char *description)
index 37a21a3c14bcdfadd124c38abd722f1a7cbbb395..f927f4b1bcd16e1786ce26fcf5920533cd830fd5 100644 (file)
@@ -179,7 +179,7 @@ static void add_object_relation(const ModifierUpdateDepsgraphContext *ctx, Objec
     if (object.type == OB_EMPTY && object.instance_collection != nullptr) {
       add_collection_relation(ctx, *object.instance_collection);
     }
-    else if (ELEM(object.type, OB_MESH, OB_POINTCLOUD, OB_VOLUME, OB_CURVE)) {
+    else if (DEG_object_has_geometry_component(&object)) {
       DEG_add_object_relation(ctx->node, &object, DEG_OB_COMP_GEOMETRY, "Nodes Modifier");
       DEG_add_customdata_mask(ctx->node, &object, &dependency_data_mask);
     }