diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-02 15:55:33 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-05-02 18:09:44 +0300 |
commit | b6aa8a71fd8b12306ced2281805d70a24a6fc288 (patch) | |
tree | f4f5806e7cd0453cfd939603e6a2b626c753228b /source/blender/depsgraph/intern/depsgraph_debug.cc | |
parent | 651a2559318a5e8f3546286a207a5766e33feebe (diff) |
Depsgraph: Add per-depsgraph debug name which is shown in the logs
This way we can see for which depsgraph datablock is being evaluated for.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_debug.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_debug.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc index 6b74c11ed70..f7adaafe5b3 100644 --- a/source/blender/depsgraph/intern/depsgraph_debug.cc +++ b/source/blender/depsgraph/intern/depsgraph_debug.cc @@ -45,6 +45,7 @@ extern "C" { #include "DEG_depsgraph_query.h" #include "intern/depsgraph_intern.h" +#include "intern/depsgraph_types.h" #include "intern/nodes/deg_node_id.h" #include "intern/nodes/deg_node_time.h" @@ -64,6 +65,20 @@ int DEG_debug_flags_get(const Depsgraph *depsgraph) return deg_graph->debug_flags; } +void DEG_debug_name_set(struct Depsgraph *depsgraph, const char *name) +{ + DEG::Depsgraph *deg_graph = + reinterpret_cast<DEG::Depsgraph *>(depsgraph); + deg_graph->debug_name = name; +} + +const char *DEG_debug_name_get(struct Depsgraph *depsgraph) +{ + const DEG::Depsgraph *deg_graph = + reinterpret_cast<const DEG::Depsgraph *>(depsgraph); + return deg_graph->debug_name.c_str(); +} + bool DEG_debug_compare(const struct Depsgraph *graph1, const struct Depsgraph *graph2) { |