Depsgraph: Make it more clear that we dump relations into graphviz

We might implement other things to dump into graphviz, so better to
start having explicit names.
This commit is contained in:
2017-12-21 12:56:44 +01:00
parent b7121639e9
commit d988eae6f9
5 changed files with 12 additions and 8 deletions

View File

@@ -3704,7 +3704,7 @@ void DAG_print_dependencies(Main *UNUSED(bmain),
Scene *scene, Scene *scene,
Object *UNUSED(ob)) Object *UNUSED(ob))
{ {
DEG_debug_graphviz(scene->depsgraph, stdout, "Depsgraph"); DEG_debug_relations_graphviz(scene->depsgraph, stdout, "Depsgraph");
} }
#endif #endif

View File

@@ -51,7 +51,7 @@ set(SRC
intern/builder/deg_builder_relations_rig.cc intern/builder/deg_builder_relations_rig.cc
intern/builder/deg_builder_relations_scene.cc intern/builder/deg_builder_relations_scene.cc
intern/builder/deg_builder_transitive.cc intern/builder/deg_builder_transitive.cc
intern/debug/deg_debug_graphviz.cc intern/debug/deg_debug_relations_graphviz.cc
intern/eval/deg_eval.cc intern/eval/deg_eval.cc
intern/eval/deg_eval_flush.cc intern/eval/deg_eval_flush.cc
intern/nodes/deg_node.cc intern/nodes/deg_node.cc

View File

@@ -51,7 +51,9 @@ void DEG_stats_simple(const struct Depsgraph *graph,
/* ************************************************ */ /* ************************************************ */
/* Diagram-Based Graph Debugging */ /* Diagram-Based Graph Debugging */
void DEG_debug_graphviz(const struct Depsgraph *graph, FILE *stream, const char *label); void DEG_debug_relations_graphviz(const struct Depsgraph *graph,
FILE *stream,
const char *label);
/* ************************************************ */ /* ************************************************ */

View File

@@ -24,7 +24,7 @@
* ***** END GPL LICENSE BLOCK ***** * ***** END GPL LICENSE BLOCK *****
*/ */
/** \file blender/depsgraph/intern/debug/deg_debug_graphviz.cc /** \file blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
* \ingroup depsgraph * \ingroup depsgraph
* *
* Implementation of tools for debugging the depsgraph * Implementation of tools for debugging the depsgraph
@@ -518,7 +518,9 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx,
} // namespace DEG } // namespace DEG
void DEG_debug_graphviz(const Depsgraph *graph, FILE *f, const char *label) void DEG_debug_relations_graphviz(const Depsgraph *graph,
FILE *f,
const char *label)
{ {
if (!graph) { if (!graph) {
return; return;

View File

@@ -45,13 +45,13 @@
#include "DEG_depsgraph_build.h" #include "DEG_depsgraph_build.h"
#include "DEG_depsgraph_debug.h" #include "DEG_depsgraph_debug.h"
static void rna_Depsgraph_debug_graphviz(Depsgraph *graph, const char *filename) static void rna_Depsgraph_debug_relations_graphviz(Depsgraph *graph, const char *filename)
{ {
FILE *f = fopen(filename, "w"); FILE *f = fopen(filename, "w");
if (f == NULL) { if (f == NULL) {
return; return;
} }
DEG_debug_graphviz(graph, f, "Depsgraph"); DEG_debug_relations_graphviz(graph, f, "Depsgraph");
fclose(f); fclose(f);
} }
@@ -80,7 +80,7 @@ static void rna_def_depsgraph(BlenderRNA *brna)
srna = RNA_def_struct(brna, "Depsgraph", NULL); srna = RNA_def_struct(brna, "Depsgraph", NULL);
RNA_def_struct_ui_text(srna, "Dependency Graph", ""); RNA_def_struct_ui_text(srna, "Dependency Graph", "");
func = RNA_def_function(srna, "debug_graphviz", "rna_Depsgraph_debug_graphviz"); func = RNA_def_function(srna, "debug_relations_graphviz", "rna_Depsgraph_debug_relations_graphviz");
parm = RNA_def_string_file_path(func, "filename", NULL, FILE_MAX, "File Name", parm = RNA_def_string_file_path(func, "filename", NULL, FILE_MAX, "File Name",
"File in which to store graphviz debug output"); "File in which to store graphviz debug output");
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED); RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);