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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-20 18:16:28 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-20 18:16:28 +0300
commitf2aacfc943db17995bb16fb605d8ad4f6a215682 (patch)
treeeea70766ca17c99c28852c82f2c5c11cfcf1cae3 /source/blender/depsgraph
parent5b1404f0665d7e110e60ebea8a1029a5f7f15a70 (diff)
Depsgraph: Make transitive reduction to work
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_transitive.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
index b12af21fc8d..30af0242aeb 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_transitive.cc
@@ -84,8 +84,7 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
foreach (OperationDepsNode *node, graph->operations) {
node->done = 0;
}
-
- /* mark nodes from which we can reach the target
+ /* Mark nodes from which we can reach the target
* start with children, so the target node and direct children are not
* flagged.
*/
@@ -93,25 +92,26 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
foreach (DepsRelation *rel, target->inlinks) {
deg_graph_tag_paths_recursive(rel->from);
}
-
/* Remove redundant paths to the target. */
for (DepsNode::Relations::const_iterator it_rel = target->inlinks.begin();
it_rel != target->inlinks.end();
)
{
DepsRelation *rel = *it_rel;
- /* Increment in advance, so we can safely remove the relation. */
- ++it_rel;
-
if (rel->from->type == DEG_NODE_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.
*/
+ ++it_rel;
}
else if (rel->from->done & OP_REACHABLE) {
+ rel->unlink();
OBJECT_GUARDED_DELETE(rel, DepsRelation);
}
+ else {
+ ++it_rel;
+ }
}
}
}