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/blender/editors/space_file | |
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/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/SConscript | 4 | ||||
-rw-r--r-- | source/blender/editors/space_file/writeimage.c | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/source/blender/editors/space_file/SConscript b/source/blender/editors/space_file/SConscript index b22a265dcbc..9de705e99d3 100644 --- a/source/blender/editors/space_file/SConscript +++ b/source/blender/editors/space_file/SConscript @@ -12,9 +12,13 @@ defs = [] if env['WITH_BF_OPENJPEG']: defs.append('WITH_OPENJPEG') + if env['WITH_BF_OPENEXR']: defs.append('WITH_OPENEXR') +if env['WITH_BF_TIFF']: + defs.append('WITH_TIFF') + if env['OURPLATFORM'] == 'linux2': cflags='-pthread' incs += ' ../../../extern/binreloc/include' diff --git a/source/blender/editors/space_file/writeimage.c b/source/blender/editors/space_file/writeimage.c index c9b30983b93..05efdc12596 100644 --- a/source/blender/editors/space_file/writeimage.c +++ b/source/blender/editors/space_file/writeimage.c @@ -143,10 +143,11 @@ void save_image_filesel_str(Scene *scene, char *str) case R_BMP: strcpy(str, "Save BMP"); break; +#ifdef WITH_TIFF case R_TIFF: - if (G.have_libtiff) - strcpy(str, "Save TIFF"); + strcpy(str, "Save TIFF"); break; +#endif #ifdef WITH_OPENEXR case R_OPENEXR: strcpy(str, "Save OpenEXR"); |