diff options
author | Matt Ebb <matt@mke3.net> | 2010-05-21 07:25:38 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-05-21 07:25:38 +0400 |
commit | 2be851c9665caab9e858f4c06ec59e7bb4201e17 (patch) | |
tree | b7c27c3ae46813520ffe9e84f13739243d3ced27 /source/creator | |
parent | e8ed1f1f557bb469bfc277448d2ee833e4867086 (diff) |
Blender TIFF support
* Removed dynamic linking libTIFF code and change it to static linking
(built into the blender executable). Dynamic linking made things a
fair bit more complicated and wasn't working at all before on OS X -
the dylib didn't exist and wasn't being copied. Since TIFF is more heavily
depended upon now in Blender, it makes sense to make it less 'optional'
and more in line with other libraries.
I've updated both CMake and scons, and CMake on OS X/64bit works fine.
It's now up to other platform/build system maintainers to enable this for
their respective platforms (Campbell will check it for linux). For windows,
and non-64bit osx, we need static libtiff libraries in /lib.
I've added options WITH_TIFF for CMake and WITH_BF_TIFF for scons,
so if blender won't build because of this, you should be able to disable
these options until your build system has been updated.
* Bonus feature: while doing this, I added support for loading 16bit and 32bit
per channel TIFFs - they get converted to Blender's float buffers. Handy for
zbrush displacement maps!
Diffstat (limited to 'source/creator')
-rw-r--r-- | source/creator/CMakeLists.txt | 5 | ||||
-rw-r--r-- | source/creator/SConscript | 3 | ||||
-rw-r--r-- | source/creator/creator.c | 2 |
3 files changed, 9 insertions, 1 deletions
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index 193217abc9d..d170e2374a8 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -61,6 +61,10 @@ IF(WITH_OPENEXR) ADD_DEFINITIONS(-DWITH_OPENEXR) ENDIF(WITH_OPENEXR) +IF(WITH_TIFF) + ADD_DEFINITIONS(-DWITH_TIFF) +ENDIF(WITH_TIFF) + IF(WITH_PYTHON) INCLUDE_DIRECTORIES(../blender/python) ELSE(WITH_PYTHON) @@ -280,7 +284,6 @@ IF(WITH_INSTALL) COMMAND copy /Y \"${WIN_LIBDIR}\\png\\lib\\libpng.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\sdl\\lib\\SDL.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\zlib\\lib\\zlib.dll\" \"${TARGETDIR}\\\" - COMMAND copy /Y \"${WIN_LIBDIR}\\tiff\\lib\\libtiff.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\python\\lib\\python31_d.dll\" \"${TARGETDIR}\\\" COMMAND copy /Y \"${WIN_LIBDIR}\\pthreads\\lib\\pthreadVC2.dll\" \"${TARGETDIR}\\\" diff --git a/source/creator/SConscript b/source/creator/SConscript index 6364f256cc5..815bd351f69 100644 --- a/source/creator/SConscript +++ b/source/creator/SConscript @@ -23,6 +23,9 @@ if env['WITH_BF_BINRELOC']: if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') +if env['WITH_BF_TIFF']: + defs.append('WITH_TIFF') + if not env['WITH_BF_SDL']: defs.append('DISABLE_SDL') diff --git a/source/creator/creator.c b/source/creator/creator.c index 7544c3f8ff9..e3475e6ffe4 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -543,7 +543,9 @@ static int set_image_type(int argc, char **argv, void *data) else if (!strcmp(imtype,"QUICKTIME")) scene->r.imtype = R_QUICKTIME; else if (!strcmp(imtype,"BMP")) scene->r.imtype = R_BMP; else if (!strcmp(imtype,"HDR")) scene->r.imtype = R_RADHDR; +#ifdef WITH_TIFF else if (!strcmp(imtype,"TIFF")) scene->r.imtype = R_TIFF; +#endif #ifdef WITH_OPENEXR else if (!strcmp(imtype,"EXR")) scene->r.imtype = R_OPENEXR; else if (!strcmp(imtype,"MULTILAYER")) scene->r.imtype = R_MULTILAYER; |