Fix issues when ungrouping meta changes the final sequencer render

Seems to be caused by the way how the most bottom strip in the stack
used to apply effect. Just rendering strip in this cases will not give
proper results.

Made it so effect is applying between empty imbuf and actual strip.
Seems to work by tests, but more intense testing is required.
This commit is contained in:
Sergey Sharybin 2014-06-04 22:05:33 +06:00
parent bc4043e797
commit ec97cb87f6
Notes: blender-bot 2023-02-14 10:32:59 +01:00
Referenced by issue #40491, grouping VSE strips can break translucency
2 changed files with 12 additions and 1 deletions

View File

@ -3028,7 +3028,13 @@ static ImBuf *seq_render_strip_stack(const SeqRenderData *context, ListBase *seq
break;
case EARLY_DO_EFFECT:
if (i == 0) {
out = seq_render_strip(context, seq, cfra);
ImBuf *ibuf1 = IMB_allocImBuf(context->rectx, context->recty, 32, IB_rect);
ImBuf *ibuf2 = seq_render_strip(context, seq, cfra);
out = seq_render_strip_stack_apply_effect(context, seq, cfra, ibuf1, ibuf2);
IMB_freeImBuf(ibuf1);
IMB_freeImBuf(ibuf2);
}
break;

View File

@ -2071,6 +2071,7 @@ static int sequencer_meta_make_exec(bContext *C, wmOperator *op)
while (seq) {
next = seq->next;
if (seq != seqm && (seq->flag & SELECT)) {
BKE_sequence_invalidate_cache(scene, seq);
channel_max = max_ii(seq->machine, channel_max);
BLI_remlink(ed->seqbasep, seq);
BLI_addtail(&seqm->seqbase, seq);
@ -2132,6 +2133,10 @@ static int sequencer_meta_separate_exec(bContext *C, wmOperator *UNUSED(op))
if (last_seq == NULL || last_seq->type != SEQ_TYPE_META)
return OPERATOR_CANCELLED;
for (seq = last_seq->seqbase.first; seq != NULL; seq = seq->next) {
BKE_sequence_invalidate_cache(scene, seq);
}
BLI_movelisttolist(ed->seqbasep, &last_seq->seqbase);
BLI_listbase_clear(&last_seq->seqbase);