Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / blenkernel / intern / sequencer.c
index 3e1ebc2a05727844b4cd56e3e5c743e7aa11c9c5..a83eba145c93ef83f6c69657627a705629c87ebb 100644 (file)
@@ -3263,8 +3263,8 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
        have_comp = (scene->r.scemode & R_DOCOMP) && scene->use_nodes && scene->nodetree;
 
        /* Get depsgraph and scene layer for the strip. */
-       SceneLayer *scene_layer = BKE_scene_layer_from_scene_get(scene);
-       Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, scene_layer, true);
+       ViewLayer *view_layer = BKE_view_layer_from_scene_get(scene);
+       Depsgraph *depsgraph = BKE_scene_get_depsgraph(scene, view_layer, true);
 
        orig_data.scemode = scene->r.scemode;
        orig_data.cfra = scene->r.cfra;
@@ -3315,10 +3315,10 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
 
                /* opengl offscreen render */
                context->eval_ctx->engine = RE_engines_find(scene->view_render.engine_id);
-               BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, scene_layer);
+               BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, view_layer);
                ibuf = sequencer_view3d_cb(
                        /* set for OpenGL render (NULL when scrubbing) */
-                       context->eval_ctx, scene, scene_layer, camera, width, height, IB_rect,
+                       context->eval_ctx, scene, view_layer, camera, width, height, IB_rect,
                        context->scene->r.seq_prev_type,
                        (context->scene->r.seq_flag & R_SEQ_SOLID_TEX) != 0,
                        use_gpencil, use_background, scene->r.alphamode,
@@ -3355,7 +3355,7 @@ static ImBuf *seq_render_scene_strip(const SeqRenderData *context, Sequence *seq
                        RE_SetDepsgraph(re, depsgraph);
                        DEG_graph_id_tag_update(context->bmain, depsgraph, &scene->id, 0);
 
-                       BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, scene_layer);
+                       BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, view_layer);
                        RE_BlenderFrame(re, context->bmain, scene, NULL, camera, scene->lay, frame, false);
 
                        /* restore previous state after it was toggled on & off by RE_BlenderFrame */
@@ -3415,7 +3415,7 @@ finally:
        scene->r.subframe = orig_data.subframe;
 
        if (is_frame_update) {
-               BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, scene_layer);
+               BKE_scene_graph_update_for_newframe(context->eval_ctx, depsgraph, context->bmain, scene, view_layer);
        }
 
 #ifdef DURIAN_CAMERA_SWITCH