diff options
author | Peter Fog <tintwotin> | 2021-09-27 15:36:56 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-09-27 15:41:56 +0300 |
commit | 0419c74ae8b43cb259bd3539669eba52b4aa8fa5 (patch) | |
tree | b976195222d91a9efa473897c8905403cbc41191 /source/blender/sequencer/intern/effects.c | |
parent | 4a562f50778c39ce087432094cd4eac86821a0b5 (diff) |
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
Diffstat (limited to 'source/blender/sequencer/intern/effects.c')
-rw-r--r-- | source/blender/sequencer/intern/effects.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index 4448db013fe..427a8835879 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -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; } } |