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/makesrna/intern/rna_sequencer.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/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index e519740259c..08dc01ff45b 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -303,7 +303,7 @@ static void do_sequence_frame_change_update(Scene *scene, Sequence *seq)
Editing *ed = SEQ_editing_get(scene);
ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq);
Sequence *tseq;
- SEQ_time_update_sequence_bounds(scene, seq);
+ SEQ_time_update_sequence(scene, seqbase, seq);
/* ensure effects are always fit in length to their input */
@@ -312,7 +312,7 @@ static void do_sequence_frame_change_update(Scene *scene, Sequence *seq)
*/
for (tseq = seqbase->first; tseq; tseq = tseq->next) {
if (tseq->seq1 || tseq->seq2 || tseq->seq3) {
- SEQ_time_update_sequence(scene, tseq);
+ SEQ_time_update_sequence(scene, seqbase, tseq);
}
}
@@ -756,13 +756,16 @@ static IDProperty **rna_Sequence_idprops(PointerRNA *ptr)
static bool rna_MovieSequence_reload_if_needed(ID *scene_id, Sequence *seq, Main *bmain)
{
Scene *scene = (Scene *)scene_id;
+ Editing *ed = SEQ_editing_get(scene);
+ ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq);
+
bool has_reloaded;
bool can_produce_frames;
SEQ_add_movie_reload_if_needed(bmain, scene, seq, &has_reloaded, &can_produce_frames);
if (has_reloaded && can_produce_frames) {
- SEQ_time_update_sequence(scene, seq);
+ SEQ_time_update_sequence(scene, seqbase, seq);
SEQ_relations_invalidate_cache_raw(scene, seq);
DEG_id_tag_update(&scene->id, ID_RECALC_SEQUENCER_STRIPS);
@@ -950,7 +953,9 @@ static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), Poin
Scene *scene = (Scene *)ptr->owner_id;
Sequence *seq = (Sequence *)(ptr->data);
SEQ_add_reload_new_file(bmain, scene, seq, true);
- SEQ_time_update_sequence(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);
rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
}