Fix #27848: sequencer strip hard cut looses soft trim on second strip.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 5 Jul 2011 16:31:21 +0000 (16:31 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 5 Jul 2011 16:31:21 +0000 (16:31 +0000)
source/blender/editors/space_sequencer/sequencer_edit.c

index c8965c4d3db96ececbd552e7e4c546f7eb91a5ab..4f45b84c08e735ba126aa6adaa5b15f56307d5f0 100644 (file)
@@ -124,6 +124,7 @@ typedef struct TransSeq {
        int startstill, endstill;
        int startdisp, enddisp;
        int startofs, endofs;
+       int anim_startofs, anim_endofs;
        /* int final_left, final_right; */ /* UNUSED */
        int len;
 } TransSeq;
@@ -729,8 +730,10 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
        ts.endstill= seq->endstill;
        ts.startdisp= seq->startdisp;
        ts.enddisp= seq->enddisp;
-       ts.startofs= seq->anim_startofs;
-       ts.endofs= seq->anim_endofs;
+       ts.startofs= seq->startofs;
+       ts.endofs= seq->endofs;
+       ts.anim_startofs= seq->anim_startofs;
+       ts.anim_endofs= seq->anim_endofs;
        ts.len= seq->len;
        
        /* First Strip! */
@@ -780,7 +783,7 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
                if ((seqn->startstill) && (cutframe == seqn->start + 1)) {
                        seqn->start = ts.start;
                        seqn->startstill= ts.start- cutframe;
-                       seqn->anim_endofs = ts.endofs;
+                       seqn->anim_endofs = ts.anim_endofs;
                        seqn->endstill = ts.endstill;
                }
                
@@ -789,8 +792,9 @@ static Sequence *cut_seq_hard(Scene *scene, Sequence * seq, int cutframe)
                        seqn->start = cutframe;
                        seqn->startstill = 0;
                        seqn->startofs = 0;
+                       seqn->endofs = ts.endofs;
                        seqn->anim_startofs += cutframe - ts.start;
-                       seqn->anim_endofs = ts.endofs;
+                       seqn->anim_endofs = ts.anim_endofs;
                        seqn->endstill = ts.endstill;
                }                               
                
@@ -825,6 +829,8 @@ static Sequence *cut_seq_soft(Scene *scene, Sequence * seq, int cutframe)
        ts.enddisp= seq->enddisp;
        ts.startofs= seq->startofs;
        ts.endofs= seq->endofs;
+       ts.anim_startofs= seq->anim_startofs;
+       ts.anim_endofs= seq->anim_endofs;
        ts.len= seq->len;
        
        /* First Strip! */