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_transform.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_transform.c')
-rw-r--r--source/blender/sequencer/intern/strip_transform.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c
index 54ca4ef487f..8c214f66b96 100644
--- a/source/blender/sequencer/intern/strip_transform.c
+++ b/source/blender/sequencer/intern/strip_transform.c
@@ -253,7 +253,8 @@ void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delt
SEQ_transform_set_right_handle_frame(seq, seq->enddisp + delta);
}
- SEQ_time_update_sequence(evil_scene, seq);
+ ListBase *seqbase = SEQ_active_seqbase_get(SEQ_editing_get(evil_scene));
+ SEQ_time_update_sequence(evil_scene, seqbase, seq);
}
/* return 0 if there weren't enough space */
@@ -266,7 +267,7 @@ bool SEQ_transform_seqbase_shuffle_ex(ListBase *seqbasep,
BLI_assert(ELEM(channel_delta, -1, 1));
test->machine += channel_delta;
- SEQ_time_update_sequence(evil_scene, test);
+ SEQ_time_update_sequence(evil_scene, seqbasep, test);
while (SEQ_transform_test_overlap(seqbasep, test)) {
if ((channel_delta > 0) ? (test->machine >= MAXSEQ) : (test->machine < 1)) {
break;
@@ -275,7 +276,7 @@ bool SEQ_transform_seqbase_shuffle_ex(ListBase *seqbasep,
test->machine += channel_delta;
/* XXX: I don't think this is needed since were only moving vertically, Campbell. */
- SEQ_time_update_sequence(evil_scene, test);
+ SEQ_time_update_sequence(evil_scene, seqbasep, test);
}
if (!SEQ_valid_strip_channel(test)) {
@@ -295,7 +296,7 @@ bool SEQ_transform_seqbase_shuffle_ex(ListBase *seqbasep,
new_frame = new_frame + (test->start - test->startdisp); /* adjust by the startdisp */
SEQ_transform_translate_sequence(evil_scene, test, new_frame - test->start);
- SEQ_time_update_sequence(evil_scene, test);
+ SEQ_time_update_sequence(evil_scene, seqbasep, test);
return false;
}
@@ -355,7 +356,7 @@ static int shuffle_seq_time_offset(SeqCollection *strips_to_shuffle,
}
SEQ_ITERATOR_FOREACH (seq, strips_to_shuffle) {
- SEQ_time_update_sequence_bounds(scene, seq); /* corrects dummy startdisp/enddisp values */
+ SEQ_time_update_sequence(scene, seqbasep, seq); /* corrects dummy startdisp/enddisp values */
}
return tot_ofs;
@@ -408,7 +409,7 @@ void SEQ_transform_offset_after_frame(Scene *scene,
LISTBASE_FOREACH (Sequence *, seq, seqbase) {
if (seq->startdisp >= timeline_frame) {
SEQ_transform_translate_sequence(scene, seq, delta);
- SEQ_time_update_sequence(scene, seq);
+ SEQ_time_update_sequence(scene, seqbase, seq);
SEQ_relations_invalidate_cache_preprocessed(scene, seq);
}
}