diff options
author | Rob Haarsma <phaseIV@zonnet.nl> | 2004-12-10 15:55:53 +0300 |
---|---|---|
committer | Rob Haarsma <phaseIV@zonnet.nl> | 2004-12-10 15:55:53 +0300 |
commit | 4b07e2c4d66a82dce447a71b20b3f88cd436f704 (patch) | |
tree | ff7b4bb1b76403fea70add716ac66e02580431a1 /source/blender | |
parent | de0eb1caa3d08220913b82aa11ca6aadbf87ab39 (diff) |
Bugfix #1262 additions.
When the Quicktime movie output path lacks any path indication, the movie is created in the
executable directory.
Also new, when the Quicktime output movie isn't created for some reason, the rendering will
stop and give an error message (in the console).
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/quicktime/apple/quicktime_export.c | 25 | ||||
-rw-r--r-- | source/blender/quicktime/apple/quicktime_import.c | 18 |
2 files changed, 31 insertions, 12 deletions
diff --git a/source/blender/quicktime/apple/quicktime_export.c b/source/blender/quicktime/apple/quicktime_export.c index a55a6ab3e36..dc5974b283d 100644 --- a/source/blender/quicktime/apple/quicktime_export.c +++ b/source/blender/quicktime/apple/quicktime_export.c @@ -59,6 +59,7 @@ DONE: #include "BKE_global.h" #include "BKE_scene.h" #include "BLI_blenlib.h" +#include "BIF_toolbox.h" /* error() */ #include "BLO_sys_types.h" #include "IMB_imbuf.h" #include "IMB_imbuf_types.h" @@ -69,8 +70,6 @@ DONE: #include "quicktime_export.h" #ifdef _WIN32 -#include <stdio.h> -#include "BLI_winstuff.h" #include <FixMath.h> #include <QTML.h> #include <TextUtils.h> @@ -502,7 +501,6 @@ void start_qt(void) { FSRef myRef; #else char *qtname; - FILE *myFile = NULL; #endif if(qte == NULL) qte = MEM_callocN(sizeof(QuicktimeExport), "QuicktimeExport"); @@ -546,7 +544,6 @@ void start_qt(void) { #else qtname = get_valid_qtname(name); sprintf(theFullPath, "%s", qtname); - MEM_freeN(qtname); CopyCStringToPascal(theFullPath, qte->qtfilename); err = FSMakeFSSpec(0, 0L, qte->qtfilename, &qte->theSpec); @@ -560,9 +557,25 @@ void start_qt(void) { &qte->theMovie ); CheckError(err, "CreateMovieFile error"); - printf("Created QuickTime movie: %s\n", qtname); + if(err != noErr) { + G.afbreek = 1; +#ifdef __APPLE__ + error("Unable to create Quicktime movie: %s\n", name); +#else + error("Unable to create Quicktime movie: %s\n", qtname); + MEM_freeN(qtname); +#endif + } else { + +#ifdef __APPLE__ + printf("Created QuickTime movie: %s\n", name); +#else + printf("Created QuickTime movie: %s\n", qtname); + MEM_freeN(qtname); +#endif - QT_CreateMyVideoTrack(); + QT_CreateMyVideoTrack(); + } } } diff --git a/source/blender/quicktime/apple/quicktime_import.c b/source/blender/quicktime/apple/quicktime_import.c index e5359a8b4c0..391da7a7ff7 100644 --- a/source/blender/quicktime/apple/quicktime_import.c +++ b/source/blender/quicktime/apple/quicktime_import.c @@ -113,12 +113,18 @@ char *get_valid_qtname(char *name) if(name[1] != ':') { char drive[2]; - drive[0] = Buffer[0]; - drive[1] = '\0'; - - BLI_dynstr_append(ds, drive); - BLI_dynstr_append(ds, ":"); - BLI_dynstr_append(ds, name); + if(name[0] != '/' || name[0] != '\\') { + BLI_dynstr_append(ds, Buffer); + BLI_dynstr_append(ds, "/"); + BLI_dynstr_append(ds, name); + } else { + drive[0] = Buffer[0]; + drive[1] = '\0'; + + BLI_dynstr_append(ds, drive); + BLI_dynstr_append(ds, ":"); + BLI_dynstr_append(ds, name); + } } else { BLI_dynstr_append(ds, name); } |