[Bf-blender-cvs] [ca4580a] depsgraph_refactor: Fix: Relationships to time source nodes were getting removed by reachability pruning

Joshua Leung noreply at git.blender.org
Thu Dec 18 09:18:24 CET 2014


Commit: ca4580a409e704728b146b3f7a5c749bca29d4d6
Author: Joshua Leung
Date:   Thu Dec 18 21:07:33 2014 +1300
Branches: depsgraph_refactor
https://developer.blender.org/rBca4580a409e704728b146b3f7a5c749bca29d4d6

Fix: Relationships to time source nodes were getting removed by reachability pruning

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

M	source/blender/depsgraph/intern/depsgraph_build.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build.cpp b/source/blender/depsgraph/intern/depsgraph_build.cpp
index 598b640..5ab771b 100644
--- a/source/blender/depsgraph/intern/depsgraph_build.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build.cpp
@@ -474,11 +474,15 @@ static void deg_graph_transitive_reduction(Depsgraph *graph)
 		}
 		
 		/* remove redundant paths to the target */
-		for (OperationDepsNode::Relations::const_iterator it_rel = target->inlinks.begin(); it_rel != target->inlinks.end();) {
+		for (DepsNode::Relations::const_iterator it_rel = target->inlinks.begin(); it_rel != target->inlinks.end();) {
 			DepsRelation *rel = *it_rel;
 			++it_rel; /* increment in advance, so we can safely remove the relation */
 			
-			if (rel->from->done & OP_REACHABLE) {
+			if (rel->from->type == DEPSNODE_TYPE_TIMESOURCE) {
+				/* HACK: time source nodes don't get "done" flag set/cleared */
+				// TODO: there will be other types in future, so iterators above need modifying
+			}
+			else if (rel->from->done & OP_REACHABLE) {
 				OBJECT_GUARDED_DELETE(rel, DepsRelation);
 			}
 		}




More information about the Bf-blender-cvs mailing list