Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / depsgraph / intern / depsgraph_build.cc
index 80d3df2811c311ce2d99da0122d89735fdb63d95..34ca2244b3abfaa4c620eb688b311578f7539040 100644 (file)
@@ -196,13 +196,13 @@ void DEG_add_special_eval_flag(Depsgraph *graph, ID *id, short flag)
 /* Build depsgraph for the given scene layer, and dump results in given
  * graph container.
  */
-void DEG_graph_build_from_scene_layer(Depsgraph *graph,
+void DEG_graph_build_from_view_layer(Depsgraph *graph,
                                       Main *bmain,
                                       Scene *scene,
-                                      SceneLayer *scene_layer)
+                                      ViewLayer *view_layer)
 {
 #ifdef DEBUG_TIME
-       TIMEIT_START(DEG_graph_build_from_scene_layer);
+       TIMEIT_START(DEG_graph_build_from_view_layer);
 #endif
 
        DEG::Depsgraph *deg_graph = reinterpret_cast<DEG::Depsgraph *>(graph);
@@ -218,8 +218,8 @@ void DEG_graph_build_from_scene_layer(Depsgraph *graph,
        /* 1) Generate all the nodes in the graph first */
        DEG::DepsgraphNodeBuilder node_builder(bmain, deg_graph);
        node_builder.begin_build();
-       node_builder.build_scene_layer(scene,
-                                      scene_layer,
+       node_builder.build_view_layer(scene,
+                                      view_layer,
                                       DEG::DEG_ID_LINKED_DIRECTLY);
 
        /* 2) Hook up relationships between operations - to determine evaluation
@@ -227,7 +227,7 @@ void DEG_graph_build_from_scene_layer(Depsgraph *graph,
         */
        DEG::DepsgraphRelationBuilder relation_builder(bmain, deg_graph);
        relation_builder.begin_build();
-       relation_builder.build_scene_layer(scene, scene_layer);
+       relation_builder.build_view_layer(scene, view_layer);
        if (DEG_depsgraph_use_copy_on_write()) {
                relation_builder.build_copy_on_write_relations();
        }
@@ -255,7 +255,7 @@ void DEG_graph_build_from_scene_layer(Depsgraph *graph,
 #endif
 
 #ifdef DEBUG_TIME
-       TIMEIT_END(DEG_graph_build_from_scene_layer);
+       TIMEIT_END(DEG_graph_build_from_view_layer);
 #endif
 
        /* Relations are up to date. */
@@ -277,14 +277,14 @@ void DEG_graph_tag_relations_update(Depsgraph *graph)
 void DEG_graph_relations_update(Depsgraph *graph,
                                 Main *bmain,
                                 Scene *scene,
-                                SceneLayer *scene_layer)
+                                ViewLayer *view_layer)
 {
        DEG::Depsgraph *deg_graph = (DEG::Depsgraph *)graph;
        if (!deg_graph->need_update) {
                /* Graph is up to date, nothing to do. */
                return;
        }
-       DEG_graph_build_from_scene_layer(graph, bmain, scene, scene_layer);
+       DEG_graph_build_from_view_layer(graph, bmain, scene, view_layer);
 }
 
 /* Tag all relations for update. */
@@ -292,10 +292,10 @@ void DEG_relations_tag_update(Main *bmain)
 {
        DEG_DEBUG_PRINTF("%s: Tagging relations for update.\n", __func__);
        LINKLIST_FOREACH(Scene *, scene, &bmain->scene) {
-               LINKLIST_FOREACH(SceneLayer *, scene_layer, &scene->render_layers) {
+               LINKLIST_FOREACH(ViewLayer *, view_layer, &scene->view_layers) {
                        Depsgraph *depsgraph =
                                (Depsgraph *)BKE_scene_get_depsgraph(scene,
-                                                                    scene_layer,
+                                                                    view_layer,
                                                                     false);
                        if (depsgraph != NULL) {
                                DEG_graph_tag_relations_update(depsgraph);