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/imbuf/intern/openexr/openexr_api.cpp
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/imbuf/intern/openexr/openexr_api.cpp')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index ff6f55a777b..cd9701cf7e7 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -391,7 +391,7 @@ static bool imb_save_openexr_half(ImBuf *ibuf, const char *name, const int flags
{
Header header(width, height);
- openexr_header_compression(&header, ibuf->ftype & OPENEXR_COMPRESS);
+ openexr_header_compression(&header, ibuf->foptions.flag & OPENEXR_COMPRESS);
openexr_header_metadata(&header, ibuf);
/* create views when possible */
@@ -508,7 +508,7 @@ static bool imb_save_openexr_float(ImBuf *ibuf, const char *name, const int flag
{
Header header(width, height);
- openexr_header_compression(&header, ibuf->ftype & OPENEXR_COMPRESS);
+ openexr_header_compression(&header, ibuf->foptions.flag & OPENEXR_COMPRESS);
openexr_header_metadata(&header, ibuf);
/* create views when possible */
@@ -580,7 +580,7 @@ int imb_save_openexr(struct ImBuf *ibuf, const char *name, int flags)
return(0);
}
- if (ibuf->ftype & OPENEXR_HALF)
+ if (ibuf->foptions.flag & OPENEXR_HALF)
return (int) imb_save_openexr_half(ibuf, name, flags, 1, NULL, NULL);
else {
/* when no float rect, we save as half (16 bits is sufficient) */
@@ -602,7 +602,7 @@ static bool imb_save_openexr_multiview(ImBuf *ibuf, const char *name, const int
return false;
}
- if (ibuf->ftype & OPENEXR_HALF)
+ if (ibuf->foptions.flag & OPENEXR_HALF)
return imb_save_openexr_half(ibuf, name, flags, totviews, getview, getbuffer);
else {
/* when no float rect, we save as half (16 bits is sufficient) */
@@ -1944,7 +1944,7 @@ struct ImBuf *imb_load_openexr(const unsigned char *mem, size_t size, int flags,
ibuf->ppm[1] = ibuf->ppm[0] * (double)file->header(0).pixelAspectRatio();
}
- ibuf->ftype = OPENEXR;
+ ibuf->ftype = IMB_FTYPE_OPENEXR;
if (!(flags & IB_test)) {