diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-01-29 14:49:18 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-01-29 14:49:18 +0300 |
commit | 642e5ec78cd2592ab1797b2e84eda060a223b4c5 (patch) | |
tree | e2fb7a6c7062185bf6126e4122478ed04d47759d /source | |
parent | 395dfff103e10687cb370cb3470ca667afd2acd5 (diff) | |
parent | aa123555d7a75c784f479b9572145f45862bcb2b (diff) |
Merge branch 'blender-v2.82-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/BKE_sequencer.h | 5 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 15 | ||||
-rw-r--r-- | source/blender/editors/transform/transform.c | 2 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 4 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert_sequencer.c | 10 |
5 files changed, 28 insertions, 8 deletions
diff --git a/source/blender/blenkernel/BKE_sequencer.h b/source/blender/blenkernel/BKE_sequencer.h index aba3a5d5b8d..bc312c7bb2b 100644 --- a/source/blender/blenkernel/BKE_sequencer.h +++ b/source/blender/blenkernel/BKE_sequencer.h @@ -413,7 +413,10 @@ bool BKE_sequence_base_shuffle_ex(struct ListBase *seqbasep, bool BKE_sequence_base_shuffle(struct ListBase *seqbasep, struct Sequence *test, struct Scene *evil_scene); -bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, struct Scene *evil_scene); +bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, + struct Scene *evil_scene, + ListBase *markers, + const bool use_sync_markers); bool BKE_sequence_base_isolated_sel_check(struct ListBase *seqbase); void BKE_sequencer_free_imbuf(struct Scene *scene, struct ListBase *seqbasep, bool for_render); struct Sequence *BKE_sequence_dupli_recursive(const struct Scene *scene_src, diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 70ec3035c3c..747ce18cada 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -4919,7 +4919,10 @@ static int shuffle_seq_time_offset(Scene *scene, ListBase *seqbasep, char dir) return tot_ofs; } -bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, Scene *evil_scene) +bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, + Scene *evil_scene, + ListBase *markers, + const bool use_sync_markers) { /* note: seq->tmp is used to tag strips to move */ @@ -4936,6 +4939,16 @@ bool BKE_sequence_base_shuffle_time(ListBase *seqbasep, Scene *evil_scene) seq->flag &= ~SEQ_OVERLAP; } } + + if (use_sync_markers && !(evil_scene->toolsettings->lock_markers) && (markers != NULL)) { + TimeMarker *marker; + /* affect selected markers - it's unlikely that we will want to affect all in this way? */ + for (marker = markers->first; marker; marker = marker->next) { + if (marker->flag & SELECT) { + marker->frame += offset; + } + } + } } return offset ? false : true; diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 7f1458def70..ec39b457082 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -2561,7 +2561,7 @@ int transformEnd(bContext *C, TransInfo *t) /* aftertrans does insert keyframes, and clears base flags; doesn't read transdata */ special_aftertrans_update(C, t); - /* free data */ + /* Free data, also handles overlap [in freeTransCustomData()]. */ postTrans(C, t); /* send events out for redraws */ diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index a214eb1c80b..869c23de74c 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -1892,8 +1892,8 @@ void special_aftertrans_update(bContext *C, TransInfo *t) SpaceSeq *sseq = (SpaceSeq *)t->sa->spacedata.first; - /* marker transform, not especially nice but we may want to move markers - * at the same time as keyframes in the dope sheet. */ + /* Marker transform, not especially nice but we may want to move markers + * at the same time as strips in the Video Sequencer. */ if ((sseq->flag & SEQ_MARKER_TRANS) && (canceled == 0)) { /* cant use TFM_TIME_EXTEND * for some reason EXTEND is changed into TRANSLATE, so use frame_side instead */ diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 86b6ebe3ffa..4baf0e8a3cb 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -381,6 +381,10 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c } if (overlap) { + const bool use_sync_markers = (((SpaceSeq *)t->sa->spacedata.first)->flag & + SEQ_MARKER_TRANS) != 0; + ListBase *markers = &t->scene->markers; + bool has_effect_root = false, has_effect_any = false; for (seq = seqbasep->first; seq; seq = seq->next) { seq->tmp = NULL; @@ -425,7 +429,7 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c } } - BKE_sequence_base_shuffle_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene, markers, use_sync_markers); for (seq = seqbasep->first; seq; seq = seq->next) { if (seq->machine >= MAXSEQ * 2) { @@ -437,10 +441,10 @@ static void freeSeqData(TransInfo *t, TransDataContainer *tc, TransCustomData *c } } - BKE_sequence_base_shuffle_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene, markers, use_sync_markers); } else { - BKE_sequence_base_shuffle_time(seqbasep, t->scene); + BKE_sequence_base_shuffle_time(seqbasep, t->scene, markers, use_sync_markers); } if (has_effect_any) { |