diff options
Diffstat (limited to 'source/blender/sequencer/intern/render.c')
-rw-r--r-- | source/blender/sequencer/intern/render.c | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/source/blender/sequencer/intern/render.c b/source/blender/sequencer/intern/render.c index 3f4d1e875f3..18b0794dc72 100644 --- a/source/blender/sequencer/intern/render.c +++ b/source/blender/sequencer/intern/render.c @@ -50,6 +50,7 @@ #include "RE_engine.h" #include "RE_pipeline.h" +#include "SEQ_channels.h" #include "SEQ_effects.h" #include "SEQ_iterator.h" #include "SEQ_modifier.h" @@ -72,6 +73,7 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, SeqRenderState *state, + ListBase *channels, ListBase *seqbasep, float timeline_frame, int chanshown); @@ -256,12 +258,14 @@ static int seq_channel_cmp_fn(const void *a, const void *b) return (*(Sequence **)a)->machine - (*(Sequence **)b)->machine; } -int seq_get_shown_sequences(ListBase *seqbase, +int seq_get_shown_sequences(ListBase *channels, + ListBase *seqbase, const int timeline_frame, const int chanshown, Sequence **r_seq_arr) { - SeqCollection *collection = SEQ_query_rendered_strips(seqbase, timeline_frame, chanshown); + SeqCollection *collection = SEQ_query_rendered_strips( + channels, seqbase, timeline_frame, chanshown); const int strip_count = BLI_gset_len(collection->set); if (strip_count > MAXSEQ) { @@ -1582,6 +1586,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context, { ImBuf *ibuf = NULL; ListBase *seqbase = NULL; + ListBase *channels = &seq->channels; int offset; seqbase = SEQ_get_seqbase_from_sequence(seq, &offset); @@ -1594,6 +1599,7 @@ static ImBuf *do_render_strip_seqbase(const SeqRenderData *context, ibuf = seq_render_strip_stack(context, state, + channels, seqbase, /* scene strips don't have their start taken into account */ frame_index + offset, @@ -1809,6 +1815,7 @@ static ImBuf *seq_render_strip_stack_apply_effect( static ImBuf *seq_render_strip_stack(const SeqRenderData *context, SeqRenderState *state, + ListBase *channels, ListBase *seqbasep, float timeline_frame, int chanshown) @@ -1818,7 +1825,8 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, int i; ImBuf *out = NULL; - count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, (Sequence **)&seq_arr); + count = seq_get_shown_sequences( + channels, seqbasep, timeline_frame, chanshown, (Sequence **)&seq_arr); if (count == 0) { return NULL; @@ -1909,6 +1917,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, Scene *scene = context->scene; Editing *ed = SEQ_editing_get(scene); ListBase *seqbasep; + ListBase *channels; if (ed == NULL) { return NULL; @@ -1918,9 +1927,11 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, int count = BLI_listbase_count(&ed->metastack); count = max_ii(count + chanshown, 0); seqbasep = ((MetaStack *)BLI_findlink(&ed->metastack, count))->oldbasep; + channels = ((MetaStack *)BLI_findlink(&ed->metastack, count))->old_channels; } else { seqbasep = ed->seqbasep; + channels = ed->displayed_channels; } SeqRenderState state; @@ -1929,7 +1940,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, Sequence *seq_arr[MAXSEQ + 1]; int count; - count = seq_get_shown_sequences(seqbasep, timeline_frame, chanshown, seq_arr); + count = seq_get_shown_sequences(channels, seqbasep, timeline_frame, chanshown, seq_arr); if (count) { out = seq_cache_get(context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT); @@ -1941,7 +1952,7 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, if (count && !out) { BLI_mutex_lock(&seq_render_mutex); - out = seq_render_strip_stack(context, &state, seqbasep, timeline_frame, chanshown); + out = seq_render_strip_stack(context, &state, channels, seqbasep, timeline_frame, chanshown); if (context->is_prefetch_render) { seq_cache_put(context, seq_arr[count - 1], timeline_frame, SEQ_CACHE_STORE_FINAL_OUT, out); @@ -1961,12 +1972,13 @@ ImBuf *SEQ_render_give_ibuf(const SeqRenderData *context, float timeline_frame, ImBuf *seq_render_give_ibuf_seqbase(const SeqRenderData *context, float timeline_frame, int chan_shown, + ListBase *channels, ListBase *seqbasep) { SeqRenderState state; seq_render_state_init(&state); - return seq_render_strip_stack(context, &state, seqbasep, timeline_frame, chan_shown); + return seq_render_strip_stack(context, &state, channels, seqbasep, timeline_frame, chan_shown); } ImBuf *SEQ_render_give_ibuf_direct(const SeqRenderData *context, @@ -2135,4 +2147,11 @@ void SEQ_render_thumbnails_base_set(const SeqRenderData *context, } } +bool SEQ_render_is_muted(const ListBase *channels, const Sequence *seq) +{ + + SeqTimelineChannel *channel = SEQ_channel_get_by_index(channels, seq->machine); + return seq->flag & SEQ_MUTE || SEQ_channel_is_muted(channel); +} + /** \} */ |