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).
This commit is contained in:
Rob Haarsma
2004-12-10 12:55:53 +00:00
parent de0eb1caa3
commit 4b07e2c4d6
2 changed files with 30 additions and 11 deletions

View File

@@ -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 {
QT_CreateMyVideoTrack();
#ifdef __APPLE__
printf("Created QuickTime movie: %s\n", name);
#else
printf("Created QuickTime movie: %s\n", qtname);
MEM_freeN(qtname);
#endif
QT_CreateMyVideoTrack();
}
}
}

View File

@@ -113,12 +113,18 @@ char *get_valid_qtname(char *name)
if(name[1] != ':') {
char drive[2];
drive[0] = Buffer[0];
drive[1] = '\0';
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);
BLI_dynstr_append(ds, drive);
BLI_dynstr_append(ds, ":");
BLI_dynstr_append(ds, name);
}
} else {
BLI_dynstr_append(ds, name);
}