Blender V5.3
render.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2024 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
10
11#include "DNA_listBase.h"
12
14#include "BLI_set.hh"
15
16namespace blender {
17
18struct Depsgraph;
19struct ImBuf;
20struct Mask;
21struct RenderData;
22struct Scene;
24struct Strip;
25
26namespace seq {
27
28/* Recursion protection while rendering a single sequencer frame.
29 * If the same scene or strip is seen, recursion stops. */
33
34 /* Is the top-level render request for the scene's currently evaluated frame. */
35 bool is_current_frame = false;
36};
37
38/* Strip corner coordinates in screen pixel space. Note that they might not be
39 * axis aligned when rotation is present. */
42
43 bool is_empty() const
44 {
45 return v0 == v1 && v2 == v3 && v0 == v2;
46 }
47};
48
53struct SeqResult {
54 bool is_valid() const
55 {
56 return image != nullptr;
57 }
58
59 ImBuf *image = nullptr;
60 /* How much the resulting image should be translated, in pixels. */
63};
64
67 float timeline_frame,
68 int chan_shown,
69 ListBaseT<SeqTimelineChannel> *channels,
70 ListBaseT<Strip> *seqbasep);
73 Strip *strip,
74 float timeline_frame);
75
76/* Renders Mask into an image suitable for sequencer:
77 * RGB channels contain mask intensity; alpha channel is opaque. */
78ImBuf *seq_render_mask(Depsgraph *depsgraph,
79 int width,
80 int height,
81 const Mask *mask,
82 float frame_index,
83 bool make_float);
84
85/* Converts image to sequencer color space, if needed. */
86void ensure_ibuf_is_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float);
87
89void seq_imbuf_assign_sequencer_space(const Scene *scene, ImBuf *ibuf);
90
91StripScreenQuad get_strip_screen_quad(const RenderData *context, const Strip *strip);
92
94void ensure_ibuf_is_rgba(ImBuf *ibuf);
95bool seq_strip_do_multiview_render(const Scene *scene,
96 const Strip *strip,
97 const char *filepath,
98 char *r_prefix);
99
100} // namespace seq
101} // namespace blender
These structs are the foundation for all linked lists in the library system.
const int state
void ensure_ibuf_is_sequencer_space(const Scene *scene, ImBuf *ibuf, bool make_float)
Definition render.cc:170
bool seq_strip_do_multiview_render(const Scene *scene, const Strip *strip, const char *filepath, char *r_prefix)
Definition render.cc:959
void ensure_ibuf_is_rgba(ImBuf *ibuf)
Definition render.cc:903
SeqResult seq_render_strip(const RenderData *context, SeqRenderState *state, Strip *strip, float timeline_frame)
Definition render.cc:1903
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
StripScreenQuad get_strip_screen_quad(const RenderData *context, const Strip *strip)
Definition render.cc:240
ImBuf * seq_render_mask(Depsgraph *depsgraph, int width, int height, const Mask *mask, float frame_index, bool make_float)
Definition render.cc:1331
void seq_imbuf_assign_sequencer_space(const Scene *scene, ImBuf *ibuf)
Definition render.cc:108
BMesh Iterators.
VecBase< float, 2 > float2
Set< Strip * > strips_in_progress
Definition render.hh:32
Set< Scene * > scenes_in_progress
Definition render.hh:31
bool is_valid() const
Definition render.hh:54
bool is_opaque_before_transform
Definition render.hh:62