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:
authorAlexander Gavrilov <angavrilov@gmail.com>2019-04-23 18:29:36 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2019-04-23 18:29:41 +0300
commit80b036afab8c2b3c7dabbd270b29daa439d472aa (patch)
treed3794b4bcac767edc40e21f98e47346f2e17e6da /source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
parent40baa2e2b358a8a376fd54f0ae0d52a4ef75dc4c (diff)
Depsgraph: make the dependency cycle report more readable.
Since it is a continuous cycle, there's no need to repeat the name of the previous bone. Also, dot is a common symbol in object and bone names, so use '/' instead for node nesting.
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_cycle.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_cycle.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
index af5c4e7130b..d11a60b77dd 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_cycle.cc
@@ -182,20 +182,16 @@ void solve_cycles(CyclesSolverState *state)
OperationNode *to = (OperationNode *)rel->to;
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(),
- node->full_identifier().c_str(),
- rel->name);
+ string cycle_str = " " + to->full_identifier() + " depends on\n " +
+ node->full_identifier() + " via '" + rel->name + "'\n";
StackEntry *current = entry;
while (current->node != to) {
BLI_assert(current != NULL);
- printf(" '%s' depends on '%s' through '%s'\n",
- current->node->full_identifier().c_str(),
- current->from->node->full_identifier().c_str(),
- current->via_relation->name);
+ cycle_str += " " + current->from->node->full_identifier() + " via '" +
+ current->via_relation->name + "'\n";
current = current->from;
}
+ printf("Dependency cycle detected:\n%s", cycle_str.c_str());
Relation *sacrificial_relation = select_relation_to_murder(rel, entry);
sacrificial_relation->flag |= RELATION_FLAG_CYCLIC;
++state->num_cycles;