2 * blenlib/DNA_sequence_types.h (mar-2001 nzc)
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
31 #ifndef DNA_SEQUENCE_TYPES_H
32 #define DNA_SEQUENCE_TYPES_H
34 #include "DNA_listBase.h"
36 /* needed for sound support */
37 #include "DNA_sound_types.h"
42 /* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */
44 typedef struct StripElem {
48 typedef struct TStripElem {
50 struct ImBuf *ibuf_comp;
51 struct TStripElem *se1, *se2, *se3;
57 typedef struct StripCrop {
64 typedef struct StripTransform {
69 typedef struct StripColorBalance {
79 typedef struct StripProxy {
88 typedef struct Strip {
89 struct Strip *next, *prev;
90 int rt, len, us, done;
91 int startstill, endstill;
97 StripTransform *transform;
98 StripColorBalance *color_balance;
99 TStripElem *tstripdata;
100 TStripElem *tstripdata_startstill;
101 TStripElem *tstripdata_endstill;
102 struct ImBuf *ibuf_startstill;
103 struct ImBuf *ibuf_endstill;
107 typedef struct PluginSeq {
120 void *instance_private_data;
121 void **current_private_data;
125 void (*callback)(void);
128 /* The sequence structure is the basic struct used by any strip. each of the strips uses a different sequence structure.*/
129 /* WATCH IT: first part identical to ID (for use in ipo's) */
131 typedef struct Sequence {
132 struct Sequence *next, *prev;
133 void *tmp; /* tmp var for copying, and tagging for linked selection */
134 void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */
135 char name[24]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */
137 int flag, type; /*flags bitmap (see below) and the type of sequence*/
138 int len; /* the length of the contense of this strip - before handles are applied */
139 int start, startofs, endofs;
140 int startstill, endstill;
141 int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
142 int startdisp, enddisp; /*starting and ending points in the sequence*/
144 /* is sfra needed anymore? - it looks like its only used in one place */
145 int sfra; /* starting frame according to the timeline of the scene. */
150 struct Ipo *ipo; // xxx depreceated... old animation system
157 /* pointers for effects: */
158 struct Sequence *seq1, *seq2, *seq3;
160 ListBase seqbase; /* list of strips for metastrips */
162 struct bSound *sound; /* the linked "bSound" object */
163 struct SoundHandle *sound_handle;
164 float level, pan; /* level in dB (0=full), pan -1..1 */
165 int scenenr; /* for scene selection */
168 void *effectdata; /* Struct pointer for effect settings */
170 int anim_startofs; /* only use part of animation file */
171 int anim_endofs; /* is subtle different to startofs / endofs */
178 typedef struct MetaStack {
179 struct MetaStack *next, *prev;
184 typedef struct Editing {
189 /* Context vars, used to be static */
191 char act_imagedir[256];
192 char act_sounddir[256];
195 /* ************* Effect Variable Structs ********* */
196 typedef struct WipeVars {
197 float edgeWidth,angle;
198 short forward, wipetype;
201 typedef struct GlowVars {
202 float fMini; /* Minimum intensity to trigger a glow */
204 float fBoost; /* Amount to multiply glow intensity */
205 float dDist; /* Radius of glow blurring */
207 int bNoComp; /* SHOW/HIDE glow buffer */
210 typedef struct TransformVars {
225 typedef struct SolidColorVars {
230 typedef struct SpeedControlVars {
238 #define SEQ_STRIP_OFSBOTTOM 0.2f
239 #define SEQ_STRIP_OFSTOP 0.8f
241 /* SpeedControlVars->flags */
242 #define SEQ_SPEED_INTEGRATE 1
243 #define SEQ_SPEED_BLEND 2
244 #define SEQ_SPEED_COMPRESS_IPO_Y 4
246 /* ***************** SEQUENCE ****************** */
247 #define SEQ_NAME_MAXSTR 24
250 #define SEQ_LEFTSEL 2
251 #define SEQ_RIGHTSEL 4
252 #define SEQ_OVERLAP 8
253 #define SEQ_FILTERY 16
255 #define SEQ_MAKE_PREMUL 64
256 #define SEQ_REVERSE_FRAMES 128
257 #define SEQ_IPO_FRAME_LOCKED 256
258 #define SEQ_EFFECT_NOT_LOADED 512
259 #define SEQ_FLAG_DELETE 1024
260 #define SEQ_FLIPX 2048
261 #define SEQ_FLIPY 4096
262 #define SEQ_MAKE_FLOAT 8192
263 #define SEQ_LOCK 16384
264 #define SEQ_USE_PROXY 32768
265 #define SEQ_USE_TRANSFORM 65536
266 #define SEQ_USE_CROP 131072
267 #define SEQ_USE_COLOR_BALANCE 262144
268 #define SEQ_USE_PROXY_CUSTOM_DIR 524288
269 #define SEQ_USE_PROXY_CUSTOM_FILE 2097152
271 /* deprecated, dont use a flag anymore*/
272 /*#define SEQ_ACTIVE 1048576*/
274 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1
275 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
276 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
278 /* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
283 #define SEQ_RAM_SOUND 4
284 #define SEQ_HD_SOUND 5
291 #define SEQ_ALPHAOVER 11
292 #define SEQ_ALPHAUNDER 12
293 #define SEQ_GAMCROSS 13
295 #define SEQ_OVERDROP 15
296 #define SEQ_PLUGIN 24
299 #define SEQ_TRANSFORM 27
302 #define SEQ_EFFECT_MAX 29
304 #define STRIPELEM_FAILED 0
305 #define STRIPELEM_OK 1
307 #define STRIPELEM_PREVIEW_DONE 1
309 #define SEQ_BLEND_REPLACE 0
310 /* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical
311 to the table above. (Only those effects that handle _exactly_ two inputs,
312 otherwise, you can't really blend, right :) !)