diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-11-08 23:05:18 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-11-08 23:19:17 +0300 |
commit | 62e32e7c2e039415f91cb5578c462f98417bad0b (patch) | |
tree | ddd3cc63a76ccaae70f6cbea38a749923f1b27f5 /source/blender/sequencer/intern/strip_time.c | |
parent | d80d7b8f70d8aa676ca8a71fbe6604455c429020 (diff) |
Fix VSE: Effect strip flickers when moving left handle
The issue was caused by refactoring, see 7afcfe111aacc8bc. Function
`SEQ_transform_fix_single_image_seq_offsets` modified offsets after
handle was moved, but this was not done correctly.
Remove function mentioned above and move strip start when moving left
handle of strips that have only single frame of content by design
(image, text, color, ...).
Diffstat (limited to 'source/blender/sequencer/intern/strip_time.c')
-rw-r--r-- | source/blender/sequencer/intern/strip_time.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index c484cd425c4..0b480b22e91 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -530,7 +530,18 @@ void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int timel timeline_frame = right_handle_orig_frame - 1; } - seq->startofs = timeline_frame - SEQ_time_start_frame_get(seq); + float offset = timeline_frame - SEQ_time_start_frame_get(seq); + + if (SEQ_transform_single_image_check(seq)) { + /* This strip has only 1 frame of content, that is always stretched to whole strip length. + * Therefore, strip start should be moved instead of adjusting offset. */ + SEQ_time_start_frame_set(scene, seq, timeline_frame); + seq->endofs += offset; + } + else { + seq->startofs = offset; + } + seq->startdisp = timeline_frame; /* Only to make files usable in older versions. */ SEQ_time_update_meta_strip_range(scene, seq_sequence_lookup_meta_by_seq(scene, seq)); |