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_time.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_time.c')
-rw-r--r--source/blender/sequencer/intern/strip_time.c29
1 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/sequencer/intern/strip_time.c b/source/blender/sequencer/intern/strip_time.c
index fd6c0805c23..3c80e1dba27 100644
--- a/source/blender/sequencer/intern/strip_time.c
+++ b/source/blender/sequencer/intern/strip_time.c
@@ -148,7 +148,7 @@ void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq)
scene, metaseq, metaseq_start(metaseq), metaseq_end(metaseq));
}
-void SEQ_time_update_sequence_bounds(Scene *scene, Sequence *seq)
+static void seq_time_update_sequence_bounds(Scene *scene, Sequence *seq)
{
if (seq->startofs && seq->startstill) {
seq->startstill = 0;
@@ -195,7 +195,7 @@ void SEQ_time_update_meta_strip_range(Scene *scene, Sequence *seq_meta)
SEQ_transform_set_right_handle_frame(seq_meta, seq_meta->enddisp);
}
-void SEQ_time_update_sequence(Scene *scene, Sequence *seq)
+void SEQ_time_update_sequence(Scene *scene, ListBase *seqbase, Sequence *seq)
{
Sequence *seqm;
@@ -203,7 +203,7 @@ void SEQ_time_update_sequence(Scene *scene, Sequence *seq)
seqm = seq->seqbase.first;
while (seqm) {
if (seqm->seqbase.first) {
- SEQ_time_update_sequence(scene, seqm);
+ SEQ_time_update_sequence(scene, &seqm->seqbase, seqm);
}
seqm = seqm->next;
}
@@ -241,22 +241,25 @@ void SEQ_time_update_sequence(Scene *scene, Sequence *seq)
seq->len = seq->enddisp - seq->startdisp;
}
else {
- SEQ_time_update_sequence_bounds(scene, seq);
+ seq_time_update_sequence_bounds(scene, seq);
}
}
+ else if (seq->type == SEQ_TYPE_META) {
+ seq_time_update_meta_strip(scene, seq);
+ }
else {
- if (seq->type == SEQ_TYPE_META) {
- seq_time_update_meta_strip(scene, seq);
- }
+ seq_time_update_sequence_bounds(scene, seq);
+ }
- Editing *ed = SEQ_editing_get(scene);
- MetaStack *ms = SEQ_meta_stack_active_get(ed);
- if (ms != NULL) {
- SEQ_time_update_meta_strip_range(scene, ms->parseq);
- }
+ Editing *ed = SEQ_editing_get(scene);
- SEQ_time_update_sequence_bounds(scene, seq);
+ /* Strip is inside meta strip */
+ if (seqbase != &ed->seqbase) {
+ Sequence *meta = SEQ_get_meta_by_seqbase(&ed->seqbase, seqbase);
+ SEQ_time_update_meta_strip_range(scene, meta);
}
+
+ seq_time_update_sequence_bounds(scene, seq);
}
int SEQ_time_find_next_prev_edit(Scene *scene,