Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-11-22 00:47:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-11-22 00:47:19 +0400
commit30fd1ab523393216a66a7debb7e42ec39e40a242 (patch)
treea3ce9ca35b4f177f0dd31e62691a4613b242aaae /source/blender/makesrna
parent02a164baaa57ab037419fde864e02d6a432e858d (diff)
replace ImBuf.depth with ImBuf.planes to match ImageFormatData.planes & to avoid confusion with ImageFormatData.depth
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_image.c10
-rw-r--r--source/blender/makesrna/intern/rna_image_api.c6
-rw-r--r--source/blender/makesrna/intern/rna_scene.c12
3 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index ad6f459f851..737ce73ff1d 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -258,20 +258,20 @@ static int rna_Image_depth_get(PointerRNA *ptr)
Image *im= (Image*)ptr->data;
ImBuf *ibuf;
void *lock;
- int depth;
+ int planes;
ibuf= BKE_image_acquire_ibuf(im, NULL, &lock);
if(!ibuf)
- depth= 0;
+ planes= 0;
else if(ibuf->rect_float)
- depth= ibuf->depth * 4;
+ planes= ibuf->planes * 4;
else
- depth= ibuf->depth;
+ planes= ibuf->planes;
BKE_image_release_ibuf(im, lock);
- return depth;
+ return planes;
}
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
diff --git a/source/blender/makesrna/intern/rna_image_api.c b/source/blender/makesrna/intern/rna_image_api.c
index 09af7fe1c5b..91aa9daac25 100644
--- a/source/blender/makesrna/intern/rna_image_api.c
+++ b/source/blender/makesrna/intern/rna_image_api.c
@@ -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;
}
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index e862652e9fb..8dcab8f5b04 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -208,9 +208,9 @@ EnumPropertyItem image_type_items[] = {
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem image_color_mode_items[] ={
- {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
- {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
- {R_PLANES32, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_IMF_PLANES_RGBA, "RGBA", 0, "RGBA", "Images are saved with RGB and Alpha data (if supported)"},
{0, NULL, 0, NULL, NULL}};
EnumPropertyItem image_color_depth_items[] = {
@@ -616,7 +616,7 @@ static void rna_ImageFormatSettings_file_format_set(PointerRNA *ptr, int value)
/* ensure depth and color settings match */
if (!BKE_imtype_is_alpha_ok(imf->imtype)) {
- imf->planes= R_PLANES24;
+ imf->planes= R_IMF_PLANES_RGB;
}
/* ensure usable depth */
@@ -677,8 +677,8 @@ static EnumPropertyItem *rna_ImageFormatSettings_color_mode_itemf(bContext *C, P
}
else {
static EnumPropertyItem color_mode_items[] ={
- {R_PLANESBW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
- {R_PLANES24, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
+ {R_IMF_PLANES_BW, "BW", 0, "BW", "Images get saved in 8 bits grayscale (only PNG, JPEG, TGA, TIF)"},
+ {R_IMF_PLANES_RGB, "RGB", 0, "RGB", "Images are saved with RGB (color) data"},
{0, NULL, 0, NULL, NULL}};
return color_mode_items;
}