Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / windowmanager / intern / wm_operators.c
index 7785278d77f7c72c599a23f047448905af302828..bb640cbafe13adbbd099a2897ce8585f96b210c7 100644 (file)
@@ -3240,7 +3240,7 @@ static const EnumPropertyItem redraw_timer_type_items[] = {
 
 
 static void redraw_timer_step(
-        bContext *C, Main *bmain, Scene *scene, SceneLayer *scene_layer,
+        bContext *C, Main *bmain, Scene *scene, ViewLayer *view_layer,
         struct Depsgraph *depsgraph,
         wmWindow *win, ScrArea *sa, ARegion *ar,
         const int type, const int cfra)
@@ -3288,7 +3288,7 @@ static void redraw_timer_step(
        }
        else if (type == eRTAnimationStep) {
                scene->r.cfra += (cfra == scene->r.cfra) ? 1 : -1;
-               BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer);
+               BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, view_layer);
        }
        else if (type == eRTAnimationPlay) {
                /* play anim, return on same frame as started with */
@@ -3300,7 +3300,7 @@ static void redraw_timer_step(
                        if (scene->r.cfra > scene->r.efra)
                                scene->r.cfra = scene->r.sfra;
 
-                       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, scene_layer);
+                       BKE_scene_graph_update_for_newframe(bmain->eval_ctx, depsgraph, bmain, scene, view_layer);
                        redraw_timer_window_swap(C);
                }
        }
@@ -3314,7 +3314,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
 {
        Main *bmain = CTX_data_main(C);
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *scene_layer = CTX_data_scene_layer(C);
+       ViewLayer *view_layer = CTX_data_view_layer(C);
        wmWindow *win = CTX_wm_window(C);
        ScrArea *sa = CTX_wm_area(C);
        ARegion *ar = CTX_wm_region(C);
@@ -3332,7 +3332,7 @@ static int redraw_timer_exec(bContext *C, wmOperator *op)
        time_start = PIL_check_seconds_timer();
 
        for (a = 0; a < iter; a++) {
-               redraw_timer_step(C, bmain, scene, scene_layer, depsgraph, win, sa, ar, type, cfra);
+               redraw_timer_step(C, bmain, scene, view_layer, depsgraph, win, sa, ar, type, cfra);
                iter_steps += 1;
 
                if (time_limit != 0.0) {