2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
19 * All rights reserved.
21 * The Original Code is: all of this file.
23 * Contributor(s): none yet.
25 * ***** END GPL LICENSE BLOCK *****
27 /** \file DNA_sequence_types.h
32 * Structs for use by the 'Sequencer' (Video Editor)
35 * - #Sequence: video/effect/audio data you can select and manipulate in the sequencer.
36 * - #Sequence.machine: Strange name for the channel.
37 * - #Strip: The data referenced by the #Sequence
38 * - Meta Strip (SEQ_TYPE_META): Support for nesting Sequences.
41 #ifndef __DNA_SEQUENCE_TYPES_H__
42 #define __DNA_SEQUENCE_TYPES_H__
45 #include "DNA_color_types.h"
46 #include "DNA_listBase.h"
47 #include "DNA_vec_types.h"
54 /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
56 typedef struct StripAnim {
57 struct StripAnim *next, *prev;
61 typedef struct StripElem {
63 int orig_width, orig_height;
66 typedef struct StripCrop {
73 typedef struct StripTransform {
78 typedef struct StripColorBalance {
88 typedef struct StripProxy {
89 char dir[768]; // custom directory for index and proxy files
90 // (defaults to BL_proxy)
92 char file[256]; // custom file
93 struct anim *anim; // custom proxy anim file
95 short tc; // time code in use
97 short quality; // proxy build quality
98 short build_size_flags; // size flags (see below) of all proxies
100 short build_tc_flags; // time code flags (see below) of all tc indices
107 typedef struct Strip {
108 struct Strip *next, *prev;
110 int startstill, endstill;
111 StripElem *stripdata; /* only used as an array in IMAGE sequences(!),
112 * and as a 1-element array in MOVIE sequences,
113 * NULL for all other strip-types */
117 StripTransform *transform;
118 StripColorBalance *color_balance DNA_DEPRECATED;
120 /* color management */
121 ColorManagedColorspaceSettings colorspace_settings;
125 * The sequence structure is the basic struct used by any strip.
126 * each of the strips uses a different sequence structure.
128 * \warning The first part identical to ID (for use in ipo's)
129 * the commend above is historic, probably we can drop the ID compatibility,
130 * but take care making this change.
132 * \warning This is really a 'Strip' in the UI!, name is highly confusing.
134 typedef struct Sequence {
135 struct Sequence *next, *prev;
136 void *tmp; /* tmp var for copying, and tagging for linked selection */
137 void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */
138 char name[64]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */
140 int flag, type; /*flags bitmap (see below) and the type of sequence*/
141 int len; /* the length of the contents of this strip - before handles are applied */
142 int start; /* start frame of contents of strip in absolute frame coordinates. For metastrips start of first strip startdisp */
143 int startofs, endofs; /* frames after the first frame where display starts, frames before the last frame where display ends */
144 int startstill, endstill; /* frames that use the first frame before data begins, frames that use the last frame after data ends */
145 int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
146 int startdisp, enddisp; /* starting and ending points of the strip in the sequence*/
151 short streamindex; /* streamindex for movie or sound files with several streams */
152 int multicam_source; /* for multicam source selection */
153 int clip_flag; /* MOVIECLIP render flags */
157 struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */
159 /* these ID vars should never be NULL but can be when linked libs fail to load, so check on access */
161 struct Object *scene_camera; /* override scene camera */
162 struct MovieClip *clip; /* for MOVIECLIP strips */
163 struct Mask *mask; /* for MASK strips */
164 ListBase anims; /* for MOVIE strips */
169 /* pointers for effects: */
170 struct Sequence *seq1, *seq2, *seq3;
172 ListBase seqbase; /* list of strips for metastrips */
174 struct bSound *sound; /* the linked "bSound" object */
178 float pitch, pan; /* pitch (-0.1..10), pan -2..2 */
181 void *effectdata; /* Struct pointer for effect settings */
183 int anim_startofs; /* only use part of animation file */
184 int anim_endofs; /* is subtle different to startofs / endofs */
190 /* is sfra needed anymore? - it looks like its only used in one place */
191 int sfra; /* starting frame according to the timeline of the scene. */
198 struct Stereo3dFormat *stereo3d_format;
200 struct IDProperty *prop;
206 typedef struct MetaStack {
207 struct MetaStack *next, *prev;
210 /* the startdisp/enddisp when entering the meta */
214 typedef struct Editing {
215 ListBase *seqbasep; /* pointer to the current list of seq's being edited (can be within a meta strip) */
216 ListBase seqbase; /* pointer to the top-most seq's */
219 /* Context vars, used to be static */
221 char act_imagedir[1024]; /* 1024 = FILE_MAX */
222 char act_sounddir[1024]; /* 1024 = FILE_MAX */
223 char proxy_dir[1024]; /* 1024 = FILE_MAX */
225 int over_ofs, over_cfra;
226 int over_flag, proxy_storage;
230 /* ************* Effect Variable Structs ********* */
231 typedef struct WipeVars {
232 float edgeWidth, angle;
233 short forward, wipetype;
236 typedef struct GlowVars {
237 float fMini; /* Minimum intensity to trigger a glow */
239 float fBoost; /* Amount to multiply glow intensity */
240 float dDist; /* Radius of glow blurring */
242 int bNoComp; /* SHOW/HIDE glow buffer */
245 typedef struct TransformVars {
253 int uniform_scale; /* preserve aspect/ratio when scaling */
256 typedef struct SolidColorVars {
261 typedef struct SpeedControlVars {
269 typedef struct GaussianBlurVars {
274 typedef struct TextVars {
282 TEXT_SEQ_SHADOW = (1 << 0),
283 TEXT_SEQ_AUTO_CENTER = (1 << 1),
285 /* ***************** Sequence modifiers ****************** */
287 typedef struct SequenceModifierData {
288 struct SequenceModifierData *next, *prev;
290 char name[64]; /* MAX_NAME */
292 /* mask input, either sequence or maks ID */
293 int mask_input_type, pad;
295 struct Sequence *mask_sequence;
296 struct Mask *mask_id;
297 } SequenceModifierData;
299 typedef struct ColorBalanceModifierData {
300 SequenceModifierData modifier;
302 StripColorBalance color_balance;
303 float color_multiply;
304 } ColorBalanceModifierData;
306 typedef struct CurvesModifierData {
307 SequenceModifierData modifier;
309 struct CurveMapping curve_mapping;
310 } CurvesModifierData;
312 typedef struct HueCorrectModifierData {
313 SequenceModifierData modifier;
315 struct CurveMapping curve_mapping;
316 } HueCorrectModifierData;
318 typedef struct BrightContrastModifierData {
319 SequenceModifierData modifier;
323 } BrightContrastModifierData;
325 typedef struct SequencerMaskModifierData {
326 SequenceModifierData modifier;
327 } SequencerMaskModifierData;
329 /* ***************** Scopes ****************** */
331 typedef struct SequencerScopes {
332 struct ImBuf *reference_ibuf;
334 struct ImBuf *zebra_ibuf;
335 struct ImBuf *waveform_ibuf;
336 struct ImBuf *sep_waveform_ibuf;
337 struct ImBuf *vector_ibuf;
338 struct ImBuf *histogram_ibuf;
345 /* Editor->over_flag */
346 #define SEQ_EDIT_OVERLAY_SHOW 1
347 #define SEQ_EDIT_OVERLAY_ABS 2
349 #define SEQ_STRIP_OFSBOTTOM 0.2f
350 #define SEQ_STRIP_OFSTOP 0.8f
352 /* Editor->proxy_storage */
353 /* store proxies in project directory */
354 #define SEQ_EDIT_PROXY_DIR_STORAGE 1
356 /* SpeedControlVars->flags */
357 #define SEQ_SPEED_INTEGRATE 1
358 /* #define SEQ_SPEED_BLEND 2 */ /* DEPRECATED */
359 #define SEQ_SPEED_COMPRESS_IPO_Y 4
361 /* ***************** SEQUENCE ****************** */
362 #define SEQ_NAME_MAXSTR 64
366 SEQ_LEFTSEL = (1 << 1),
367 SEQ_RIGHTSEL = (1 << 2),
368 SEQ_OVERLAP = (1 << 3),
369 SEQ_FILTERY = (1 << 4),
371 SEQ_MAKE_PREMUL = (1 << 6), /* deprecated, used for compatibility code only */
372 SEQ_REVERSE_FRAMES = (1 << 7),
373 SEQ_IPO_FRAME_LOCKED = (1 << 8),
374 SEQ_EFFECT_NOT_LOADED = (1 << 9),
375 SEQ_FLAG_DELETE = (1 << 10),
376 SEQ_FLIPX = (1 << 11),
377 SEQ_FLIPY = (1 << 12),
378 SEQ_MAKE_FLOAT = (1 << 13),
379 SEQ_LOCK = (1 << 14),
380 SEQ_USE_PROXY = (1 << 15),
381 SEQ_USE_TRANSFORM = (1 << 16),
382 SEQ_USE_CROP = (1 << 17),
383 /* SEQ_USE_COLOR_BALANCE = (1 << 18), */ /* DEPRECATED */
384 /* SEQ_USE_PROXY_CUSTOM_DIR = (1 << 19), */ /* DEPRECATED */
386 /* SEQ_USE_PROXY_CUSTOM_FILE = (1 << 21), */ /* DEPRECATED */
387 SEQ_USE_EFFECT_DEFAULT_FADE = (1 << 22),
388 SEQ_USE_LINEAR_MODIFIERS = (1 << 23),
390 /* flags for whether those properties are animated or not */
391 SEQ_AUDIO_VOLUME_ANIMATED = (1 << 24),
392 SEQ_AUDIO_PITCH_ANIMATED = (1 << 25),
393 SEQ_AUDIO_PAN_ANIMATED = (1 << 26),
394 SEQ_AUDIO_DRAW_WAVEFORM = (1 << 27),
396 /* don't include Grease Pencil in OpenGL previews of Scene strips */
397 SEQ_SCENE_NO_GPENCIL = (1 << 28),
398 SEQ_USE_VIEWS = (1 << 29),
400 SEQ_INVALID_EFFECT = (1 << 31),
403 /* StripProxy->storage */
405 SEQ_STORAGE_PROXY_CUSTOM_FILE = (1 << 1), /* store proxy in custom directory */
406 SEQ_STORAGE_PROXY_CUSTOM_DIR = (1 << 2), /* store proxy in custom file */
409 #if (DNA_DEPRECATED_GCC_POISON == 1)
410 #pragma GCC poison SEQ_MAKE_PREMUL
413 /* convenience define for all selection flags */
414 #define SEQ_ALLSEL (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL)
416 /* deprecated, don't use a flag anymore*/
417 /*#define SEQ_ACTIVE 1048576*/
419 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1
420 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
421 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
423 /* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */
425 #define SEQ_PROXY_IMAGE_SIZE_25 1
426 #define SEQ_PROXY_IMAGE_SIZE_50 2
427 #define SEQ_PROXY_IMAGE_SIZE_75 4
428 #define SEQ_PROXY_IMAGE_SIZE_100 8
430 #define SEQ_PROXY_TC_NONE 0
431 #define SEQ_PROXY_TC_RECORD_RUN 1
432 #define SEQ_PROXY_TC_FREE_RUN 2
433 #define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4
434 #define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS 8
435 #define SEQ_PROXY_TC_ALL 15
437 /* SeqProxy->build_flags */
439 SEQ_PROXY_SKIP_EXISTING = 1,
442 /* seq->alpha_mode */
444 SEQ_ALPHA_STRAIGHT = 0,
448 /* seq->type WATCH IT: SEQ_TYPE_EFFECT BIT is used to determine if this is an effect strip!!! */
454 SEQ_TYPE_SOUND_RAM = 4,
455 SEQ_TYPE_SOUND_HD = 5,
456 SEQ_TYPE_MOVIECLIP = 6,
463 SEQ_TYPE_ALPHAOVER = 11,
464 SEQ_TYPE_ALPHAUNDER = 12,
465 SEQ_TYPE_GAMCROSS = 13,
467 SEQ_TYPE_OVERDROP = 15,
468 /* SEQ_TYPE_PLUGIN = 24, */ /* Deprecated */
471 SEQ_TYPE_TRANSFORM = 27,
474 SEQ_TYPE_MULTICAM = 30,
475 SEQ_TYPE_ADJUSTMENT = 31,
476 SEQ_TYPE_GAUSSIAN_BLUR = 40,
482 #define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
483 #define SEQ_MOVIECLIP_RENDER_STABILIZED (1 << 1)
485 #define SEQ_BLEND_REPLACE 0
486 /* all other BLEND_MODEs are simple SEQ_TYPE_EFFECT ids and therefore identical
487 * to the table above. (Only those effects that handle _exactly_ two inputs,
488 * otherwise, you can't really blend, right :) !)
492 #define SEQ_HAS_PATH(_seq) (ELEM((_seq)->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD))
496 /* SequenceModifierData->type */
498 seqModifierType_ColorBalance = 1,
499 seqModifierType_Curves = 2,
500 seqModifierType_HueCorrect = 3,
501 seqModifierType_BrightContrast = 4,
502 seqModifierType_Mask = 5,
504 NUM_SEQUENCE_MODIFIER_TYPES
507 /* SequenceModifierData->flag */
509 SEQUENCE_MODIFIER_MUTE = (1 << 0),
510 SEQUENCE_MODIFIER_EXPANDED = (1 << 1),
514 SEQUENCE_MASK_INPUT_STRIP = 0,
515 SEQUENCE_MASK_INPUT_ID = 1
518 #endif /* __DNA_SEQUENCE_TYPES_H__ */