diff options
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_add.c')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_add.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_add.c b/source/blender/editors/space_sequencer/sequencer_add.c index 10c6e828e96..ea6d3351eaa 100644 --- a/source/blender/editors/space_sequencer/sequencer_add.c +++ b/source/blender/editors/space_sequencer/sequencer_add.c @@ -191,10 +191,11 @@ static int sequencer_generic_invoke_xy_guess_channel(bContext *C, int type) } for (seq = ed->seqbasep->first; seq; seq = seq->next) { - if ((ELEM(type, -1, seq->type)) && (seq->enddisp < timeline_frame) && - (timeline_frame - seq->enddisp < proximity)) { + const int strip_end = SEQ_time_right_handle_frame_get(seq); + if ((ELEM(type, -1, seq->type)) && (strip_end < timeline_frame) && + (timeline_frame - strip_end < proximity)) { tgt = seq; - proximity = timeline_frame - seq->enddisp; + proximity = timeline_frame - strip_end; } } @@ -785,7 +786,6 @@ static void seq_build_proxy(bContext *C, SeqCollection *movie_strips) } static void sequencer_add_movie_clamp_sound_strip_length(Scene *scene, - ListBase *seqbase, Sequence *seq_movie, Sequence *seq_sound) { @@ -793,9 +793,8 @@ static void sequencer_add_movie_clamp_sound_strip_length(Scene *scene, return; } - 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); + SEQ_time_right_handle_frame_set(scene, seq_sound, SEQ_time_right_handle_frame_get(seq_movie)); + SEQ_time_left_handle_frame_set(scene, seq_sound, SEQ_time_left_handle_frame_get(seq_movie)); } static void sequencer_add_movie_multiple_strips(bContext *C, @@ -833,7 +832,7 @@ static void sequencer_add_movie_multiple_strips(bContext *C, else { if (RNA_boolean_get(op->ptr, "sound")) { seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data); - sequencer_add_movie_clamp_sound_strip_length(scene, ed->seqbasep, seq_movie, seq_sound); + sequencer_add_movie_clamp_sound_strip_length(scene, seq_movie, seq_sound); if (seq_sound) { /* The video has sound, shift the video strip up a channel to make room for the sound @@ -842,7 +841,8 @@ static void sequencer_add_movie_multiple_strips(bContext *C, } } - load_data->start_frame += seq_movie->enddisp - seq_movie->startdisp; + load_data->start_frame += SEQ_time_right_handle_frame_get(seq_movie) - + SEQ_time_left_handle_frame_get(seq_movie); if (overlap_shuffle_override) { has_seq_overlap |= seq_load_apply_generic_options_only_test_overlap( C, op, seq_sound, strip_col); @@ -890,7 +890,7 @@ static bool sequencer_add_movie_single_strip(bContext *C, } if (RNA_boolean_get(op->ptr, "sound")) { seq_sound = SEQ_add_sound_strip(bmain, scene, ed->seqbasep, load_data); - sequencer_add_movie_clamp_sound_strip_length(scene, ed->seqbasep, seq_movie, seq_sound); + sequencer_add_movie_clamp_sound_strip_length(scene, seq_movie, seq_sound); if (seq_sound) { /* The video has sound, shift the video strip up a channel to make room for the sound * strip. */ @@ -1073,7 +1073,8 @@ static void sequencer_add_sound_multiple_strips(bContext *C, } else { seq_load_apply_generic_options(C, op, seq); - load_data->start_frame += seq->enddisp - seq->startdisp; + load_data->start_frame += SEQ_time_right_handle_frame_get(seq) - + SEQ_time_left_handle_frame_get(seq); } } RNA_END; @@ -1300,8 +1301,7 @@ static int sequencer_add_image_strip_exec(bContext *C, wmOperator *op) /* Adjust length. */ if (load_data.image.len == 1) { - SEQ_time_right_handle_frame_set(seq, load_data.image.end_frame); - SEQ_time_update_sequence(scene, SEQ_active_seqbase_get(ed), seq); + SEQ_time_right_handle_frame_set(scene, seq, load_data.image.end_frame); } seq_load_apply_generic_options(C, op, seq); |