diff options
author | Joerg Mueller <nexyon@gmail.com> | 2010-07-13 19:19:15 +0400 |
---|---|---|
committer | Joerg Mueller <nexyon@gmail.com> | 2010-07-13 19:19:15 +0400 |
commit | e86b78c47c7ebfd15ea51de99c02e45790cbf9d7 (patch) | |
tree | 80a1227acfad33e39dd55335657849e85d636497 /source/blender/blenkernel | |
parent | 44f1decdc01ffdf8002261c78397b68a9f40b12c (diff) |
Merging revision 30264:30270 from my GSoC branch to trunk, logs:
Bugfix for [#22284] Blender cursor gets stuck in the timeline when scrubbing (jack transport).
Dirty hack fix for:
* [#22366] Cutting audio and meta strips with audio does not actually cut audio
* [#22639] Audio not clipped to meta bounds
Also fixed a seemingly symptomless bug in sequencer_edit.c
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 4a5d08f96cc..e8f8c2f3c3b 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -517,6 +517,31 @@ void calc_sequence_disp(Scene *scene, Sequence *seq) seq_update_sound(scene, seq); } +static void seq_update_sound_bounds_recursive(Scene *scene, Sequence *metaseq) +{ + Sequence *seq; + + /* for sound we go over full meta tree to update bounds of the sound strips, + since sound is played outside of evaluating the imbufs, */ + for(seq=metaseq->seqbase.first; seq; seq=seq->next) { + if(seq->type == SEQ_META) { + seq_update_sound_bounds_recursive(scene, seq); + } + else if((seq->type == SEQ_SOUND) || (seq->type == SEQ_SCENE)) { + if(seq->scene_sound) { + int startofs = seq->startofs; + int endofs = seq->endofs; + if(seq->startofs + seq->start < metaseq->start + metaseq->startofs) + startofs = metaseq->start + metaseq->startofs - seq->start; + + if(seq->start + seq->len - seq->endofs > metaseq->start + metaseq->len - metaseq->endofs) + endofs = seq->start + seq->len - metaseq->start - metaseq->len + metaseq->endofs; + sound_move_scene_sound(scene, seq->scene_sound, seq->start + startofs, seq->start+seq->len - endofs, startofs); + } + } + } +} + void calc_sequence(Scene *scene, Sequence *seq) { Sequence *seqm; @@ -576,6 +601,7 @@ void calc_sequence(Scene *scene, Sequence *seq) new_tstripdata(seq); } } + seq_update_sound_bounds_recursive(scene, seq); } calc_sequence_disp(scene, seq); } |