diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-21 14:16:12 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-21 14:16:12 +0300 |
commit | 41b29c69c0545c1c993b36b74e1e189585f7d66d (patch) | |
tree | 6d9d7f3dc0e1ba6ad8ec8631dfced8ae613ae286 /source/blender/depsgraph/intern/builder | |
parent | 6e476800779ac04154d84964d52f533c9da85a6a (diff) |
Depsgraph: Fix mistake in previous commit
Diffstat (limited to 'source/blender/depsgraph/intern/builder')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_cycle.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc index 783fd84fa3c..e30b9b44490 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc @@ -106,7 +106,6 @@ void deg_graph_detect_cycles(Depsgraph *graph) else { set_node_visited_state(node, NODE_NOT_VISITED); } - node->done = 0; } while (!BLI_stack_is_empty(traversal_stack)) { @@ -118,8 +117,8 @@ void deg_graph_detect_cycles(Depsgraph *graph) DepsRelation *rel = node->outlinks[i]; if (rel->to->type == DEG_NODE_TYPE_OPERATION) { OperationDepsNode *to = (OperationDepsNode *)rel->to; - eCyclicCheckVisitedState state = get_node_visited_state(node); - if (state == NODE_IN_STACK) { + eCyclicCheckVisitedState to_state = get_node_visited_state(to); + if (to_state == NODE_IN_STACK) { printf("Dependency cycle detected:\n"); printf(" '%s' depends on '%s' through '%s'\n", to->full_identifier().c_str(), @@ -138,7 +137,7 @@ void deg_graph_detect_cycles(Depsgraph *graph) /* TODO(sergey): So called russian roulette cycle solver. */ rel->flag |= DEPSREL_FLAG_CYCLIC; } - else if (state == NODE_NOT_VISITED) { + else if (to_state == NODE_NOT_VISITED) { StackEntry new_entry; new_entry.node = to; new_entry.from = entry; |