[Bf-blender-cvs] [82de17c801e] master: Cleanup: VSE: Rename `val` to `timeline_frame`

Richard Antalik noreply at git.blender.org
Tue Oct 4 21:24:25 CEST 2022


Commit: 82de17c801e429c8e92a3c3683c59fdf74427997
Author: Richard Antalik
Date:   Tue Oct 4 21:21:50 2022 +0200
Branches: master
https://developer.blender.org/rB82de17c801e429c8e92a3c3683c59fdf74427997

Cleanup: VSE: Rename `val` to `timeline_frame`

===================================================================

M	source/blender/sequencer/SEQ_time.h
M	source/blender/sequencer/intern/strip_time.c

===================================================================

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));



More information about the Bf-blender-cvs mailing list