1 /* SPDX-FileCopyrightText: 2004 Blender Authors
3 * SPDX-License-Identifier: GPL-2.0-or-later */
7 #include "DNA_vec_types.h"
9 #include "BLI_math_vector_types.hh"
10 #include "BLI_vector.hh"
22 enum class StripEarlyOut
{
23 NoInput
= -1, /* No input needed. */
24 DoEffect
= 0, /* No early out (do the effect). */
25 UseInput1
= 1, /* Output = input1. */
26 UseInput2
= 2, /* Output = input2. */
33 /* DO_BOX_WIPE, */ /* UNUSED */
34 /* DO_CROSS_WIPE, */ /* UNUSED */
39 struct SeqEffectHandle
{
40 /* constructors & destructor */
41 /* init is _only_ called on first creation */
42 void (*init
)(Strip
*strip
);
44 /* number of input strips needed
45 * (called directly after construction) */
48 /* load is called first time after readblenfile in
49 * get_sequence_effect automatically */
50 void (*load
)(Strip
*seqconst
);
53 void (*copy
)(Strip
*dst
, const Strip
*src
, int flag
);
56 void (*free
)(Strip
*strip
, bool do_id_user
);
58 StripEarlyOut (*early_out
)(const Strip
*strip
, float fac
);
60 /* sets the default `fac` value */
61 void (*get_default_fac
)(const Scene
*scene
,
66 /* execute the effect */
67 ImBuf
*(*execute
)(const SeqRenderData
*context
,
75 SeqEffectHandle
SEQ_effect_handle_get(Strip
*strip
);
76 int SEQ_effect_get_num_inputs(int strip_type
);
77 void SEQ_effect_text_font_unload(TextVars
*data
, bool do_id_user
);
78 void SEQ_effect_text_font_load(TextVars
*data
, bool do_id_user
);
79 bool SEQ_effects_can_render_text(const Strip
*strip
);
81 namespace blender::seq
{
85 const char *str_ptr
= nullptr;
87 float2 position
{0.0f
, 0.0f
};
93 Vector
<CharInfo
> characters
;
97 struct TextVarsRuntime
{
98 Vector
<LineInfo
> lines
;
100 rcti text_boundbox
; /* Bound-box used for box drawing and selection. */
105 bool editing_is_active
; /* UI uses this to differentiate behavior. */
108 } // namespace blender::seq