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:
authorAntony Riakiotakis <kalast@gmail.com>2015-07-13 14:58:17 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-07-13 14:58:17 +0300
commite142ae77cadf04103fbc643f21cf60891862f6a8 (patch)
tree142e25fccd5ba3e748a1652706e7e4f1220ca289 /source/blender/makesrna/intern/rna_image.c
parent107bbee4c763c95ea5d07a3b2f08bfe3b6adb24c (diff)
Imbuf types refactor.
ImBuf types were getting stored as bitflags in a 32bit integer which had already run out of space. Solved the problem by separating file type to an ftype enum, and file specific options to foptions. Reviewed by Campbell, thanks a lot!
Diffstat (limited to 'source/blender/makesrna/intern/rna_image.c')
-rw-r--r--source/blender/makesrna/intern/rna_image.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_image.c b/source/blender/makesrna/intern/rna_image.c
index 8b464e74569..0d0b440ec08 100644
--- a/source/blender/makesrna/intern/rna_image.c
+++ b/source/blender/makesrna/intern/rna_image.c
@@ -211,7 +211,7 @@ static int rna_Image_file_format_get(PointerRNA *ptr)
{
Image *image = (Image *)ptr->data;
ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, NULL);
- int imtype = BKE_image_ftype_to_imtype(ibuf ? ibuf->ftype : 0);
+ int imtype = BKE_image_ftype_to_imtype(ibuf ? ibuf->ftype : 0, ibuf ? &ibuf->foptions : NULL);
BKE_image_release_ibuf(image, ibuf, NULL);
@@ -222,8 +222,9 @@ static void rna_Image_file_format_set(PointerRNA *ptr, int value)
{
Image *image = (Image *)ptr->data;
if (BKE_imtype_is_movie(value) == 0) { /* should be able to throw an error here */
- int ftype = BKE_image_imtype_to_ftype(value);
- BKE_image_file_format_set(image, ftype);
+ ImbFormatOptions options;
+ int ftype = BKE_image_imtype_to_ftype(value, &options);
+ BKE_image_file_format_set(image, ftype, &options);
}
}