diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-25 15:51:02 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-10-25 15:51:02 +0300 |
commit | 43533076073dcbac04f1b59fb2b4a519a2755aee (patch) | |
tree | eab4eaf9764c21120130df7a33b260533596e2da /source/blender/depsgraph/intern/depsgraph_debug.cc | |
parent | db83f41bafacb429e8fb24ccc509aa91f5744146 (diff) |
Depsgraph: Make validation to take explicit graph to be checked
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_debug.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_debug.cc | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_debug.cc b/source/blender/depsgraph/intern/depsgraph_debug.cc index 8db8eb32b34..70e08dbb449 100644 --- a/source/blender/depsgraph/intern/depsgraph_debug.cc +++ b/source/blender/depsgraph/intern/depsgraph_debug.cc @@ -64,18 +64,19 @@ bool DEG_debug_compare(const struct Depsgraph *graph1, return true; } -bool DEG_debug_scene_relations_validate(Main *bmain, +bool DEG_debug_graph_relations_validate(Depsgraph *graph, + Main *bmain, Scene *scene) { - Depsgraph *depsgraph = DEG_graph_new(); + Depsgraph *temp_depsgraph = DEG_graph_new(); bool valid = true; - DEG_graph_build_from_scene(depsgraph, bmain, scene); - if (!DEG_debug_compare(depsgraph, scene->depsgraph_legacy)) { + DEG_graph_build_from_scene(temp_depsgraph, bmain, scene); + if (!DEG_debug_compare(temp_depsgraph, graph)) { fprintf(stderr, "ERROR! Depsgraph wasn't tagged for update when it should have!\n"); BLI_assert(!"This should not happen!"); valid = false; } - DEG_graph_free(depsgraph); + DEG_graph_free(temp_depsgraph); return valid; } |