Fix T88466: Sound strips prevent strip rendering

When sound strip is above another strip such as movie strip, it prevents
from rendering movie strip.

This bug was introduced in 0b7744f4da. Function `must_render_strip()`
checks if there is any strip with `SEQ_BLEND_REPLACE` blending and
considers this strip as lowest strip in stack. Sound strips do have this
blend mode set, which caused the bug.

Remove all sound strips and muted strips from stack collection before
checking with `must_render_strip()` function
This commit is contained in:
Richard Antalik 2021-05-24 05:37:46 +02:00
parent 7e841c797f
commit 43153e2324
Notes: blender-bot 2023-02-14 09:44:56 +01:00
Referenced by issue #88466, VSE: If Movie strip is under a Sound strip it becomes invisible
1 changed files with 9 additions and 9 deletions

View File

@ -273,15 +273,6 @@ static bool seq_is_effect_of(const Sequence *seq_effect, const Sequence *possibl
* Order of applying these conditions is important. */
static bool must_render_strip(const Sequence *seq, SeqCollection *strips_under_playhead)
{
/* Sound strips are not rendered. */
if (seq->type == SEQ_TYPE_SOUND_RAM) {
return false;
}
/* Muted strips are not rendered. */
if ((seq->flag & SEQ_MUTE) != 0) {
return false;
}
bool seq_have_effect_in_stack = false;
Sequence *seq_iter;
SEQ_ITERATOR_FOREACH (seq_iter, strips_under_playhead) {
@ -340,6 +331,15 @@ static void collection_filter_channel_up_to_incl(SeqCollection *collection, cons
static void collection_filter_rendered_strips(SeqCollection *collection)
{
Sequence *seq;
/* Remove sound strips and muted strips from collection, because these are not rendered.
* Function must_render_strip() don't have to check for these strips anymore. */
SEQ_ITERATOR_FOREACH (seq, collection) {
if (seq->type == SEQ_TYPE_SOUND_RAM || (seq->flag & SEQ_MUTE) != 0) {
SEQ_collection_remove_strip(seq, collection);
}
}
SEQ_ITERATOR_FOREACH (seq, collection) {
if (must_render_strip(seq, collection)) {
continue;