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-05-26 17:20:24 +0300
committerJacques Lucke <jacques@blender.org>2021-05-26 17:20:24 +0300
commit3f27efd31ebede79f7dc262e608cf83bda223669 (patch)
treee12cef7805c0ad5f8c9e7a42880efc3382c5317c
parent06f86dd4d9a2a4250279f40acb6ca48191a094da (diff)
parentba5b4d1bd68e8b9a12279d8be9e6d84f496bd44b (diff)
Merge branch 'blender-v2.93-release'
-rw-r--r--source/blender/depsgraph/DEG_depsgraph_build.h2
-rw-r--r--source/blender/depsgraph/intern/depsgraph_build.cc6
-rw-r--r--source/blender/modifiers/intern/MOD_nodes.cc2
3 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/depsgraph/DEG_depsgraph_build.h b/source/blender/depsgraph/DEG_depsgraph_build.h
index 5f9e78837a7..b4acf9b010c 100644
--- a/source/blender/depsgraph/DEG_depsgraph_build.h
+++ b/source/blender/depsgraph/DEG_depsgraph_build.h
@@ -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
diff --git a/source/blender/depsgraph/intern/depsgraph_build.cc b/source/blender/depsgraph/intern/depsgraph_build.cc
index 6c1e91d068b..9e9191c5ab9 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cc
+++ b/source/blender/depsgraph/intern/depsgraph_build.cc
@@ -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)
diff --git a/source/blender/modifiers/intern/MOD_nodes.cc b/source/blender/modifiers/intern/MOD_nodes.cc
index 37a21a3c14b..f927f4b1bcd 100644
--- a/source/blender/modifiers/intern/MOD_nodes.cc
+++ b/source/blender/modifiers/intern/MOD_nodes.cc
@@ -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);
}