diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2003-04-28 06:15:46 +0400 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2003-04-28 06:15:46 +0400 |
commit | 706ccc040159356056d423c54a920cfcd1681ebf (patch) | |
tree | e17725338956c61e05274744c16f1f71699b57c4 /source/blender/src/playanim.c | |
parent | 1ab53ee998a266ab89d0bc33e2eb2fb1d69b1c4c (diff) |
Added Quicktime support for OSX and Windows.
This code allows you to load Quicktime images and movies as textures
and render animations to Quicktime movies.
Note that the selected output codec is *not* saved in the blendfile.
To enable Quicktime functionality you need the SDK from Apple:
OSX: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Mac.hqx
Win: ftp://ftp.apple.com/developer/Development_Kits/QT6SDK_Win.hqx
Add the \QTDevWin\CIncludes and \QTDevWin\Libraries directories
from this SDK to your build environment.
Enable the WITH_QUICKTIME compile flag in the following directories:
bf\blender\source\blender\imbuf
bf\blender\source\blender\src
bf\blender\source\blender\render
bf\blender\source\creator
Diffstat (limited to 'source/blender/src/playanim.c')
-rw-r--r-- | source/blender/src/playanim.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/src/playanim.c b/source/blender/src/playanim.c index ca3cef32eb1..d42cca55e90 100644 --- a/source/blender/src/playanim.c +++ b/source/blender/src/playanim.c @@ -48,6 +48,15 @@ #endif #include "MEM_guardedalloc.h" +#ifdef WITH_QUICKTIME +#ifdef _WIN32 +#include <QTML.h> +#endif /* _WIN32 */ +#if defined (_WIN32) || defined (__APPLE__) +#include <Movies.h> +#endif /* _WIN32 || __APPLE__ */ +#endif /* WITH_QUICKTIME */ + #include "PIL_time.h" #include <math.h> @@ -348,6 +357,22 @@ void playanim(int argc, char **argv) } else break; } +#ifdef WITH_QUICKTIME +#if defined (_WIN32) || defined (__APPLE__) + /* Initialize QuickTime */ +#ifdef _WIN32 + if (InitializeQTML(0) != noErr) + G.have_quicktime = FALSE; + else + G.have_quicktime = TRUE; +#endif /* _WIN32 */ + if (EnterMovies() != noErr) + G.have_quicktime = FALSE; + else +#endif /* _WIN32 || __APPLE__ */ + G.have_quicktime = TRUE; +#endif /* WITH_QUICKTIME */ + if (argc > 1) strcpy(name,argv[1]); else { BLI_getwdN(name); @@ -713,4 +738,14 @@ void playanim(int argc, char **argv) } picture = picture->next; } +#ifdef WITH_QUICKTIME +#if defined (_WIN32) || defined (__APPLE__) + if(G.have_quicktime) { + ExitMovies(); +#ifdef _WIN32 + TerminateQTML(); +#endif /* _WIN32 */ + } +#endif /* _WIN32 || __APPLE__ */ +#endif /* WITH_QUICKTIME */ } |