Blender V5.3
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 "PRF_profile.hh"
13
14#include "SEQ_channels.hh"
15#include "SEQ_render.hh"
16#include "SEQ_utils.hh"
17
18#include "effects.hh"
19#include "render.hh"
20
21namespace blender::seq {
22
23static StripEarlyOut early_out_multicam(const Strip * /*strip*/, float /*fac*/)
24{
26}
27
28static SeqResult do_multicam(const RenderData *context,
30 Strip *strip,
31 float timeline_frame,
32 float /*fac*/,
33 const SeqResult & /*ibuf1*/,
34 const SeqResult & /*ibuf2*/)
35{
37 if (strip->multicam_source == 0 || strip->multicam_source >= strip->channel) {
38 return {};
39 }
40
41 Editing *ed = context->scene->ed;
42 if (!ed || state->strips_in_progress.contains(strip)) {
43 return {};
44 }
45 ListBaseT<Strip> *seqbasep = get_seqbase_by_strip(context->scene, strip);
46 ListBaseT<SeqTimelineChannel> *channels = get_channels_by_strip(ed, strip);
47 if (!seqbasep) {
48 return {};
49 }
50
51 state->strips_in_progress.add(strip);
53 context, state, timeline_frame, strip->multicam_source, channels, seqbasep);
54 state->strips_in_progress.remove(strip);
55
56 return out;
57}
58
64
65} // namespace blender::seq
#define PRF_scope_with_name(ui_name, category)
const int state
ListBaseT< Strip > * get_seqbase_by_strip(const Scene *scene, Strip *strip)
static SeqResult do_multicam(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float, const SeqResult &, const SeqResult &)
SeqResult seq_render_give_ibuf_seqbase(const RenderData *context, SeqRenderState *state, float timeline_frame, int chan_shown, ListBaseT< SeqTimelineChannel > *channels, ListBaseT< Strip > *seqbasep)
Definition render.cc:2213
void multi_camera_effect_get_handle(EffectHandle &rval)
ListBaseT< SeqTimelineChannel > * get_channels_by_strip(Editing *ed, const Strip *strip)
Definition channels.cc:65
static StripEarlyOut early_out_multicam(const Strip *, float)
StripEarlyOut(*) early_out(const Strip *strip, float fac)
Definition effects.hh:49
SeqResult(*) execute(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame, float fac, const SeqResult &input1, const SeqResult &input2)
Definition effects.hh:52