Blender V4.5
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,
33 Strip *strip,
34 float timeline_frame,
35 float /*fac*/,
36 ImBuf * /*ibuf1*/,
37 ImBuf * /*ibuf2*/)
38{
39 ImBuf *out;
40 Editing *ed;
41
42 if (strip->multicam_source == 0 || strip->multicam_source >= strip->channel) {
43 return nullptr;
44 }
45
46 ed = context->scene->ed;
47 if (!ed) {
48 return nullptr;
49 }
50 ListBase *seqbasep = get_seqbase_by_strip(context->scene, strip);
51 ListBase *channels = get_channels_by_strip(ed, strip);
52 if (!seqbasep) {
53 return nullptr;
54 }
55
57 context, timeline_frame, strip->multicam_source, channels, seqbasep);
58
59 return out;
60}
61
68
69} // namespace blender::seq
#define out
ImBuf * seq_render_give_ibuf_seqbase(const RenderData *context, float timeline_frame, int chan_shown, ListBase *channels, ListBase *seqbasep)
Definition render.cc:2071
ListBase * get_seqbase_by_strip(const Scene *scene, Strip *strip)
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:91
static StripEarlyOut early_out_multicam(const Strip *, float)
static ImBuf * do_multicam(const RenderData *context, Strip *strip, float timeline_frame, float, ImBuf *, ImBuf *)
ImBuf *(* execute)(const RenderData *context, Strip *strip, float timeline_frame, float fac, ImBuf *ibuf1, ImBuf *ibuf2)
StripEarlyOut(* early_out)(const Strip *strip, float fac)