replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid...
[blender.git] / source / blender / makesrna / intern / rna_image_api.c
index 09af7fe1c5b545a3cceef99307f627b1346c0655..91aa9daac2549d2f67b7ac6f3e20d7e1dbe69f33 100644 (file)
@@ -82,14 +82,14 @@ static void rna_Image_save_render(Image *image, bContext *C, ReportList *reports
                }
                else {
                        /* temp swap out the color */
-                       const unsigned char imb_depth_back= ibuf->depth;
+                       const unsigned char imb_planes_back= ibuf->planes;
                        const float dither_back= ibuf->dither; 
-                       ibuf->depth= scene->r.im_format.planes;
+                       ibuf->planes= scene->r.im_format.planes;
                        ibuf->dither= scene->r.dither_intensity;
                        if (!BKE_write_ibuf(ibuf, path, &scene->r.im_format)) {
                                BKE_reportf(reports, RPT_ERROR, "Couldn't write image: %s", path);
                        }
-                       ibuf->depth= imb_depth_back;
+                       ibuf->planes= imb_planes_back;
                        ibuf->dither= dither_back;
                }