Blender V5.0
vse_effect_multi_camera.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include "DNA_scene_types.h"
10#include "DNA_sequence_types.h"
11
12#include "SEQ_channels.hh"
13#include "SEQ_render.hh"
14#include "SEQ_utils.hh"
15
16#include "effects.hh"
17#include "render.hh"
18
19namespace blender::seq {
20
21/* No effect inputs for multi-camera, we use #give_ibuf_seq. */
23{
24 return 0;
25}
26
27static StripEarlyOut early_out_multicam(const Strip * /*strip*/, float /*fac*/)
28{
30}
31
32static ImBuf *do_multicam(const RenderData *context,
34 Strip *strip,
35 float timeline_frame,
36 float /*fac*/,
37 ImBuf * /*ibuf1*/,
38 ImBuf * /*ibuf2*/)
39{
40 ImBuf *out;
41 Editing *ed;
42
43 if (strip->multicam_source == 0 || strip->multicam_source >= strip->channel) {
44 return nullptr;
45 }
46
47 ed = context->scene->ed;
48 if (!ed || state->strips_rendering_seqbase.contains(strip)) {
49 return nullptr;
50 }
51 ListBase *seqbasep = get_seqbase_by_strip(context->scene, strip);
52 ListBase *channels = get_channels_by_strip(ed, strip);
53 if (!seqbasep) {
54 return nullptr;
55 }
56
57 state->strips_rendering_seqbase.add(strip);
59 context, state, timeline_frame, strip->multicam_source, channels, seqbasep);
60
61 return out;
62}
63
70
71} // namespace blender::seq
#define out
static ulong state[N]
ImBuf * seq_render_give_ibuf_seqbase(const RenderData *context, SeqRenderState *state, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
Definition render.cc:2089
ListBase * get_seqbase_by_strip(const Scene *scene, Strip *strip)
static ImBuf * do_multicam(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float, ImBuf *, ImBuf *)
static int num_inputs_multicam()
void multi_camera_effect_get_handle(EffectHandle &rval)
ListBase * get_channels_by_strip(Editing *ed, const Strip *strip)
Definition channels.cc:86
static StripEarlyOut early_out_multicam(const Strip *, float)
ImBuf *(* execute)(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
StripEarlyOut(* early_out)(const Strip *strip, float fac)