Blender V4.5
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 RenderData;
24
25enum class StripEarlyOut {
26 NoInput = -1, /* No input needed. */
27 DoEffect = 0, /* No early out (do the effect). */
28 UseInput1 = 1, /* Output = input1. */
29 UseInput2 = 2, /* Output = input2. */
30};
31
32/* Wipe effect */
33enum {
36 /* DO_BOX_WIPE, */ /* UNUSED */
37 /* DO_CROSS_WIPE, */ /* UNUSED */
40};
41
43 /* constructors & destructor */
44 /* init is _only_ called on first creation */
45 void (*init)(Strip *strip);
46
47 /* number of input strips needed
48 * (called directly after construction) */
49 int (*num_inputs)();
50
51 /* load is called first time after readblenfile in
52 * get_sequence_effect automatically */
53 void (*load)(Strip *seqconst);
54
55 /* duplicate */
56 void (*copy)(Strip *dst, const Strip *src, int flag);
57
58 /* destruct */
59 void (*free)(Strip *strip, bool do_id_user);
60
61 StripEarlyOut (*early_out)(const Strip *strip, float fac);
62
63 /* sets the default `fac` value */
64 void (*get_default_fac)(const Scene *scene,
65 const Strip *strip,
66 float timeline_frame,
67 float *fac);
68
69 /* execute the effect */
70 ImBuf *(*execute)(const RenderData *context,
71 Strip *strip,
72 float timeline_frame,
73 float fac,
74 ImBuf *ibuf1,
75 ImBuf *ibuf2);
76};
77
81int effect_get_num_inputs(int strip_type);
82void effect_text_font_unload(TextVars *data, bool do_id_user);
83void effect_text_font_load(TextVars *data, bool do_id_user);
84bool effects_can_render_text(const Strip *strip);
85
86struct CharInfo {
87 int index = 0;
88 const char *str_ptr = nullptr;
89 int byte_length = 0;
90 float2 position{0.0f, 0.0f};
91 int advance_x = 0;
92 bool do_wrap = false;
93};
94
99
102
103 rcti text_boundbox; /* Bound-box used for box drawing and selection. */
107 int font;
108 bool editing_is_active; /* UI uses this to differentiate behavior. */
109};
110
111} // namespace blender::seq
BMesh const char void * data
EffectHandle strip_effect_handle_get(Strip *strip)
Definition effects.cc:249
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:286
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:139