diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-09 13:55:41 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-09 13:55:41 +0300 |
commit | f0aceff1966f76fdf32420b9e319eaa5341c364d (patch) | |
tree | 84c0892156689ff3c9d4f578856b3602aa5bc103 /source/blender/src/toets.c | |
parent | c693e01b8d9bd9af629b0fc8abab0a42a810c177 (diff) |
Orange: Further cleanup of EXR saving
- F10 scene buttons now has options "half" and "zbuf" for exr saving.
Note: when no float buffer is available, it always saves as "half",
that's sufficient anyway, since half is 16 bits per channel.
- EXR in imbuf now uses compliant ibuf->ftype flags for denoting exr
extensions such as 'half' and 'compression'.
- Removed ugly blenkernel dependency from exr module
Diffstat (limited to 'source/blender/src/toets.c')
-rw-r--r-- | source/blender/src/toets.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 8fc3f740a0b..62f31f7f585 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -191,9 +191,8 @@ void schrijfplaatje(char *name) else if(R.r.imtype==R_IRIZ) { ibuf->ftype= IMAGIC; if (ibuf->zbuf == 0) { - if (R.rectz) { + if (R.rectz) ibuf->zbuf = (int *)R.rectz; - } else printf("no zbuf\n"); } } @@ -211,7 +210,15 @@ void schrijfplaatje(char *name) } #ifdef WITH_OPENEXR else if(R.r.imtype==R_OPENEXR) { + /* ibuf stores bitmasks for types */ ibuf->ftype= OPENEXR; + if(R.r.subimtype & R_OPENEXR_HALF) + ibuf->ftype |= OPENEXR_HALF; + + ibuf->ftype |= (R.r.quality & OPENEXR_COMPRESS); + + if(R.rectz && (R.r.subimtype & R_OPENEXR_ZBUF)) + ibuf->zbuf = (int *)R.rectz; } #endif else if((R.r.imtype==R_TARGA) || (R.r.imtype==R_PNG)) { @@ -533,6 +540,7 @@ void BIF_save_rendered_image(void) } R.r.imtype= G.scene->r.imtype; + R.r.subimtype= G.scene->r.subimtype; R.r.quality= G.scene->r.quality; R.r.planes= G.scene->r.planes; |