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-06-17 04:40:44 +0300
committerRichard Antalik <richardantalik@gmail.com>2021-06-17 04:42:04 +0300
commite7003bc9654b217e5938d64fb40094035735de9b (patch)
tree632657a701424d1c5f9bdfd835daffe7d0723796 /source/blender/sequencer/intern/strip_transform.c
parentc73be23e176272da78b38f733fd56af09ebd7acf (diff)
VSE: Reduce transform code complexity
Reduce complexity of sequencer transform code by removing recursivity. This is possible by treating meta strips (mostly) as any other strip and containing all transform code within SEQ_ functions. Unfortunately internally meta strips still require special treatment, but all complexity from code all over transform code seems to be possible to contain within one function. Functional change: Previously adjusting handle of single image strip moved animation. Now animation is not moved, which is behavior for all other strips. Reviewed By: sergey, mano-wii Differential Revision: https://developer.blender.org/D11493
Diffstat (limited to 'source/blender/sequencer/intern/strip_transform.c')
-rw-r--r--source/blender/sequencer/intern/strip_transform.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/sequencer/intern/strip_transform.c b/source/blender/sequencer/intern/strip_transform.c
index a02d8a1428e..b969f531e68 100644
--- a/source/blender/sequencer/intern/strip_transform.c
+++ b/source/blender/sequencer/intern/strip_transform.c
@@ -233,14 +233,22 @@ void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delt
SEQ_offset_animdata(evil_scene, seq, delta);
seq->start += delta;
+ /* Meta strips requires special handling: their content is to be translated, and then frame range
+ * of the meta is to be updated for the updated content. */
if (seq->type == SEQ_TYPE_META) {
Sequence *seq_child;
for (seq_child = seq->seqbase.first; seq_child; seq_child = seq_child->next) {
SEQ_transform_translate_sequence(evil_scene, seq_child, delta);
}
+ /* Ensure that meta bounds are updated, but this function prevents resets seq->start and
+ * start/end point in timeline. */
+ SEQ_time_update_meta_strip_range(evil_scene, seq);
+ /* Move meta start/end points. */
+ SEQ_transform_set_left_handle_frame(seq, seq->startdisp + delta);
+ SEQ_transform_set_right_handle_frame(seq, seq->enddisp + delta);
}
- SEQ_time_update_sequence_bounds(evil_scene, seq);
+ SEQ_time_update_sequence(evil_scene, seq);
}
/* return 0 if there weren't enough space */