diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:44:09 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-04-23 17:44:09 +0300 |
commit | fc9624e485e17fa43e21931b1e5f2b5ec5211ab2 (patch) | |
tree | 0d6604d8fe204d244e792b27c30fa46986216f0a /source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc | |
parent | c8e1f18c5d6342bca3cb78ad349dc2c1b16d3104 (diff) | |
parent | 53d69e6d048f918b2c9ee61d3e9f27db64fdfa52 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc')
-rw-r--r-- | source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc index ee40ca50ab5..d64ab79d918 100644 --- a/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc +++ b/source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc @@ -259,6 +259,18 @@ static void deg_debug_graphviz_relation_color(const DebugContext &ctx, deg_debug_fprintf(ctx, "%s", color); } +static void deg_debug_graphviz_relation_style(const DebugContext &ctx, + const DepsRelation *rel) +{ + const char *style_default = "solid"; + const char *style_no_flush = "dashed"; + const char *style = style_default; + if (rel->flag & DEPSREL_FLAG_NO_FLUSH) { + style = style_no_flush; + } + deg_debug_fprintf(ctx, "%s", style); +} + static void deg_debug_graphviz_node_style(const DebugContext &ctx, const DepsNode *node) { const char *base_style = "filled"; /* default style */ @@ -468,16 +480,23 @@ static void deg_debug_graphviz_node_relations(const DebugContext &ctx, /* Note: without label an id seem necessary to avoid bugs in graphviz/dot */ deg_debug_fprintf(ctx, "id=\"%s\"", rel->name); // deg_debug_fprintf(ctx, "label=\"%s\"", rel->name); - deg_debug_fprintf(ctx, ",color="); deg_debug_graphviz_relation_color(ctx, rel); + deg_debug_fprintf(ctx, ",color="); + deg_debug_graphviz_relation_color(ctx, rel); + deg_debug_fprintf(ctx, ",style="); + deg_debug_graphviz_relation_style(ctx, rel); deg_debug_fprintf(ctx, ",penwidth=\"%f\"", penwidth); /* NOTE: edge from node to own cluster is not possible and gives graphviz * warning, avoid this here by just linking directly to the invisible * placeholder node */ - if (deg_debug_graphviz_is_cluster(tail) && !deg_debug_graphviz_is_owner(head, tail)) { + if (deg_debug_graphviz_is_cluster(tail) && + !deg_debug_graphviz_is_owner(head, tail)) + { deg_debug_fprintf(ctx, ",ltail=\"cluster_%p\"", tail); } - if (deg_debug_graphviz_is_cluster(head) && !deg_debug_graphviz_is_owner(tail, head)) { + if (deg_debug_graphviz_is_cluster(head) && + !deg_debug_graphviz_is_owner(tail, head)) + { deg_debug_fprintf(ctx, ",lhead=\"cluster_%p\"", head); } deg_debug_fprintf(ctx, "];" NL); |