From 4b07e2c4d66a82dce447a71b20b3f88cd436f704 Mon Sep 17 00:00:00 2001 From: Rob Haarsma Date: Fri, 10 Dec 2004 12:55:53 +0000 Subject: 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). --- source/blender/quicktime/apple/quicktime_export.c | 25 +++++++++++++++++------ source/blender/quicktime/apple/quicktime_import.c | 18 ++++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) (limited to 'source/blender/quicktime') 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 -#include "BLI_winstuff.h" #include #include #include @@ -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); } -- cgit v1.2.3