Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Antalik <richardantalik@gmail.com>2021-10-07 01:10:37 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-10-07 01:10:37 +0300
commit877ba6b251bb5af673d023b243fd6da03e4a0fab (patch)
treecc33ddc9c3fcc8d0b31c5753f9a8ee221b396152 /source/blender/sequencer/intern/strip_add.c
parent306e9bff46ad721c1d3203bf7d83c1bef0d957f3 (diff)
Fix T91972: Meta changes length when adding strip
`SequencesMeta.new_movie()` API function caused meta strip to change length. Similar issue has been fixed in transform code by checking if `MetaStack` exists. `MetaStack` is not used when changing data in python. Provide `seqbase` to `SEQ_time_update_sequence()` so the function can check if change happens inside of meta strip. This patch also merges `seq_time_update_sequence_bounds()` into `SEQ_time_update_sequence()`. This is because same issue applies for both functions and it is confusing to have more time update functions.re if this will lead anywhere. Reviewed By: sergey Differential Revision: https://developer.blender.org/D12763
Diffstat (limited to 'source/blender/sequencer/intern/strip_add.c')
-rw-r--r--source/blender/sequencer/intern/strip_add.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/source/blender/sequencer/intern/strip_add.c b/source/blender/sequencer/intern/strip_add.c
index aa3f7c92dd8..6f635b5db5f 100644
--- a/source/blender/sequencer/intern/strip_add.c
+++ b/source/blender/sequencer/intern/strip_add.c
@@ -100,7 +100,7 @@ void SEQ_add_load_data_init(SeqLoadData *load_data,
static void seq_add_generic_update(Scene *scene, ListBase *seqbase, Sequence *seq)
{
SEQ_sequence_base_unique_name_recursive(scene, &scene->ed->seqbase, seq);
- SEQ_time_update_sequence_bounds(scene, seq);
+ SEQ_time_update_sequence(scene, seqbase, seq);
SEQ_sort(seqbase);
SEQ_relations_invalidate_cache_composite(scene, seq);
}
@@ -472,7 +472,7 @@ Sequence *SEQ_add_meta_strip(Scene *scene, ListBase *seqbase, SeqLoadData *load_
/* Set frames start and length. */
seqm->start = load_data->start_frame;
seqm->len = 1;
- SEQ_time_update_sequence(scene, seqm);
+ SEQ_time_update_sequence(scene, seqbase, seqm);
return seqm;
}
@@ -644,7 +644,9 @@ void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const boo
if (lock_range) {
/* keep so we don't have to move the actual start and end points (only the data) */
- SEQ_time_update_sequence_bounds(scene, seq);
+ Editing *ed = SEQ_editing_get(scene);
+ ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq);
+ SEQ_time_update_sequence(scene, seqbase, seq);
prev_startdisp = seq->startdisp;
prev_enddisp = seq->enddisp;
}
@@ -794,7 +796,8 @@ void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const boo
SEQ_transform_fix_single_image_seq_offsets(seq);
}
- SEQ_time_update_sequence(scene, seq);
+ ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(scene));
+ SEQ_time_update_sequence(scene, seqbase, seq);
}
void SEQ_add_movie_reload_if_needed(struct Main *bmain,