diff options
Diffstat (limited to 'source/blender/editors/space_sequencer')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_draw.c | 10 | ||||
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 26 |
2 files changed, 22 insertions, 14 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index e1efd5b4622..1ed262c3e23 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -644,10 +644,12 @@ static void draw_seq_strip(Scene *scene, ARegion *ar, Sequence *seq, int outline if (G.moving && (seq->flag & SELECT)) { if(seq->flag & SEQ_OVERLAP) { col[0]= 255; col[1]= col[2]= 40; - } else UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120); + } + else + UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, 120+outline_tint); } - - UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint); + else + UI_GetColorPtrBlendShade3ubv(col, col, col, 0.0, outline_tint); glColor3ubv((GLubyte *)col); @@ -970,7 +972,7 @@ static void draw_seq_strips(const bContext *C, Editing *ed, ARegion *ar) /* loop through strips, checking for those that are visible */ for (seq= ed->seqbasep->first; seq; seq= seq->next) { /* boundbox and selection tests for NOT drawing the strip... */ - if ((seq->flag & SELECT) == sel) continue; + if ((seq->flag & SELECT) != sel) continue; else if (seq == last_seq) continue; else if (MIN2(seq->startdisp, seq->start) > v2d->cur.xmax) continue; else if (MAX2(seq->enddisp, seq->start+seq->len) < v2d->cur.xmin) continue; diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 46638007fb1..4252d051154 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -125,6 +125,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; @@ -732,8 +733,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! */ @@ -783,7 +786,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; } @@ -792,8 +795,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; } @@ -828,6 +832,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! */ @@ -1781,19 +1787,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->seqbase, 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); @@ -1805,8 +1813,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; |