diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index c8965c4d3db..6a69d32d307 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -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! */ @@ -1778,19 +1784,21 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* new seq */ se = give_stripelem(seq, cfra); - seq_new= alloc_sequence(ed->seqbasep, start_ofs, seq->machine); + seq_new= seq_dupli_recursive(scene, scene, seq, SEQ_DUPE_UNIQUE_NAME); + BLI_addtail(ed->seqbasep, seq_new); + + seq_new->start= start_ofs; seq_new->type= SEQ_IMAGE; seq_new->len = 1; seq_new->endstill = step-1; /* new strip */ - seq_new->strip= strip_new= MEM_callocN(sizeof(Strip)*1, "strip"); + strip_new= seq_new->strip; strip_new->len= 1; strip_new->us= 1; - strncpy(strip_new->dir, seq->strip->dir, FILE_MAXDIR-1); /* new stripdata */ - strip_new->stripdata= se_new= MEM_callocN(sizeof(StripElem)*1, "stripelem"); + se_new= strip_new->stripdata; BLI_strncpy(se_new->name, se->name, sizeof(se_new->name)); calc_sequence(scene, seq_new); @@ -1802,8 +1810,6 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) } /* XXX, COPY FCURVES */ - strncpy(seq_new->name+2, seq->name+2, sizeof(seq->name)-2); - seqbase_unique_name_recursive(&scene->ed->seqbase, seq_new); cfra++; start_ofs += step; @@ -1833,7 +1839,6 @@ void SEQUENCER_OT_images_separate(wmOperatorType *ot) ot->description="On image sequences strips, it return a strip for each image"; /* api callbacks */ - ot->invoke= WM_operator_props_popup; ot->exec= sequencer_separate_images_exec; ot->poll= sequencer_edit_poll; |