Commit: 17395b6b08f4ae55f8b6d8122b295f8a406410d1
Author: Sergey Sharybin
Date:   Fri Nov 3 16:57:40 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB17395b6b08f4ae55f8b6d8122b295f8a406410d1

Depsgraph: Cleanup, remove depsgraph_legacy from depsgraph_tag.cc

===================================================================

M       source/blender/depsgraph/intern/depsgraph_tag.cc

===================================================================

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);
+                       }
                }
        }
 }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to