[Bf-blender-cvs] [0603ab1] depsgraph_refactor: Depsgraph: Ensure node tree deps nodes are not created twice

Sergey Sharybin noreply at git.blender.org
Mon Mar 16 16:22:08 CET 2015


Commit: 0603ab1a68fa6f47f0a2b1f1d0c1065e4bc09a10
Author: Sergey Sharybin
Date:   Mon Mar 16 20:20:55 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rB0603ab1a68fa6f47f0a2b1f1d0c1065e4bc09a10

Depsgraph: Ensure node tree deps nodes are not created twice

===================================================================

M	source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M	source/blender/depsgraph/intern/depsgraph_build_relations.cpp

===================================================================

diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index a5ad7cc..2d4c50a 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -1052,6 +1052,10 @@ void DepsgraphNodeBuilder::build_nodetree(DepsNode *owner_node, bNodeTree *ntree
 
 	/* nodetree itself */
 	ID *ntree_id = &ntree->id;
+	if (ntree_id->flag & LIB_DOIT) {
+		return;
+	}
+
 	build_animdata(ntree_id);
 
 	/* Parameters for drivers. */
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
index cf648fb..1eae35f 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
@@ -1685,6 +1685,11 @@ void DepsgraphRelationBuilder::build_nodetree(ID *owner, bNodeTree *ntree)
 		return;
 
 	ID *ntree_id = &ntree->id;
+	if (ntree_id->flag & LIB_DOIT) {
+		return;
+	}
+	ntree_id->flag |= LIB_DOIT;
+
 	build_animdata(ntree_id);
 
 	/* nodetree's nodes... */




More information about the Bf-blender-cvs mailing list