diff options
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/Makefile | 4 | ||||
-rw-r--r-- | source/blender/src/buttons_scene.c | 13 | ||||
-rw-r--r-- | source/blender/src/toets.c | 18 | ||||
-rwxr-xr-x | source/blender/src/transform_generics.c | 3 | ||||
-rw-r--r-- | source/blender/src/writeimage.c | 9 |
5 files changed, 34 insertions, 13 deletions
diff --git a/source/blender/src/Makefile b/source/blender/src/Makefile index 210ed7d7320..7755c8cf707 100644 --- a/source/blender/src/Makefile +++ b/source/blender/src/Makefile @@ -111,6 +111,10 @@ ifeq ($(WITH_QUICKTIME),true) CPPFLAGS += -DWITH_QUICKTIME endif +ifeq ($(WITH_OPENEXR),true) + CPPFLAGS += -DWITH_OPENEXR +endif + ifeq ($(INTERNATIONAL), true) CPPFLAGS += -DINTERNATIONAL endif diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c index 522fa23b7a7..8702f320c6c 100644 --- a/source/blender/src/buttons_scene.c +++ b/source/blender/src/buttons_scene.c @@ -35,10 +35,6 @@ #include <stdlib.h> #include <string.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - #ifdef WIN32 #include "BLI_winstuff.h" #endif @@ -958,6 +954,9 @@ static char *imagetype_pup(void) #endif strcat(formatstring, "|%s %%x%d"); // add space for PNG +#ifdef WITH_OPENEXR + strcat(formatstring, "|%s %%x%d"); // add space for OpenEXR +#endif strcat(formatstring, "|%s %%x%d"); // add space for BMP #ifdef _WIN32 @@ -982,6 +981,9 @@ static char *imagetype_pup(void) "Targa", R_TARGA, "Targa Raw", R_RAWTGA, "PNG", R_PNG, +#ifdef WITH_OPENEXR + "OpenEXR", R_OPENEXR, +#endif "BMP", R_BMP, "Jpeg", R_JPEG90, "HamX", R_HAMX, @@ -1000,6 +1002,9 @@ static char *imagetype_pup(void) "Targa", R_TARGA, "Targa Raw", R_RAWTGA, "PNG", R_PNG, +#ifdef WITH_OPENEXR + "OpenEXR", R_OPENEXR, +#endif "BMP", R_BMP, "Jpeg", R_JPEG90, "HamX", R_HAMX, 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: diff --git a/source/blender/src/transform_generics.c b/source/blender/src/transform_generics.c index 005ae9fda15..d6c211d122d 100755 --- a/source/blender/src/transform_generics.c +++ b/source/blender/src/transform_generics.c @@ -684,4 +684,5 @@ void calculatePropRatio(TransInfo *t) TransInfo * BIF_GetTransInfo() { return &Trans; -}
\ No newline at end of file +} + diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c index 75b215f70bd..d16247a70b2 100644 --- a/source/blender/src/writeimage.c +++ b/source/blender/src/writeimage.c @@ -44,10 +44,6 @@ #include "render.h" // RE_make_existing_file, R. stuff -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - int BIF_write_ibuf(ImBuf *ibuf, char *name) { int ok; @@ -61,6 +57,11 @@ int BIF_write_ibuf(ImBuf *ibuf, char *name) else if ((G.scene->r.imtype==R_BMP)) { ibuf->ftype= BMP; } +#ifdef WITH_OPENEXR + else if ((G.scene->r.imtype==R_OPENEXR)) { + ibuf->ftype= OPENEXR; + } +#endif else if ((G.scene->r.imtype==R_TARGA) || (G.scene->r.imtype==R_PNG)) { // fall back to Targa if PNG writing is not supported ibuf->ftype= TGA; |