Fix issues when ungrouping meta changes the final sequencer render
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 4 Jun 2014 16:05:33 +0000 (22:05 +0600)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 4 Jun 2014 16:27:10 +0000 (22:27 +0600)
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.

source/blender/blenkernel/intern/sequencer.c
source/blender/editors/space_sequencer/sequencer_edit.c

index 6185f8de9d7423cf9383065190f3e8e669570d27..a1cd6b87a053baca8825917c29b50945c02a0f9b 100644 (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;
index 50efa881b39de65dfe14656b1df22931ceed1608..3c17b2986ff943b6ac0e357bc7e492f27f7951d1 100644 (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);