diff options
author | Kent Mein <mein@cs.umn.edu> | 2005-03-11 23:16:14 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2005-03-11 23:16:14 +0300 |
commit | a1919e6db4e20f1ab16646d3cbb273f569af23e1 (patch) | |
tree | 60642648c9d0b35a1c8f81bf96bdb7c60acba2d7 /source/blender/src/toets.c | |
parent | c6d51245604b8c1bb329f5362ad528cc6f31c085 (diff) |
Gernot Ziegler's patch to add OpenEXR support to blender.
To enable it you will need to download OpenEXR and install it.
For the Makefiles you will need to set WITH_OPENEXR=true
and set NAN_OPENEXR to point to where OpenEXR is installed.
For scons you'll need to remove config.opts to get the new options
so you can enable OpenEXR, I was not able to get blender to link
with scons so the scons stuff may need to be tweaked a little but
I think it should work.
For other platform managers The OpenEXR stuff is similar to QUICKTIME
you need to define WITH_OPENEXR and setup the library stuff and
as you'll notice in this commit there are two extra files.
Kent
Diffstat (limited to 'source/blender/src/toets.c')
-rw-r--r-- | source/blender/src/toets.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index 9118a35e53b..752f4359365 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -38,10 +38,6 @@ #include <string.h> #include <math.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef WIN32 #include "BLI_winstuff.h" #endif @@ -177,6 +173,7 @@ void schrijfplaatje(char *name) if(ibuf) { ibuf->rect= (unsigned int *) R.rectot; + ibuf->rect_float = R.rectftot; if(R.r.planes == 8) IMB_cspace(ibuf, rgb_to_bw); @@ -195,6 +192,17 @@ void schrijfplaatje(char *name) else if(R.r.imtype==R_PNG) { ibuf->ftype= PNG; } +#ifdef WITH_OPENEXR + else if(R.r.imtype==R_OPENEXR) { + ibuf->ftype= OPENEXR; + if (ibuf->zbuf == 0) { + if (R.rectz) { + ibuf->zbuf = (int *)R.rectz; + } + else printf("Write OPENEXR: no zbuf !\n"); + } + } +#endif else if(R.r.imtype==R_BMP) { ibuf->ftype= BMP; } @@ -474,6 +482,8 @@ int save_image_filesel_str(char *str) switch(G.scene->r.imtype) { case R_PNG: strcpy(str, "Save PNG"); return 1; + case R_OPENEXR: + strcpy(str, "Save OPENEXR"); return 1; case R_BMP: strcpy(str, "Save BMP"); return 1; case R_TARGA: |