sound sequence strip wasnt handled by path functions correctly.

fixes make relative/absolute for sound sequences.
This commit is contained in:
2010-05-24 14:41:35 +00:00
parent 4324dc8389
commit 0ae967e665

View File

@@ -62,7 +62,7 @@
/* for sequence */ /* for sequence */
//XXX #include "BSE_sequence.h" //XXX #include "BSE_sequence.h"
//XXX define below from BSE_sequence.h - otherwise potentially odd behaviour //XXX define below from BSE_sequence.h - otherwise potentially odd behaviour
#define SEQ_HAS_PATH(seq) (seq->type==SEQ_MOVIE || seq->type==SEQ_IMAGE) #define SEQ_HAS_PATH(_seq) ( (_seq)->type==SEQ_MOVIE || (_seq)->type==SEQ_IMAGE || (_seq)->type==SEQ_SOUND )
@@ -262,7 +262,7 @@ static void seq_getpath(struct BPathIterator *bpi, char *path) {
path[0] = '\0'; /* incase we cant get the path */ path[0] = '\0'; /* incase we cant get the path */
if (seq==NULL) return; if (seq==NULL) return;
if (SEQ_HAS_PATH(seq)) { if (SEQ_HAS_PATH(seq)) {
if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE) { if (ELEM3(seq->type, SEQ_IMAGE, SEQ_MOVIE, SEQ_SOUND)) {
BLI_strncpy(path, seq->strip->dir, FILE_MAX); BLI_strncpy(path, seq->strip->dir, FILE_MAX);
BLI_add_slash(path); /* incase its missing */ BLI_add_slash(path); /* incase its missing */
if (seq->strip->stripdata) { /* should always be true! */ if (seq->strip->stripdata) { /* should always be true! */
@@ -281,7 +281,7 @@ static void seq_setpath(struct BPathIterator *bpi, char *path) {
if (seq==NULL) return; if (seq==NULL) return;
if (SEQ_HAS_PATH(seq)) { if (SEQ_HAS_PATH(seq)) {
if (seq->type == SEQ_IMAGE || seq->type == SEQ_MOVIE) { if (ELEM3(seq->type, SEQ_IMAGE, SEQ_MOVIE, SEQ_SOUND)) {
BLI_split_dirfile(path, seq->strip->dir, seq->strip->stripdata->name); BLI_split_dirfile(path, seq->strip->dir, seq->strip->stripdata->name);
} else { } else {
/* simple case */ /* simple case */