diff options
author | Richard Antalik <richardantalik@gmail.com> | 2022-05-18 22:43:14 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2022-05-18 22:43:14 +0300 |
commit | 28316e08105965399ff1ad0ed770c064dcc2d6bd (patch) | |
tree | 68bb6f092fc93e751749d87b951bf9e2c9704913 /source/blender/editors | |
parent | 8ca9ce09865e6a617d6c2f78f3483ba1fd5d6aef (diff) |
Cleanup: Move strip handle manipulation to time section
Diffstat (limited to 'source/blender/editors')
5 files changed, 22 insertions, 23 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 5b0c5eac11b..84f99ec0ac0 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -38,7 +38,6 @@ #include "SEQ_iterator.h" #include "SEQ_sequencer.h" #include "SEQ_time.h" -#include "SEQ_transform.h" #include "anim_intern.h" @@ -112,9 +111,9 @@ static int seq_frame_apply_snap(bContext *C, Scene *scene, const int timeline_fr Sequence *seq; SEQ_ITERATOR_FOREACH (seq, strips) { seq_frame_snap_update_best( - SEQ_transform_get_left_handle_frame(seq), timeline_frame, &best_frame, &best_distance); + SEQ_time_left_handle_frame_get(seq), timeline_frame, &best_frame, &best_distance); seq_frame_snap_update_best( - SEQ_transform_get_right_handle_frame(seq), timeline_frame, &best_frame, &best_distance); + SEQ_time_right_handle_frame_get(seq), timeline_frame, &best_frame, &best_distance); } SEQ_collection_free(strips); diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index b3a3bb4a62b..10c6e828e96 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -793,8 +793,8 @@ static void sequencer_add_movie_clamp_sound_strip_length(Scene *scene, return; } - SEQ_transform_set_right_handle_frame(seq_sound, SEQ_transform_get_right_handle_frame(seq_movie)); - SEQ_transform_set_left_handle_frame(seq_sound, SEQ_transform_get_left_handle_frame(seq_movie)); + SEQ_time_right_handle_frame_set(seq_sound, SEQ_time_right_handle_frame_get(seq_movie)); + SEQ_time_left_handle_frame_set(seq_sound, SEQ_time_left_handle_frame_get(seq_movie)); SEQ_time_update_sequence(scene, seqbase, seq_sound); } @@ -1300,7 +1300,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) /* Adjust length. */ if (load_data.image.len == 1) { - SEQ_transform_set_right_handle_frame(seq, load_data.image.end_frame); + SEQ_time_right_handle_frame_set(seq, load_data.image.end_frame); SEQ_time_update_sequence(scene, SEQ_active_seqbase_get(ed), seq); } diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 2b01892bbe7..ef2b1f8b91d 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -1099,9 +1099,9 @@ static void draw_seq_background(Scene *scene, /* Draw the main strip body. */ if (is_single_image) { immRectf(pos, - SEQ_transform_get_left_handle_frame(seq), + SEQ_time_left_handle_frame_get(seq), y1, - SEQ_transform_get_right_handle_frame(seq), + SEQ_time_right_handle_frame_get(seq), y2); } else { diff --git a/source/blender/editors/space_sequencer/sequencer_edit.c b/source/blender/editors/space_sequencer/sequencer_edit.c index 7afc3684d3a..08f98dfb161 100644 --- a/source/blender/editors/space_sequencer/sequencer_edit.c +++ b/source/blender/editors/space_sequencer/sequencer_edit.c @@ -361,10 +361,10 @@ static int sequencer_snap_exec(bContext *C, wmOperator *op) } else { if (seq->flag & SEQ_LEFTSEL) { - SEQ_transform_set_left_handle_frame(seq, snap_frame); + SEQ_time_left_handle_frame_set(seq, snap_frame); } else { /* SEQ_RIGHTSEL */ - SEQ_transform_set_right_handle_frame(seq, snap_frame); + SEQ_time_right_handle_frame_set(seq, snap_frame); } SEQ_transform_handle_xlimits(seq, seq->flag & SEQ_LEFTSEL, seq->flag & SEQ_RIGHTSEL); SEQ_transform_fix_single_image_seq_offsets(seq); @@ -1858,8 +1858,8 @@ static int sequencer_separate_images_exec(bContext *C, wmOperator *op) /* TODO: remove f-curve and assign to split image strips. * The old animation system would remove the user of `seq->ipo`. */ - start_ofs = timeline_frame = SEQ_transform_get_left_handle_frame(seq); - frame_end = SEQ_transform_get_right_handle_frame(seq); + start_ofs = timeline_frame = SEQ_time_left_handle_frame_get(seq); + frame_end = SEQ_time_right_handle_frame_get(seq); while (timeline_frame < frame_end) { /* New seq. */ @@ -3113,8 +3113,8 @@ static int seq_cmp_time_startdisp_channel(const void *a, const void *b) Sequence *seq_a = (Sequence *)a; Sequence *seq_b = (Sequence *)b; - int seq_a_start = SEQ_transform_get_left_handle_frame(seq_a); - int seq_b_start = SEQ_transform_get_left_handle_frame(seq_b); + int seq_a_start = SEQ_time_left_handle_frame_get(seq_a); + int seq_b_start = SEQ_time_left_handle_frame_get(seq_b); /* If strips have the same start frame favor the one with a higher channel. */ if (seq_a_start == seq_b_start) { diff --git a/source/blender/editors/transform/transform_convert_sequencer.c b/source/blender/editors/transform/transform_convert_sequencer.c index 5964af7ed4b..3735ff0727c 100644 --- a/source/blender/editors/transform/transform_convert_sequencer.c +++ b/source/blender/editors/transform/transform_convert_sequencer.c @@ -91,8 +91,8 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *r_count, int *r_flag) /* *** Extend Transform *** */ int cfra = CFRA; - int left = SEQ_transform_get_left_handle_frame(seq); - int right = SEQ_transform_get_right_handle_frame(seq); + int left = SEQ_time_left_handle_frame_get(seq); + int right = SEQ_time_right_handle_frame_get(seq); if (((seq->flag & SELECT) == 0 || SEQ_transform_is_locked(channels, seq))) { *r_count = 0; @@ -173,16 +173,16 @@ static TransData *SeqToTransData( /* Use seq_tx_get_final_left() and an offset here * so transform has the left hand location of the strip. * tdsq->start_offset is used when flushing the tx data back */ - start_left = SEQ_transform_get_left_handle_frame(seq); + start_left = SEQ_time_left_handle_frame_get(seq); td2d->loc[0] = start_left; tdsq->start_offset = start_left - seq->start; /* use to apply the original location */ break; case SEQ_LEFTSEL: - start_left = SEQ_transform_get_left_handle_frame(seq); + start_left = SEQ_time_left_handle_frame_get(seq); td2d->loc[0] = start_left; break; case SEQ_RIGHTSEL: - td2d->loc[0] = SEQ_transform_get_right_handle_frame(seq); + td2d->loc[0] = SEQ_time_right_handle_frame_get(seq); break; } @@ -489,11 +489,11 @@ static void seq_transform_handle_overwrite_trim(Scene *scene, continue; } if (overlap == STRIP_OVERLAP_LEFT_SIDE) { - SEQ_transform_set_left_handle_frame(seq, transformed->enddisp); + SEQ_time_left_handle_frame_set(seq, transformed->enddisp); } else { BLI_assert(overlap == STRIP_OVERLAP_RIGHT_SIDE); - SEQ_transform_set_right_handle_frame(seq, transformed->startdisp); + SEQ_time_right_handle_frame_set(seq, transformed->startdisp); } SEQ_time_update_sequence(scene, seqbasep, seq); @@ -915,7 +915,7 @@ static void flushTransSeq(TransInfo *t) } case SEQ_LEFTSEL: { /* No vertical transform. */ int old_startdisp = seq->startdisp; - SEQ_transform_set_left_handle_frame(seq, new_frame); + SEQ_time_left_handle_frame_set(seq, new_frame); SEQ_transform_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); SEQ_transform_fix_single_image_seq_offsets(seq); SEQ_time_update_sequence(t->scene, seqbasep, seq); @@ -926,7 +926,7 @@ static void flushTransSeq(TransInfo *t) } case SEQ_RIGHTSEL: { /* No vertical transform. */ int old_enddisp = seq->enddisp; - SEQ_transform_set_right_handle_frame(seq, new_frame); + SEQ_time_right_handle_frame_set(seq, new_frame); SEQ_transform_handle_xlimits(seq, tdsq->flag & SEQ_LEFTSEL, tdsq->flag & SEQ_RIGHTSEL); SEQ_transform_fix_single_image_seq_offsets(seq); SEQ_time_update_sequence(t->scene, seqbasep, seq); |