diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-03 18:57:40 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-11-06 11:24:23 +0300 |
commit | 17395b6b08f4ae55f8b6d8122b295f8a406410d1 (patch) | |
tree | ae0f9a6c0887ff46e440696846c609c06a177aac /source/blender/depsgraph | |
parent | f867a560d9bdad066650f853f520302d76aac4fa (diff) |
Depsgraph: Cleanup, remove depsgraph_legacy from depsgraph_tag.cc
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 8c7afa89033..13f1506eadb 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -49,6 +49,7 @@ extern "C" { #include "BKE_library.h" #include "BKE_main.h" #include "BKE_node.h" +#include "BKE_scene.h" #include "BKE_workspace.h" #define new new_ @@ -350,13 +351,12 @@ void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag) void deg_id_tag_update(Main *bmain, ID *id, int flag) { lib_id_recalc_tag_flag(bmain, id, flag); - for (Scene *scene = (Scene *)bmain->scene.first; - scene != NULL; - scene = (Scene *)scene->id.next) - { - if (scene->depsgraph_legacy != NULL) { - Depsgraph *graph = (Depsgraph *)scene->depsgraph_legacy; - deg_graph_id_tag_update(bmain, graph, id, flag); + LINKLIST_FOREACH(Scene *, scene, &bmain->scene) { + LINKLIST_FOREACH(SceneLayer *, scene_layer, &scene->render_layers) { + Depsgraph *depsgraph = (Depsgraph *)BKE_scene_get_depsgraph(scene, scene_layer); + if (depsgraph != NULL) { + deg_graph_id_tag_update(bmain, depsgraph, id, flag); + } } } } @@ -459,12 +459,12 @@ void DEG_graph_on_visible_update(Main *bmain, Depsgraph *depsgraph) void DEG_on_visible_update(Main *bmain, const bool UNUSED(do_time)) { - for (Scene *scene = (Scene *)bmain->scene.first; - scene != NULL; - scene = (Scene *)scene->id.next) - { - if (scene->depsgraph_legacy != NULL) { - DEG_graph_on_visible_update(bmain, scene->depsgraph_legacy); + LINKLIST_FOREACH(Scene *, scene, &bmain->scene) { + LINKLIST_FOREACH(SceneLayer *, scene_layer, &scene->render_layers) { + Depsgraph *depsgraph = (Depsgraph *)BKE_scene_get_depsgraph(scene, scene_layer); + if (depsgraph != NULL) { + DEG_graph_on_visible_update(bmain, depsgraph); + } } } } |