Blender V5.0
SEQ_effects.hh
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2004 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#pragma once
6
7#include "DNA_vec_types.h"
8
10#include "BLI_vector.hh"
11
15
16struct ImBuf;
17struct Scene;
18struct Strip;
19struct TextVars;
20
21namespace blender::seq {
22
23struct SeqRenderState;
24struct RenderData;
25
26enum class StripEarlyOut {
27 NoInput = -1, /* No input needed. */
28 DoEffect = 0, /* No early out (do the effect). */
29 UseInput1 = 1, /* Output = input1. */
30 UseInput2 = 2, /* Output = input2. */
31};
32
34 /* constructors & destructor */
35 /* init is _only_ called on first creation */
36 void (*init)(Strip *strip);
37
38 /* number of input strips needed
39 * (called directly after construction) */
40 int (*num_inputs)();
41
42 /* load is called first time after readblenfile in
43 * get_sequence_effect automatically */
44 void (*load)(Strip *seqconst);
45
46 /* duplicate */
47 void (*copy)(Strip *dst, const Strip *src, int flag);
48
49 /* destruct */
50 void (*free)(Strip *strip, bool do_id_user);
51
52 StripEarlyOut (*early_out)(const Strip *strip, float fac);
53
54 /* sets the default `fac` value */
55 void (*get_default_fac)(const Scene *scene,
56 const Strip *strip,
57 float timeline_frame,
58 float *fac);
59
60 /* execute the effect */
61 ImBuf *(*execute)(const RenderData *context,
63 Strip *strip,
64 float timeline_frame,
65 float fac,
66 ImBuf *ibuf1,
67 ImBuf *ibuf2);
68};
69
73int effect_get_num_inputs(int strip_type);
74void effect_text_font_unload(TextVars *data, bool do_id_user);
75void effect_text_font_load(TextVars *data, bool do_id_user);
76bool effects_can_render_text(const Strip *strip);
77
78struct CharInfo {
79 int index = 0;
80 int offset = 0; /* Offset in bytes within text buffer. */
81 int byte_length = 0;
82 float2 position{0.0f, 0.0f};
83 int advance_x = 0;
84 bool do_wrap = false;
85};
86
91
94
95 rcti text_boundbox; /* Bound-box used for box drawing and selection. */
99 int font;
100 bool editing_is_active; /* UI uses this to differentiate behavior. */
101};
102
103} // namespace blender::seq
BMesh const char void * data
static ulong state[N]
EffectHandle strip_effect_handle_get(Strip *strip)
Definition effects.cc:290
void effect_text_font_load(TextVars *data, const bool do_id_user)
bool effects_can_render_text(const Strip *strip)
void effect_text_font_unload(TextVars *data, const bool do_id_user)
int effect_get_num_inputs(int strip_type)
Definition effects.cc:327
VecBase< float, 2 > float2
void(* copy)(Strip *dst, const Strip *src, int flag)
void(* get_default_fac)(const Scene *scene, const Strip *strip, float timeline_frame, float *fac)
void(* free)(Strip *strip, bool do_id_user)
StripEarlyOut(* early_out)(const Strip *strip, float fac)
void(* load)(Strip *seqconst)
void(* init)(Strip *strip)
Vector< CharInfo > characters
uint8_t flag
Definition wm_window.cc:145