Blender  V2.93
SEQ_effects.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2004 Blender Foundation.
17  * All rights reserved.
18  */
19 
20 #pragma once
21 
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29 
30 struct ImBuf;
31 struct SeqRenderData;
32 struct Sequence;
33 struct TextVars;
34 
35 /* Wipe effect */
36 enum {
39  /* DO_BOX_WIPE, */ /* UNUSED */
40  /* DO_CROSS_WIPE, */ /* UNUSED */
43 };
44 
48 
49  /* constructors & destructor */
50  /* init is _only_ called on first creation */
51  void (*init)(struct Sequence *seq);
52 
53  /* number of input strips needed
54  * (called directly after construction) */
55  int (*num_inputs)(void);
56 
57  /* load is called first time after readblenfile in
58  * get_sequence_effect automatically */
59  void (*load)(struct Sequence *seqconst);
60 
61  /* duplicate */
62  void (*copy)(struct Sequence *dst, struct Sequence *src, const int flag);
63 
64  /* destruct */
65  void (*free)(struct Sequence *seq, const bool do_id_user);
66 
67  /* returns: -1: no input needed,
68  * 0: no early out,
69  * 1: out = ibuf1,
70  * 2: out = ibuf2 */
71  int (*early_out)(struct Sequence *seq, float facf0, float facf1);
72 
73  /* stores the y-range of the effect IPO */
74  void (*store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax);
75 
76  /* stores the default facf0 and facf1 if no IPO is present */
77  void (*get_default_fac)(struct Sequence *seq, float timeline_frame, float *facf0, float *facf1);
78 
79  /* execute the effect
80  * sequence effects are only required to either support
81  * float-rects or byte-rects
82  * (mixed cases are handled one layer up...) */
83 
84  struct ImBuf *(*execute)(const struct SeqRenderData *context,
85  struct Sequence *seq,
86  float timeline_frame,
87  float facf0,
88  float facf1,
89  struct ImBuf *ibuf1,
90  struct ImBuf *ibuf2,
91  struct ImBuf *ibuf3);
92 
93  struct ImBuf *(*init_execution)(const struct SeqRenderData *context,
94  struct ImBuf *ibuf1,
95  struct ImBuf *ibuf2,
96  struct ImBuf *ibuf3);
97 
98  void (*execute_slice)(const struct SeqRenderData *context,
99  struct Sequence *seq,
100  float timeline_frame,
101  float facf0,
102  float facf1,
103  struct ImBuf *ibuf1,
104  struct ImBuf *ibuf2,
105  struct ImBuf *ibuf3,
106  int start_line,
107  int total_lines,
108  struct ImBuf *out);
109 };
110 
112 int SEQ_effect_get_num_inputs(int seq_type);
113 void SEQ_effect_text_font_unload(struct TextVars *data, const bool do_id_user);
114 void SEQ_effect_text_font_load(struct TextVars *data, const bool do_id_user);
115 
116 #ifdef __cplusplus
117 }
118 #endif
void SEQ_effect_text_font_load(struct TextVars *data, const bool do_id_user)
Definition: effects.c:3849
int SEQ_effect_get_num_inputs(int seq_type)
Definition: effects.c:4328
@ DO_IRIS_WIPE
Definition: SEQ_effects.h:41
@ DO_CLOCK_WIPE
Definition: SEQ_effects.h:42
@ DO_DOUBLE_WIPE
Definition: SEQ_effects.h:38
@ DO_SINGLE_WIPE
Definition: SEQ_effects.h:37
void SEQ_effect_text_font_unload(struct TextVars *data, const bool do_id_user)
Definition: effects.c:3833
struct SeqEffectHandle SEQ_effect_handle_get(struct Sequence *seq)
Definition: effects.c:4291
struct SELECTID_Context context
Definition: select_engine.c:47
int(* early_out)(struct Sequence *seq, float facf0, float facf1)
Definition: SEQ_effects.h:71
void(* get_default_fac)(struct Sequence *seq, float timeline_frame, float *facf0, float *facf1)
Definition: SEQ_effects.h:77
int(* num_inputs)(void)
Definition: SEQ_effects.h:55
void(* init)(struct Sequence *seq)
Definition: SEQ_effects.h:51
void(* execute_slice)(const struct SeqRenderData *context, struct Sequence *seq, float timeline_frame, float facf0, float facf1, struct ImBuf *ibuf1, struct ImBuf *ibuf2, struct ImBuf *ibuf3, int start_line, int total_lines, struct ImBuf *out)
Definition: SEQ_effects.h:98
void(* load)(struct Sequence *seqconst)
Definition: SEQ_effects.h:59
void(* store_icu_yrange)(struct Sequence *seq, short adrcode, float *ymin, float *ymax)
Definition: SEQ_effects.h:74
void(* copy)(struct Sequence *dst, struct Sequence *src, const int flag)
Definition: SEQ_effects.h:62
void(* free)(struct Sequence *seq, const bool do_id_user)
Definition: SEQ_effects.h:65