Rename any instance of scene layer or render layer in code with view layer
[blender.git] / source / blender / editors / sculpt_paint / paint_image_proj.c
index 2f4a28963feffbc83ae5ee5b3ba8e1802c4a37a6..9ff848783f3939f7ede6c950938f051d71586904 100644 (file)
@@ -5321,7 +5321,7 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
 {
        Image *image = BLI_findlink(&CTX_data_main(C)->image, RNA_enum_get(op->ptr, "image"));
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *sl = CTX_data_scene_layer(C);
+       ViewLayer *sl = CTX_data_view_layer(C);
        ProjPaintState ps = {NULL};
        int orig_brush_size;
        IDProperty *idgroup;
@@ -5455,7 +5455,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
        char filename[FILE_MAX];
 
        Scene *scene = CTX_data_scene(C);
-       SceneLayer *scene_layer = CTX_data_scene_layer(C);
+       ViewLayer *view_layer = CTX_data_view_layer(C);
        EvaluationContext eval_ctx;
        ToolSettings *settings = scene->toolsettings;
        int w = settings->imapaint.screen_grab_size[0];
@@ -5473,7 +5473,7 @@ static int texture_paint_image_from_view_exec(bContext *C, wmOperator *op)
        if (h > maxsize) h = maxsize;
 
        ibuf = ED_view3d_draw_offscreen_imbuf(
-               &eval_ctx, scene, scene_layer, CTX_wm_view3d(C), CTX_wm_region(C),
+               &eval_ctx, scene, view_layer, CTX_wm_view3d(C), CTX_wm_region(C),
                w, h, IB_rect, false, R_ALPHAPREMUL, 0, false, NULL,
                NULL, NULL, err_out);
        if (!ibuf) {