[Bf-blender-cvs] [66b3f0b4d07] blender2.8: Depsgraph: Fix redundant nodes built when animation shares same action

Sergey Sharybin noreply at git.blender.org
Fri May 11 15:49:34 CEST 2018


Commit: 66b3f0b4d0743878e98f2ffcdfdfd81adfb99673
Author: Sergey Sharybin
Date:   Fri May 11 15:49:04 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB66b3f0b4d0743878e98f2ffcdfdfd81adfb99673

Depsgraph: Fix redundant nodes built when animation shares same action

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

M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 0545dd33a29..31a0e74b569 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -682,7 +682,9 @@ void DepsgraphNodeBuilder::build_animdata(ID *id)
 		(void) add_id_node(id);
 		ID *id_cow = get_cow_id(id);
 
-		if (adt->action != NULL) {
+		if (adt->action != NULL &&
+		    !built_map_.checkIsBuiltAndTag(&adt->action->id))
+		{
 			add_operation_node(&adt->action->id, DEG_NODE_TYPE_ANIMATION,
 			                   NULL,
 			                   DEG_OPCODE_ANIMATION);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 1663cce4904..4fdd2d48529 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -948,7 +948,9 @@ void DepsgraphRelationBuilder::build_animdata_curves(ID *id)
 	TimeSourceKey time_src_key;
 	add_relation(time_src_key, adt_key, "TimeSrc -> Animation");
 	/* Relation from action itself. */
-	if (adt->action != NULL) {
+	if (adt->action != NULL &&
+	    !built_map_.checkIsBuiltAndTag(&adt->action->id))
+	{
 		ComponentKey action_key(&adt->action->id, DEG_NODE_TYPE_ANIMATION);
 		add_relation(action_key, adt_key, "Action -> Animation");
 	}



More information about the Bf-blender-cvs mailing list