VSE: Clamp resulting frame in multiply mode

The clamp added will ensure immediate speed direction change on
changing to/from positive/negative speed factor when using the Speed
effect strip's Multiply mode.

Reviewed By: ISS, sergey

Differential Revision: https://developer.blender.org/D12462
This commit is contained in:
Peter Fog 2021-09-27 14:36:56 +02:00 committed by Richard Antalik
parent 4a562f5077
commit 0419c74ae8
1 changed files with 1 additions and 0 deletions

View File

@ -3154,6 +3154,7 @@ void seq_effect_speed_rebuild_map(Scene *scene, Sequence *seq)
float target_frame = 0;
for (int frame_index = 1; frame_index < effect_strip_length; frame_index++) {
target_frame += evaluate_fcurve(fcu, seq->startdisp + frame_index);
CLAMP(target_frame, 0, seq->seq1->len);
v->frameMap[frame_index] = target_frame;
}
}