Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoerg Mueller <nexyon@gmail.com>2011-07-07 00:26:56 +0400
committerJoerg Mueller <nexyon@gmail.com>2011-07-07 00:26:56 +0400
commit34c5784f992f64e52f5b07e0f457ec53d9709874 (patch)
treeedad94020584cc192007960edf17da0957a66c51 /source/blender/editors/space_sequencer/sequencer_edit.c
parent44220bba7a8f2f09264ea1e581096d65a00579e4 (diff)
parenta83c3c0b1422713d8553965988c3096955eaa452 (diff)
Merging trunk up to r38167.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_edit.c')
-rw-r--r--source/blender/editors/space_sequencer/sequencer_edit.c26
1 files changed, 16 insertions, 10 deletions
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;