== Sequencer ==
authorPeter Schlaile <peter@schlaile.de>
Sun, 23 Mar 2008 18:32:20 +0000 (18:32 +0000)
committerPeter Schlaile <peter@schlaile.de>
Sun, 23 Mar 2008 18:32:20 +0000 (18:32 +0000)
Additional fixes to metastrip handling. The code is now even shorter :)

source/blender/src/sequence.c

index fd2c6779739dfa7bca0b7dc998fece1c7c6963b2..667fb15e9133100da516ace247bf0d2aaf56b87b 100644 (file)
@@ -420,7 +420,8 @@ void reload_sequence_new_file(Sequence * seq)
        char str[FILE_MAXDIR+FILE_MAXFILE];
 
        if (!(seq->type == SEQ_MOVIE || seq->type == SEQ_IMAGE ||
        char str[FILE_MAXDIR+FILE_MAXFILE];
 
        if (!(seq->type == SEQ_MOVIE || seq->type == SEQ_IMAGE ||
-             seq->type == SEQ_HD_SOUND || seq->type == SEQ_SCENE)) {
+             seq->type == SEQ_HD_SOUND || seq->type == SEQ_SCENE ||
+             seq->type == SEQ_META)) {
                return;
        }
 
                return;
        }
 
@@ -430,7 +431,7 @@ void reload_sequence_new_file(Sequence * seq)
                return;
        }
 
                return;
        }
 
-       if (seq->type != SEQ_SCENE) {
+       if (seq->type != SEQ_SCENE && seq->type != SEQ_META) {
                strncpy(str, seq->strip->dir, FILE_MAXDIR-1);
                strncat(str, seq->strip->stripdata->name, FILE_MAXFILE-1);
        }
                strncpy(str, seq->strip->dir, FILE_MAXDIR-1);
                strncat(str, seq->strip->stripdata->name, FILE_MAXFILE-1);
        }
@@ -490,7 +491,6 @@ void reload_sequence_new_file(Sequence * seq)
                seq->strip->len = seq->len;
        }
 
                seq->strip->len = seq->len;
        }
 
-
        calc_sequence(seq);
 }
 
        calc_sequence(seq);
 }
 
@@ -1627,19 +1627,8 @@ static void do_build_seq_ibuf(Sequence * seq, TStripElem *se, int cfra,
                }
 
                if(!se->ibuf && seq->seqbase.first) {
                }
 
                if(!se->ibuf && seq->seqbase.first) {
-                       if(cfra < seq->start) {
-                               meta_se = do_build_seq_array_recursively(
-                                       &seq->seqbase, 
-                                       seq->start, 0);
-                       } else if(cfra > seq->start + seq->len - 1) {
-                               meta_se = do_build_seq_array_recursively(
-                                       &seq->seqbase, 
-                                       seq->start + seq->len - 1, 0);
-                       } else {
-                               meta_se = do_build_seq_array_recursively(
-                                       &seq->seqbase, 
-                                       cfra, 0);
-                       }
+                       meta_se = do_build_seq_array_recursively(
+                               &seq->seqbase, seq->start + se->nr, 0);
                }
 
                se->ok = STRIPELEM_OK;
                }
 
                se->ok = STRIPELEM_OK;