From 957976882d084d9951760b154f414724d6ddb8be Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 3 Aug 2010 11:25:34 +0000 Subject: build options to disable image formats WITH_CINEON, WITH_HDR. - updated cmake, make & scons. - renamed CMake build options WITH_TIFF -> WITH_IMAGE_TIFF, same for DDS, OPENJPEG etc. --- source/Makefile | 4 +++- source/blender/CMakeLists.txt | 13 ++++++---- source/blender/SConscript | 4 +++- source/blender/blenkernel/CMakeLists.txt | 28 ++++++++++++++-------- source/blender/blenkernel/SConscript | 6 +++++ source/blender/blenkernel/intern/Makefile | 8 +++++++ source/blender/blenkernel/intern/image.c | 27 +++++++++++++++++++-- source/blender/editors/physics/CMakeLists.txt | 4 ++-- source/blender/editors/space_file/CMakeLists.txt | 24 ++++++++++++------- source/blender/editors/space_file/Makefile | 7 ++++++ source/blender/editors/space_file/filelist.c | 12 ++++++++++ source/blender/editors/space_file/writeimage.c | 7 +++--- source/blender/editors/space_image/CMakeLists.txt | 8 +++---- source/blender/editors/space_image/Makefile | 7 ++++++ source/blender/editors/space_image/image_ops.c | 4 ++++ source/blender/imbuf/CMakeLists.txt | 24 ++++++++++++------- source/blender/imbuf/IMB_imbuf_types.h | 6 +++++ source/blender/imbuf/SConscript | 6 +++++ source/blender/imbuf/intern/Makefile | 11 ++++++++- source/blender/imbuf/intern/dds/CMakeLists.txt | 4 ++-- source/blender/imbuf/intern/filetype.c | 4 ++++ source/blender/imbuf/intern/openexr/CMakeLists.txt | 4 ++-- source/blender/imbuf/intern/radiance_hdr.c | 3 +++ source/blender/imbuf/intern/util.c | 10 ++++++++ source/blender/makesdna/DNA_scene_types.h | 4 ++-- source/blender/makesrna/SConscript | 6 +++++ source/blender/makesrna/intern/CMakeLists.txt | 28 ++++++++++++++-------- source/blender/makesrna/intern/Makefile | 8 +++++++ source/blender/makesrna/intern/SConscript | 6 +++++ source/blender/makesrna/intern/rna_scene.c | 4 ++++ source/blender/modifiers/CMakeLists.txt | 4 ++-- source/blender/render/CMakeLists.txt | 4 ++-- source/blenderplayer/CMakeLists.txt | 2 +- source/creator/CMakeLists.txt | 24 ++++++++++++++----- source/creator/Makefile | 8 +++++++ source/creator/creator.c | 4 ++++ 36 files changed, 265 insertions(+), 72 deletions(-) (limited to 'source') diff --git a/source/Makefile b/source/Makefile index 12e47ba5863..e0c39bff368 100644 --- a/source/Makefile +++ b/source/Makefile @@ -204,7 +204,9 @@ ifeq ($(WITH_OPENJPEG), true) endif endif -COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a +ifeq ($(WITH_CINEON), true) + COMLIB += $(OCGDIR)/blender/imbuf/cineon/$(DEBUG_DIR)libcineon.a +endif ifeq ($(WITH_DDS), true) COMLIB += $(OCGDIR)/blender/imbuf/dds/$(DEBUG_DIR)libdds.a diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 16437737302..96d1ce3e8b2 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -34,7 +34,6 @@ ADD_SUBDIRECTORY(blenlib) ADD_SUBDIRECTORY(blenloader) ADD_SUBDIRECTORY(blenpluginapi) ADD_SUBDIRECTORY(imbuf) -ADD_SUBDIRECTORY(imbuf/intern/cineon) ADD_SUBDIRECTORY(gpu) ADD_SUBDIRECTORY(makesdna) ADD_SUBDIRECTORY(makesrna) @@ -43,13 +42,17 @@ ADD_SUBDIRECTORY(render) ADD_SUBDIRECTORY(blenfont) ADD_SUBDIRECTORY(ikplugin) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_SUBDIRECTORY(imbuf/intern/openexr) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_DDS) +IF(WITH_IMAGE_DDS) ADD_SUBDIRECTORY(imbuf/intern/dds) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_SUBDIRECTORY(imbuf/intern/cineon) +ENDIF(WITH_IMAGE_CINEON) IF(WITH_QUICKTIME) ADD_SUBDIRECTORY(quicktime) diff --git a/source/blender/SConscript b/source/blender/SConscript index 98e8ad73199..549725a57a0 100644 --- a/source/blender/SConscript +++ b/source/blender/SConscript @@ -10,7 +10,6 @@ SConscript(['avi/SConscript', 'gpu/SConscript', 'editors/SConscript', 'imbuf/SConscript', - 'imbuf/intern/cineon/SConscript', 'makesdna/SConscript', 'makesrna/SConscript', 'readblenfile/SConscript', @@ -29,6 +28,9 @@ if env['WITH_BF_PYTHON']: if env['WITH_BF_DDS']: SConscript (['imbuf/intern/dds/SConscript']) +if env['WITH_BF_CINEON']: + SConscript (['imbuf/intern/cineon/SConscript']) + if env['WITH_BF_OPENEXR']: SConscript (['imbuf/intern/openexr/SConscript']) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index bcd60154379..fbd75a79fd7 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -46,21 +46,29 @@ IF(WITH_BULLET) ADD_DEFINITIONS(-DUSE_BULLET) ENDIF(WITH_BULLET) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) -IF(WITH_OPENJPEG) +IF(WITH_IMAGE_OPENJPEG) ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_OPENJPEG) +ENDIF(WITH_IMAGE_OPENJPEG) -IF(WITH_DDS) +IF(WITH_IMAGE_DDS) ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + +IF(WITH_IMAGE_HDR) + ADD_DEFINITIONS(-DWITH_HDR) +ENDIF(WITH_IMAGE_HDR) IF(WITH_QUICKTIME) SET(INC ${INC} ../quicktime ${QUICKTIME_INC}) @@ -87,9 +95,9 @@ IF(WITH_OPENMP) ADD_DEFINITIONS(-DPARALLEL=1) ENDIF(WITH_OPENMP) -IF(NOT WITH_ELBEEM) +IF(NOT WITH_FLUID) ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_ELBEEM) +ENDIF(NOT WITH_FLUID) IF(WITH_LZO) SET(INC ${INC} ../../../extern/lzo/minilzo) diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript index a6705653769..9f5027f801d 100644 --- a/source/blender/blenkernel/SConscript +++ b/source/blender/blenkernel/SConscript @@ -47,6 +47,12 @@ if env['WITH_BF_OPENJPEG']: if env['WITH_BF_DDS']: defs.append('WITH_DDS') +if env['WITH_BF_CINEON']: + defs.append('WITH_CINEON') + +if env['WITH_BF_HDR']: + defs.append('WITH_HDR') + if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') incs += ' ' + env['BF_FFMPEG_INC'] diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile index 15c022592f9..7a4eb52326a 100644 --- a/source/blender/blenkernel/intern/Makefile +++ b/source/blender/blenkernel/intern/Makefile @@ -136,6 +136,14 @@ ifeq ($(WITH_TIFF), true) CPPFLAGS += -DWITH_TIFF endif +ifeq ($(WITH_CINEON), true) + CPPFLAGS += -DWITH_CINEON +endif + +ifeq ($(WITH_HDR), true) + CPPFLAGS += -DWITH_HDR +endif + ifeq ($(OS), darwin) ifeq ($(WITH_BF_OPENMP), true) CPPFLAGS += -DPARALLEL=1 diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c index 77607ae25b6..d2612e90945 100644 --- a/source/blender/blenkernel/intern/image.c +++ b/source/blender/blenkernel/intern/image.c @@ -660,8 +660,10 @@ int BKE_imtype_to_ftype(int imtype) return TGA; else if(imtype== R_IRIS) return IMAGIC; +#ifdef WITH_HDR else if (imtype==R_RADHDR) return RADHDR; +#endif else if (imtype==R_PNG) return PNG; #ifdef WITH_DDS @@ -670,14 +672,18 @@ int BKE_imtype_to_ftype(int imtype) #endif else if (imtype==R_BMP) return BMP; +#ifdef WITH_TIFF else if (imtype==R_TIFF) return TIF; +#endif else if (imtype==R_OPENEXR || imtype==R_MULTILAYER) return OPENEXR; +#ifdef WITH_CINEON else if (imtype==R_CINEON) return CINEON; else if (imtype==R_DPX) return DPX; +#endif else if (imtype==R_TARGA) return TGA; else if(imtype==R_RAWTGA) @@ -696,8 +702,10 @@ int BKE_ftype_to_imtype(int ftype) return TGA; else if(ftype == IMAGIC) return R_IRIS; +#ifdef WITH_HDR else if (ftype & RADHDR) return R_RADHDR; +#endif else if (ftype & PNG) return R_PNG; #ifdef WITH_DDS @@ -706,14 +714,18 @@ int BKE_ftype_to_imtype(int ftype) #endif else if (ftype & BMP) return R_BMP; +#ifdef WITH_TIFF else if (ftype & TIF) return R_TIFF; +#endif else if (ftype & OPENEXR) return R_OPENEXR; +#ifdef WITH_CINEON else if (ftype & CINEON) return R_CINEON; else if (ftype & DPX) return R_DPX; +#endif else if (ftype & TGA) return R_TARGA; else if(ftype & RAWTGA) @@ -756,10 +768,12 @@ void BKE_add_image_extension(char *string, int imtype) if(!BLI_testextensie(string, ".rgb")) extension= ".rgb"; } +#ifdef WITH_HDR else if(imtype==R_RADHDR) { if(!BLI_testextensie(string, ".hdr")) extension= ".hdr"; } +#endif else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { if(!BLI_testextensie(string, ".png")) extension= ".png"; @@ -790,6 +804,7 @@ void BKE_add_image_extension(char *string, int imtype) extension= ".exr"; } #endif +#ifdef WITH_CINEON else if(imtype==R_CINEON){ if (!BLI_testextensie(string, ".cin")) extension= ".cin"; @@ -798,6 +813,7 @@ void BKE_add_image_extension(char *string, int imtype) if (!BLI_testextensie(string, ".dpx")) extension= ".dpx"; } +#endif else if(imtype==R_TARGA) { if(!BLI_testextensie(string, ".tga")) extension= ".tga"; @@ -1180,12 +1196,17 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt { int ok; - if(imtype==0); - else if(imtype== R_IRIS) + if(imtype==0) { + /* pass */ + } + else if(imtype== R_IRIS) { ibuf->ftype= IMAGIC; + } +#ifdef WITH_HDR else if ((imtype==R_RADHDR)) { ibuf->ftype= RADHDR; } +#endif else if (ELEM5(imtype, R_PNG, R_FFMPEG, R_H264, R_THEORA, R_XVID)) { ibuf->ftype= PNG; @@ -1221,12 +1242,14 @@ int BKE_write_ibuf(Scene *scene, ImBuf *ibuf, char *name, int imtype, int subimt } #endif +#ifdef WITH_CINEON else if (imtype==R_CINEON) { ibuf->ftype = CINEON; } else if (imtype==R_DPX) { ibuf->ftype = DPX; } +#endif else if (imtype==R_TARGA) { ibuf->ftype= TGA; } diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt index ebe3f913508..be826654311 100644 --- a/source/blender/editors/physics/CMakeLists.txt +++ b/source/blender/editors/physics/CMakeLists.txt @@ -32,9 +32,9 @@ SET(INC ../../../../intern/guardedalloc ) -IF(NOT WITH_ELBEEM) +IF(NOT WITH_FLUID) ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_ELBEEM) +ENDIF(NOT WITH_FLUID) IF(WITH_OPENMP) ADD_DEFINITIONS(-DPARALLEL=1) diff --git a/source/blender/editors/space_file/CMakeLists.txt b/source/blender/editors/space_file/CMakeLists.txt index 021e25953b0..5cbe9bbe0ba 100644 --- a/source/blender/editors/space_file/CMakeLists.txt +++ b/source/blender/editors/space_file/CMakeLists.txt @@ -36,21 +36,29 @@ SET(INC ../../windowmanager ) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) -IF(WITH_OPENJPEG) +IF(WITH_IMAGE_OPENJPEG) ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_OPENJPEG) +ENDIF(WITH_IMAGE_OPENJPEG) -IF(WITH_DDS) +IF(WITH_IMAGE_DDS) ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + +IF(WITH_IMAGE_HDR) + ADD_DEFINITIONS(-DWITH_HDR) +ENDIF(WITH_IMAGE_HDR) IF(WIN32) SET(INC ${INC} ${PTHREADS_INC}) diff --git a/source/blender/editors/space_file/Makefile b/source/blender/editors/space_file/Makefile index 29548b51222..48f6879b029 100644 --- a/source/blender/editors/space_file/Makefile +++ b/source/blender/editors/space_file/Makefile @@ -67,3 +67,10 @@ ifeq ($(WITH_TIFF), true) CPPFLAGS += -DWITH_TIFF endif +ifeq ($(WITH_CINEON), true) + CPPFLAGS += -DWITH_CINEON +endif + +ifeq ($(WITH_HDR), true) + CPPFLAGS += -DWITH_HDR +endif \ No newline at end of file diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index f31b8a4b05f..a6668d9a5fe 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -853,7 +853,13 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) || BLI_testextensie(file->relname, ".pntg") //macpaint || BLI_testextensie(file->relname, ".qtif") || BLI_testextensie(file->relname, ".sgi") +#ifdef WITH_HDR || BLI_testextensie(file->relname, ".hdr") +#endif +#ifdef WITH_CINEON + || BLI_testextensie(file->relname, ".cin") + || BLI_testextensie(file->relname, ".dpx") +#endif #ifdef WITH_DDS || BLI_testextensie(file->relname, ".dds") #endif @@ -916,7 +922,13 @@ void filelist_setfiletypes(struct FileList* filelist, short has_quicktime) || BLI_testextensie(file->relname, ".tif") || BLI_testextensie(file->relname, ".tiff") || BLI_testextensie(file->relname, ".tx") +#ifdef WITH_HDR || BLI_testextensie(file->relname, ".hdr") +#endif +#ifdef WITH_CINEON + || BLI_testextensie(file->relname, ".cin") + || BLI_testextensie(file->relname, ".dpx") +#endif #ifdef WITH_DDS || BLI_testextensie(file->relname, ".dds") #endif diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index 05efdc12596..131e9fa0e14 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -125,9 +125,11 @@ static void save_rendered_image_cb_real(char *name, int confirm) void save_image_filesel_str(Scene *scene, char *str) { switch(scene->r.imtype) { +#ifdef WITH_HDR case R_RADHDR: strcpy(str, "Save Radiance HDR"); break; +#endif case R_FFMPEG: case R_H264: case R_XVID: @@ -153,12 +155,14 @@ void save_image_filesel_str(Scene *scene, char *str) strcpy(str, "Save OpenEXR"); break; #endif +#ifdef WITH_CINEON case R_CINEON: strcpy(str, "Save Cineon"); break; case R_DPX: strcpy(str, "Save DPX"); break; +#endif case R_RAWTGA: strcpy(str, "Save Raw Targa"); break; @@ -168,9 +172,6 @@ void save_image_filesel_str(Scene *scene, char *str) case R_IRIZ: strcpy(str, "Save IRIS"); break; - case R_HAMX: - strcpy(str, "Save HAMX"); - break; case R_TARGA: strcpy(str, "Save Targa"); break; diff --git a/source/blender/editors/space_image/CMakeLists.txt b/source/blender/editors/space_image/CMakeLists.txt index 71eebdb9b1e..f644338d39d 100644 --- a/source/blender/editors/space_image/CMakeLists.txt +++ b/source/blender/editors/space_image/CMakeLists.txt @@ -33,13 +33,13 @@ SET(INC ../../windowmanager ) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) IF(WITH_LCMS) SET(INC ${INC} ${LCMS_INCLUDE_DIR}) diff --git a/source/blender/editors/space_image/Makefile b/source/blender/editors/space_image/Makefile index 4f532166bc7..cde31085d80 100644 --- a/source/blender/editors/space_image/Makefile +++ b/source/blender/editors/space_image/Makefile @@ -61,3 +61,10 @@ ifeq ($(WHITH_TIFF), true) CPPFLAGS += -DWITH_TIFF endif +ifeq ($(WHITH_CINEON), true) + CPPFLAGS += -DWITH_CINEON +endif + +ifeq ($(WHITH_HDR), true) + CPPFLAGS += -DWITH_HDR +endif \ No newline at end of file diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index d69c34ad259..4246516b5bc 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -648,9 +648,13 @@ static const EnumPropertyItem image_file_type_items[] = { #ifdef WITH_TIFF {R_TIFF, "TIFF", 0, "Tiff", ""}, #endif +#ifdef WITH_DDS {R_RADHDR, "RADIANCE_HDR", 0, "Radiance HDR", ""}, +#endif +#ifdef WITH_CINEON {R_CINEON, "CINEON", 0, "Cineon", ""}, {R_DPX, "DPX", 0, "DPX", ""}, +#endif #ifdef WITH_OPENEXR {R_OPENEXR, "OPENEXR", 0, "OpenEXR", ""}, /* saving sequences of multilayer won't work, they copy buffers */ diff --git a/source/blender/imbuf/CMakeLists.txt b/source/blender/imbuf/CMakeLists.txt index 57f7e830f41..49886bdc46f 100644 --- a/source/blender/imbuf/CMakeLists.txt +++ b/source/blender/imbuf/CMakeLists.txt @@ -44,19 +44,19 @@ IF(WIN32) SET(INC ${INC} ${PTHREADS_INC}) ENDIF(WIN32) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) SET(INC ${INC} ${TIFF_INCLUDE_DIR}) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) -IF(WITH_OPENJPEG) +IF(WITH_IMAGE_OPENJPEG) SET(INC ${INC} ${OPENJPEG_INC}) ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_OPENJPEG) +ENDIF(WITH_IMAGE_OPENJPEG) IF(WITH_QUICKTIME) SET(INC ${INC} ../quicktime ${QUICKTIME_INC}) @@ -68,8 +68,16 @@ IF(WITH_FFMPEG) ADD_DEFINITIONS(-DWITH_FFMPEG) ENDIF(WITH_FFMPEG) -IF(WITH_DDS) +IF(WITH_IMAGE_DDS) ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + +IF(WITH_IMAGE_HDR) + ADD_DEFINITIONS(-DWITH_HDR) +ENDIF(WITH_IMAGE_HDR) BLENDERLIB(bf_imbuf "${SRC}" "${INC}") diff --git a/source/blender/imbuf/IMB_imbuf_types.h b/source/blender/imbuf/IMB_imbuf_types.h index e0dcc344016..7408a43ee65 100644 --- a/source/blender/imbuf/IMB_imbuf_types.h +++ b/source/blender/imbuf/IMB_imbuf_types.h @@ -173,16 +173,22 @@ typedef struct ImBuf { #define QUICKTIME (1 << 25) #endif +#ifdef WITH_HDR #define RADHDR (1 << 24) +#endif +#ifdef WITH_TIFF #define TIF (1 << 23) #define TIF_16BIT (1 << 8 ) +#endif #define OPENEXR (1 << 22) #define OPENEXR_HALF (1 << 8 ) #define OPENEXR_COMPRESS (7) +#ifdef WITH_CINEON #define CINEON (1 << 21) #define DPX (1 << 20) +#endif #ifdef WITH_DDS #define DDS (1 << 19) diff --git a/source/blender/imbuf/SConscript b/source/blender/imbuf/SConscript index 439cdecdf5b..6b3360a16c5 100644 --- a/source/blender/imbuf/SConscript +++ b/source/blender/imbuf/SConscript @@ -26,6 +26,12 @@ if env['WITH_BF_TIFF']: if env['WITH_BF_DDS']: defs.append('WITH_DDS') +if env['WITH_BF_CINEON']: + defs.append('WITH_CINEON') + +if env['WITH_BF_HDR']: + defs.append('WITH_HDR') + if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') incs += ' ' + env['BF_FFMPEG_INC'] diff --git a/source/blender/imbuf/intern/Makefile b/source/blender/imbuf/intern/Makefile index 5f8029ddf72..f3fa17385fe 100644 --- a/source/blender/imbuf/intern/Makefile +++ b/source/blender/imbuf/intern/Makefile @@ -36,7 +36,12 @@ include nan_subdirs.mk include nan_compile.mk include nan_definitions.mk -DIRS = cineon +DIRS = + +ifeq ($(WITH_CINEON), true) + DIRS += cineon + CPPFLAGS += -DWITH_CINEON +endif ifeq ($(WITH_OPENEXR), true) DIRS += openexr @@ -89,3 +94,7 @@ ifeq ($(WITH_TIFF), true) CPPFLAGS += -DWITH_TIFF CPPFLAGS += -I$(NAN_TIFF)/include endif + +ifeq ($(WITH_HDR), true) + CPPFLAGS += -DWITH_HDR +endif diff --git a/source/blender/imbuf/intern/dds/CMakeLists.txt b/source/blender/imbuf/intern/dds/CMakeLists.txt index 64a37e03a88..376dd3d61f4 100644 --- a/source/blender/imbuf/intern/dds/CMakeLists.txt +++ b/source/blender/imbuf/intern/dds/CMakeLists.txt @@ -37,8 +37,8 @@ SET(INC ../../../../../intern/guardedalloc ) -if(WITH_DDS) +if(WITH_IMAGE_DDS) ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) BLENDERLIB(bf_dds "${SRC}" "${INC}") diff --git a/source/blender/imbuf/intern/filetype.c b/source/blender/imbuf/intern/filetype.c index c2140e12013..db2eef759dc 100644 --- a/source/blender/imbuf/intern/filetype.c +++ b/source/blender/imbuf/intern/filetype.c @@ -60,14 +60,18 @@ ImFileType IMB_FILE_TYPES[]= { {NULL, NULL, imb_is_a_png, imb_ftype_default, imb_loadpng, imb_savepng, NULL, 0, PNG}, {NULL, NULL, imb_is_a_bmp, imb_ftype_default, imb_bmp_decode, imb_savebmp, NULL, 0, BMP}, {NULL, NULL, imb_is_a_targa, imb_ftype_default, imb_loadtarga, imb_savetarga, NULL, 0, TGA}, +#ifdef WITH_CINEON {NULL, NULL, imb_is_dpx, imb_ftype_default, imb_loaddpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX}, {NULL, NULL, imb_is_cineon, imb_ftype_default, imb_loadcineon, imb_savecineon, NULL, IM_FTYPE_FLOAT, CINEON}, +#endif #ifdef WITH_TIFF {imb_inittiff, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF}, #elif defined(__APPLE__) && defined(IMBUF_COCOA) {NULL, NULL, imb_is_a_cocoa, imb_ftype_cocoa, imb_imb_cocoaLoadImage, imb_savecocoa, NULL, 0, TIF}, #endif +#ifdef WITH_HDR {NULL, NULL, imb_is_a_hdr, imb_ftype_default, imb_loadhdr, imb_savehdr, NULL, IM_FTYPE_FLOAT, RADHDR}, +#endif #ifdef WITH_OPENEXR {NULL, NULL, imb_is_a_openexr, imb_ftype_default, imb_load_openexr, imb_save_openexr, NULL, IM_FTYPE_FLOAT, OPENEXR}, #endif diff --git a/source/blender/imbuf/intern/openexr/CMakeLists.txt b/source/blender/imbuf/intern/openexr/CMakeLists.txt index 1a098c89aa4..cfc977ff155 100644 --- a/source/blender/imbuf/intern/openexr/CMakeLists.txt +++ b/source/blender/imbuf/intern/openexr/CMakeLists.txt @@ -38,8 +38,8 @@ SET(INC ${OPENEXR_INC} ) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) BLENDERLIB(bf_openexr "${SRC}" "${INC}") diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index dabb6780ea3..a0942c281e3 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -29,6 +29,8 @@ * ***** END GPL LICENSE BLOCK ***** */ +#ifdef WITH_HDR + /* ---------------------------------------------------------------------- Radiance High Dynamic Range image file IO For description and code for reading/writing of radiance hdr files @@ -358,3 +360,4 @@ int imb_savehdr(struct ImBuf *ibuf, char *name, int flags) return 1; } +#endif /* WITH_HDR */ diff --git a/source/blender/imbuf/intern/util.c b/source/blender/imbuf/intern/util.c index e6f4e226caa..726a8fe2f36 100644 --- a/source/blender/imbuf/intern/util.c +++ b/source/blender/imbuf/intern/util.c @@ -118,7 +118,9 @@ int IMB_ispic(char *filename) || BLI_testextensie(filename, ".tiff") || BLI_testextensie(filename, ".tx") #endif +#ifdef WITH_HDR || BLI_testextensie(filename, ".hdr") +#endif || BLI_testextensie(filename, ".tga") || BLI_testextensie(filename, ".rgb") || BLI_testextensie(filename, ".bmp") @@ -134,7 +136,10 @@ int IMB_ispic(char *filename) || BLI_testextensie(filename, ".pict") || BLI_testextensie(filename, ".pntg") //macpaint || BLI_testextensie(filename, ".qtif") +#ifdef WITH_CINEON + || BLI_testextensie(filename, ".dpx") || BLI_testextensie(filename, ".cin") +#endif #ifdef WITH_BF_OPENEXR || BLI_testextensie(filename, ".exr") #endif @@ -154,12 +159,17 @@ int IMB_ispic(char *filename) || BLI_testextensie(filename, ".tiff") || BLI_testextensie(filename, ".tx") #endif +#ifdef WITH_HDR || BLI_testextensie(filename, ".hdr") +#endif || BLI_testextensie(filename, ".tga") || BLI_testextensie(filename, ".rgb") || BLI_testextensie(filename, ".bmp") || BLI_testextensie(filename, ".png") +#ifdef WITH_CINEON || BLI_testextensie(filename, ".cin") + || BLI_testextensie(filename, ".dpx") +#endif #ifdef WITH_DDS || BLI_testextensie(filename, ".dds") #endif diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index 984aa5a6705..f9e570a39c7 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -961,8 +961,8 @@ typedef struct Scene { /* imtype */ #define R_TARGA 0 #define R_IRIS 1 -#define R_HAMX 2 -#define R_FTYPE 3 /* ftype is nomore */ +/* #define R_HAMX 2 */ /* hamx is nomore */ +/* #define R_FTYPE 3 */ /* ftype is nomore */ #define R_JPEG90 4 #define R_MOVIE 5 #define R_IRIZ 7 diff --git a/source/blender/makesrna/SConscript b/source/blender/makesrna/SConscript index 9d65522993d..7ac76c4d107 100644 --- a/source/blender/makesrna/SConscript +++ b/source/blender/makesrna/SConscript @@ -24,6 +24,12 @@ if env['WITH_BF_OPENJPEG']: if env['WITH_BF_DDS']: defs.append('WITH_DDS') +if env['WITH_BF_CINEON']: + defs.append('WITH_CINEON') + +if env['WITH_BF_HDR']: + defs.append('WITH_HDR') + if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') incs += ' ' + env['BF_FFMPEG_INC'] diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 72eb2069bc8..9dbb2fd00aa 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -70,21 +70,29 @@ IF(WITH_GAMEENGINE) ADD_DEFINITIONS(-DGAMEBLENDER) ENDIF(WITH_GAMEENGINE) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) -IF(WITH_OPENJPEG) +IF(WITH_IMAGE_OPENJPEG) ADD_DEFINITIONS(-DWITH_OPENJPEG) -ENDIF(WITH_OPENJPEG) +ENDIF(WITH_IMAGE_OPENJPEG) -IF(WITH_DDS) +IF(WITH_IMAGE_DDS) ADD_DEFINITIONS(-DWITH_DDS) -ENDIF(WITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + +IF(WITH_IMAGE_HDR) + ADD_DEFINITIONS(-DWITH_HDR) +ENDIF(WITH_IMAGE_HDR) IF(WITH_QUICKTIME) SET(INC ${INC} ../../quicktime) @@ -101,9 +109,9 @@ IF(WITH_LCMS) ADD_DEFINITIONS(-DWITH_LCMS) ENDIF(WITH_LCMS) -IF(NOT WITH_ELBEEM) +IF(NOT WITH_FLUID) ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_ELBEEM) +ENDIF(NOT WITH_FLUID) IF(WITH_FFTW3) ADD_DEFINITIONS(-DFFTW3=1) diff --git a/source/blender/makesrna/intern/Makefile b/source/blender/makesrna/intern/Makefile index 6b28c56105b..67238045be8 100644 --- a/source/blender/makesrna/intern/Makefile +++ b/source/blender/makesrna/intern/Makefile @@ -97,6 +97,14 @@ ifeq ($(WITH_TIFF),true) CPPFLAGS += -DWITH_TIFF endif +ifeq ($(WITH_CINEON),true) + CPPFLAGS += -DWITH_CINEON +endif + +ifeq ($(WITH_HDR),true) + CPPFLAGS += -DWITH_HDR +endif + ifeq ($(OS),windows) # Windows needs these extra libs because of winstuff... It is not # _really_ needed, but it is the easiest fix for now. If you have diff --git a/source/blender/makesrna/intern/SConscript b/source/blender/makesrna/intern/SConscript index 8abab7ba294..3bebffaddec 100644 --- a/source/blender/makesrna/intern/SConscript +++ b/source/blender/makesrna/intern/SConscript @@ -47,6 +47,12 @@ if env['WITH_BF_OPENJPEG']: if env['WITH_BF_DDS']: defs.append('WITH_DDS') +if env['WITH_BF_CINEON']: + defs.append('WITH_CINEON') + +if env['WITH_BF_HDR']: + defs.append('WITH_HDR') + if env['WITH_BF_FFMPEG']: defs.append('WITH_FFMPEG') incs += ' ' + env['BF_FFMPEG_INC'] diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 611e4f02b43..ca388951e68 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -105,13 +105,17 @@ EnumPropertyItem image_type_items[] = { {R_TARGA, "TARGA", ICON_FILE_IMAGE, "Targa", ""}, {R_RAWTGA, "TARGA_RAW", ICON_FILE_IMAGE, "Targa Raw", ""}, {0, "", 0, " ", NULL}, +#ifdef WITH_CINEON {R_CINEON, "CINEON", ICON_FILE_IMAGE, "Cineon", ""}, {R_DPX, "DPX",ICON_FILE_IMAGE, "DPX", ""}, +#endif #ifdef WITH_OPENEXR {R_MULTILAYER, "MULTILAYER", ICON_FILE_IMAGE, "MultiLayer", ""}, {R_OPENEXR, "OPEN_EXR", ICON_FILE_IMAGE, "OpenEXR", ""}, #endif +#ifdef WITH_HDR {R_RADHDR, "HDR", ICON_FILE_IMAGE, "Radiance HDR", ""}, +#endif #ifdef WITH_TIFF {R_TIFF, "TIFF", ICON_FILE_IMAGE, "TIFF", ""}, #endif diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index 51cd5223cf5..b6dcc9c03f9 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -40,9 +40,9 @@ SET(INC ${ZLIB_INC} ) -IF(NOT WITH_ELBEEM) +IF(NOT WITH_FLUID) ADD_DEFINITIONS(-DDISABLE_ELBEEM) -ENDIF(NOT WITH_ELBEEM) +ENDIF(NOT WITH_FLUID) BLENDERLIB(bf_modifiers "${SRC}" "${INC}") diff --git a/source/blender/render/CMakeLists.txt b/source/blender/render/CMakeLists.txt index 05f1d5d4bd9..2047ab29d24 100644 --- a/source/blender/render/CMakeLists.txt +++ b/source/blender/render/CMakeLists.txt @@ -38,9 +38,9 @@ IF(WIN32) SET(INC ${INC} ${PTHREADS_INC}) ENDIF(WIN32) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) IF(WITH_QUICKTIME) SET(INC ${INC} ../quicktime ${QUICKTIME_INC}) diff --git a/source/blenderplayer/CMakeLists.txt b/source/blenderplayer/CMakeLists.txt index 38ccb56c410..566bc88e46d 100644 --- a/source/blenderplayer/CMakeLists.txt +++ b/source/blenderplayer/CMakeLists.txt @@ -101,7 +101,7 @@ IF(UNIX) bf_python bf_gen_python bf_blenlib - bf_cineon + bf_cineon bf_openexr extern_libopenjpeg bf_dds diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 72e48c0893e..e8c53cf0374 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -52,13 +52,25 @@ IF(WITH_QUICKTIME) ADD_DEFINITIONS(-DWITH_QUICKTIME) ENDIF(WITH_QUICKTIME) -IF(WITH_OPENEXR) +IF(WITH_IMAGE_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) -ENDIF(WITH_OPENEXR) +ENDIF(WITH_IMAGE_OPENEXR) -IF(WITH_TIFF) +IF(WITH_IMAGE_TIFF) ADD_DEFINITIONS(-DWITH_TIFF) -ENDIF(WITH_TIFF) +ENDIF(WITH_IMAGE_TIFF) + +IF(WITH_IMAGE_DDS) + ADD_DEFINITIONS(-DWITH_DDS) +ENDIF(WITH_IMAGE_DDS) + +IF(WITH_IMAGE_CINEON) + ADD_DEFINITIONS(-DWITH_CINEON) +ENDIF(WITH_IMAGE_CINEON) + +IF(WITH_IMAGE_HDR) + ADD_DEFINITIONS(-DWITH_HDR) +ENDIF(WITH_IMAGE_HDR) IF(WITH_PYTHON) INCLUDE_DIRECTORIES(../blender/python) @@ -377,9 +389,9 @@ FILE(READ ${CMAKE_BINARY_DIR}/cmake_blender_libs.txt BLENDER_LINK_LIBS) SET(BLENDER_LINK_LIBS bf_nodes ${BLENDER_LINK_LIBS} bf_windowmanager blender_render) -IF(WITH_ELBEEM) +IF(WITH_FLUID) SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} bf_elbeem) -ENDIF(WITH_ELBEEM) +ENDIF(WITH_FLUID) IF(CMAKE_SYSTEM_NAME MATCHES "Linux") SET(BLENDER_LINK_LIBS ${BLENDER_LINK_LIBS} extern_binreloc) diff --git a/source/creator/Makefile b/source/creator/Makefile index 34ebc5fa305..bfbb2173cff 100644 --- a/source/creator/Makefile +++ b/source/creator/Makefile @@ -73,4 +73,12 @@ ifeq ($(WITH_TIFF), true) CPPFLAGS += -DWITH_TIFF endif +ifeq ($(WITH_CINEON), true) + CPPFLAGS += -DWITH_CINEON +endif + +ifeq ($(WITH_HDR), true) + CPPFLAGS += -DWITH_HDR +endif + CPPFLAGS += -I$(OPENGL_HEADERS) diff --git a/source/creator/creator.c b/source/creator/creator.c index 415f1064dbb..05359b06112 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -559,7 +559,9 @@ static int set_image_type(int argc, char **argv, void *data) else if (!strcmp(imtype,"AVICODEC")) scene->r.imtype = R_AVICODEC; else if (!strcmp(imtype,"QUICKTIME")) scene->r.imtype = R_QUICKTIME; else if (!strcmp(imtype,"BMP")) scene->r.imtype = R_BMP; +#ifdef WITH_HDR else if (!strcmp(imtype,"HDR")) scene->r.imtype = R_RADHDR; +#endif #ifdef WITH_TIFF else if (!strcmp(imtype,"TIFF")) scene->r.imtype = R_TIFF; #endif @@ -569,8 +571,10 @@ static int set_image_type(int argc, char **argv, void *data) #endif else if (!strcmp(imtype,"MPEG")) scene->r.imtype = R_FFMPEG; else if (!strcmp(imtype,"FRAMESERVER")) scene->r.imtype = R_FRAMESERVER; +#ifdef WITH_CINEON else if (!strcmp(imtype,"CINEON")) scene->r.imtype = R_CINEON; else if (!strcmp(imtype,"DPX")) scene->r.imtype = R_DPX; +#endif #if WITH_OPENJPEG else if (!strcmp(imtype,"JP2")) scene->r.imtype = R_JP2; #endif -- cgit v1.2.3