diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-06-14 14:46:39 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-06-14 14:57:55 +0300 |
commit | 180aad5e0bb580239092da81017dc75547f5ed48 (patch) | |
tree | 8ea7ae9a4a87c8e5b85962efe9dc0fc7b07bb77b | |
parent | a47937454c995c54edce8a11c65ae24272198eaa (diff) |
Correct sequencer transform check
Check to avoid operating on same strip multiple times wasn't working.
Harmless but better make it functional.
-rw-r--r-- | source/blender/editors/transform/transform_conversions.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c index 12cf770d27c..56d742ff345 100644 --- a/source/blender/editors/transform/transform_conversions.c +++ b/source/blender/editors/transform/transform_conversions.c @@ -4920,14 +4920,12 @@ static void freeSeqData(TransInfo *t, TransCustomData *custom_data) { int overlap = 0; - seq_prev = NULL; - for (a = 0; a < t->total; a++, td++) { + for (a = 0, seq_prev = NULL; a < t->total; a++, td++, seq_prev = seq) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev) && (seq->depth == 0) && (seq->flag & SEQ_OVERLAP)) { overlap = 1; break; } - seq_prev = seq; } if (overlap) { @@ -4936,8 +4934,7 @@ static void freeSeqData(TransInfo *t, TransCustomData *custom_data) seq->tmp = NULL; td = t->data; - seq_prev = NULL; - for (a = 0; a < t->total; a++, td++) { + for (a = 0, seq_prev = NULL; a < t->total; a++, td++, seq_prev = seq) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { /* check effects strips, we cant change their time */ @@ -4945,17 +4942,18 @@ static void freeSeqData(TransInfo *t, TransCustomData *custom_data) has_effect = true; } else { - /* Tag seq with a non zero value, used by BKE_sequence_base_shuffle_time to identify the ones to shuffle */ + /* Tag seq with a non zero value, + * used by BKE_sequence_base_shuffle_time to identify the ones to shuffle */ seq->tmp = (void *)1; } } + } if (t->flag & T_ALT_TRANSFORM) { int minframe = MAXFRAME; td = t->data; - seq_prev = NULL; - for (a = 0; a < t->total; a++, td++) { + for (a = 0, seq_prev = NULL; a < t->total; a++, td++, seq_prev = seq) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { minframe = min_ii(minframe, seq->startdisp); @@ -4992,8 +4990,7 @@ static void freeSeqData(TransInfo *t, TransCustomData *custom_data) 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++) { + for (a = 0, seq_prev = NULL; a < t->total; a++, td++, seq_prev = seq) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) { @@ -5004,8 +5001,7 @@ static void freeSeqData(TransInfo *t, TransCustomData *custom_data) /* 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++) { + for (a = 0, seq_prev = NULL; a < t->total; a++, td++, seq_prev = seq) { seq = ((TransDataSeq *)td->extra)->seq; if ((seq != seq_prev)) { if ((seq->type & SEQ_TYPE_EFFECT) && seq->seq1) { |