Fix T98797: VSE Slip Strip Contents doesn't work properly

Caused by oversight in 7afcfe111a - code relied on fact, that strip
boundary holds old value until updated.

Calculate new offsets based on stored orignal offsets.
This commit is contained in:
Richard Antalik 2022-06-14 16:32:52 +02:00
parent 25f18e6c49
commit 06780aa4e6
Notes: blender-bot 2023-02-14 03:34:17 +01:00
Referenced by issue #98797, Regression: VSE Slip Strip Contents doesn't work properly
1 changed files with 2 additions and 10 deletions

View File

@ -581,21 +581,13 @@ static int sequencer_slip_invoke(bContext *C, wmOperator *op, const wmEvent *eve
static void sequencer_slip_recursively(Scene *scene, SlipData *data, int offset)
{
/* Iterate in reverse so meta-strips are iterated after their children. */
for (int i = data->num_seq - 1; i >= 0; i--) {
Sequence *seq = data->seq_array[i];
int endframe;
/* Offset seq start. */
seq->start = data->ts[i].start + offset;
if (data->trim[i]) {
/* Find the end-frame. */
endframe = seq->start + seq->len;
/* Compute the sequence offsets. */
seq->endofs = endframe - SEQ_time_right_handle_frame_get(seq);
seq->startofs = SEQ_time_left_handle_frame_get(seq) - seq->start;
seq->startofs = data->ts[i].startofs - offset;
seq->endofs = data->ts[i].endofs + offset;
}
}