diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-01-25 08:01:14 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-01-25 08:01:14 +0300 |
commit | b90ccaa0672e353d7ed929d0062684c0e60ae090 (patch) | |
tree | a8ad15db5dd3a2b741b3c86e19d3f205f281ef78 | |
parent | d6bbcc4f666b257fed3e6f8ec468d0efff5b591f (diff) | |
parent | 5501a5de32db99a944fc6edfb02e3ba2d07de772 (diff) |
Merge branch 'blender-v2.92-release'
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_edit.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 4f9fbc44631..f470d1913dc 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -324,19 +324,27 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) } } - /* Recalculate bounds of effect strips. */ + /* Recalculate bounds of effect strips, offsetting the keyframes if not snapping any handle. */ for (seq = ed->seqbasep->first; seq; seq = seq->next) { if (seq->type & SEQ_TYPE_EFFECT) { + const bool either_handle_selected = (seq->flag & (SEQ_LEFTSEL | SEQ_RIGHTSEL)) != 0; + if (seq->seq1 && (seq->seq1->flag & SELECT)) { - SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + if (!either_handle_selected) { + SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + } SEQ_time_update_sequence(scene, seq); } else if (seq->seq2 && (seq->seq2->flag & SELECT)) { - SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + if (!either_handle_selected) { + SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + } SEQ_time_update_sequence(scene, seq); } else if (seq->seq3 && (seq->seq3->flag & SELECT)) { - SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + if (!either_handle_selected) { + SEQ_offset_animdata(scene, seq, (snap_frame - seq->startdisp)); + } SEQ_time_update_sequence(scene, seq); } } |