diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-10-04 22:21:50 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-10-04 22:24:09 +0300 |
commit | 82de17c801e429c8e92a3c3683c59fdf74427997 (patch) | |
tree | b195df84b8d9811d46bcb4fea0dc898c73d44d18 /source | |
parent | 6309f6771829eea795b5e8cb06c6ebc506627fde (diff) |
Cleanup: VSE: Rename `val` to `timeline_frame`
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/sequencer/SEQ_time.h | 8 | ||||
-rw-r--r-- | source/blender/sequencer/intern/strip_time.c | 20 |
2 files changed, 16 insertions, 12 deletions
diff --git a/source/blender/sequencer/SEQ_time.h b/source/blender/sequencer/SEQ_time.h index 8f8dddefee8..8a67753d9d2 100644 --- a/source/blender/sequencer/SEQ_time.h +++ b/source/blender/sequencer/SEQ_time.h @@ -96,12 +96,16 @@ int SEQ_time_right_handle_frame_get(const struct Scene *scene, const struct Sequ /** * Set frame where strip boundary starts. This function moves only handle, content is not moved. */ -void SEQ_time_left_handle_frame_set(const struct Scene *scene, struct Sequence *seq, int val); +void SEQ_time_left_handle_frame_set(const struct Scene *scene, + struct Sequence *seq, + int timeline_frame); /** * Set frame where strip boundary ends. * This function moves only handle, content is not moved. */ -void SEQ_time_right_handle_frame_set(const struct Scene *scene, struct Sequence *seq, int val); +void SEQ_time_right_handle_frame_set(const struct Scene *scene, + struct Sequence *seq, + int timeline_frame); /** * Get number of frames (in timeline) that can be rendered. * This can change depending on scene FPS or strip speed factor. diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c index 5ebb5915763..c484cd425c4 100644 --- a/source/blender/sequencer/intern/strip_time.c +++ b/source/blender/sequencer/intern/strip_time.c @@ -522,31 +522,31 @@ int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq) return SEQ_time_content_end_frame_get(scene, seq) - seq->endofs; } -void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int val) +void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int timeline_frame) { const float right_handle_orig_frame = SEQ_time_right_handle_frame_get(scene, seq); - if (val >= right_handle_orig_frame) { - val = right_handle_orig_frame - 1; + if (timeline_frame >= right_handle_orig_frame) { + timeline_frame = right_handle_orig_frame - 1; } - seq->startofs = val - SEQ_time_start_frame_get(seq); - seq->startdisp = val; /* Only to make files usable in older versions. */ + seq->startofs = timeline_frame - SEQ_time_start_frame_get(seq); + 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)); seq_time_update_effects_strip_range(scene, seq_sequence_lookup_effects_by_seq(scene, seq)); } -void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int val) +void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int timeline_frame) { const float left_handle_orig_frame = SEQ_time_left_handle_frame_get(scene, seq); - if (val <= left_handle_orig_frame) { - val = left_handle_orig_frame + 1; + if (timeline_frame <= left_handle_orig_frame) { + timeline_frame = left_handle_orig_frame + 1; } - seq->endofs = SEQ_time_content_end_frame_get(scene, seq) - val; - seq->enddisp = val; /* Only to make files usable in older versions. */ + seq->endofs = SEQ_time_content_end_frame_get(scene, seq) - timeline_frame; + seq->enddisp = 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)); seq_time_update_effects_strip_range(scene, seq_sequence_lookup_effects_by_seq(scene, seq)); |