Depsgraph: Make it more clear that we dump relations into graphviz
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 21 Dec 2017 11:56:44 +0000 (12:56 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 21 Dec 2017 15:33:22 +0000 (16:33 +0100)
We might implement other things to dump into graphviz, so better to
start having explicit names.

source/blender/blenkernel/intern/depsgraph.c
source/blender/depsgraph/CMakeLists.txt
source/blender/depsgraph/DEG_depsgraph_debug.h
source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc [moved from source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc with 98% similarity]
source/blender/makesrna/intern/rna_depsgraph.c

index 985c758d5cb08b88ea45f41ae299fd404f320db7..3a528d4b8475fa13d50d93079909d7bd6ecd2f5e 100644 (file)
@@ -3704,7 +3704,7 @@ void DAG_print_dependencies(Main *UNUSED(bmain),
                             Scene *scene,
                             Object *UNUSED(ob))
 {
-       DEG_debug_graphviz(scene->depsgraph, stdout, "Depsgraph");
+       DEG_debug_relations_graphviz(scene->depsgraph, stdout, "Depsgraph");
 }
 
 #endif
index 232fc93aeb45fbcbf73bb69ee3108c7413eb1622..04fbbbf0915ee7ebda3bc01f3550560860250c58 100644 (file)
@@ -51,7 +51,7 @@ set(SRC
        intern/builder/deg_builder_relations_rig.cc
        intern/builder/deg_builder_relations_scene.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_flush.cc
        intern/nodes/deg_node.cc
index 7d96b9ed602526b65d739a252d6b450e88bfff43..e920e34dad35809df895e29949d43e7c1cb33bed 100644 (file)
@@ -51,7 +51,9 @@ void DEG_stats_simple(const struct Depsgraph *graph,
 /* ************************************************ */
 /* 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);
 
 /* ************************************************ */
 
similarity index 98%
rename from source/blender/depsgraph/intern/debug/deg_debug_graphviz.cc
rename to source/blender/depsgraph/intern/debug/deg_debug_relations_graphviz.cc
index 88954f6f0dc0a8c1f23ea2c8f4d850f88a4c2aa8..ca7e9c5c40cae6af579b99773a8b485f985fcc13 100644 (file)
@@ -24,7 +24,7 @@
  * ***** 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
  *
  * Implementation of tools for debugging the depsgraph
@@ -518,7 +518,9 @@ static void deg_debug_graphviz_graph_relations(const DebugContext &ctx,
 
 }  // 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) {
                return;
index 14668001428ecda891c044ed13224f0cecb4e0aa..041f01b6543a47e6d0bb18810b26a7aab382dc9b 100644 (file)
 #include "DEG_depsgraph_build.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");
        if (f == NULL) {
                return;
        }
-       DEG_debug_graphviz(graph, f, "Depsgraph");
+       DEG_debug_relations_graphviz(graph, f, "Depsgraph");
        fclose(f);
 }
 
@@ -80,7 +80,7 @@ static void rna_def_depsgraph(BlenderRNA *brna)
        srna = RNA_def_struct(brna, "Depsgraph", NULL);
        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",
                                        "File in which to store graphviz debug output");
        RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);