fix for sequencer transform with effects strips where the effects could be moved to invalid times to avoid overlap but would immediately refresh back to overlapping locations after.

This commit is contained in:
Campbell Barton 2011-06-07 16:47:25 +00:00
parent e44ae2c2a9
commit d16c1f3665

@ -4016,6 +4016,7 @@ static void freeSeqData(TransInfo *t)
}
if(overlap) {
int has_effect= 0;
for(seq= seqbasep->first; seq; seq= seq->next)
seq->tmp= NULL;
@ -4024,12 +4025,48 @@ static void freeSeqData(TransInfo *t)
for(a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
/* Tag seq with a non zero value, used by shuffle_seq_time to identify the ones to shuffle */
seq->tmp= (void*)1;
/* check effects strips, we cant change their time */
if((seq->type & SEQ_EFFECT) && seq->seq1) {
// shuffle_seq(seqbasep, seq, t->scene);
has_effect= TRUE;
}
else {
/* Tag seq with a non zero value, used by shuffle_seq_time to identify the ones to shuffle */
seq->tmp= (void*)1;
}
}
}
shuffle_seq_time(seqbasep, t->scene);
if(has_effect) {
/* update effects strips based on strips just moved in time */
td= t->data;
seq_prev= NULL;
for(a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
if((seq->type & SEQ_EFFECT) && seq->seq1) {
calc_sequence(t->scene, seq);
}
}
}
/* now if any effects _still_ overlap, we need to move them up */
td= t->data;
seq_prev= NULL;
for(a=0; a<t->total; a++, td++) {
seq= ((TransDataSeq *)td->extra)->seq;
if ((seq != seq_prev)) {
if((seq->type & SEQ_EFFECT) && seq->seq1) {
if(seq_test_overlap(seqbasep, seq)) {
shuffle_seq(seqbasep, seq, t->scene);
}
}
}
}
/* done with effects */
}
}
}
#endif