~ubuntu-branches/ubuntu/saucy/blender/saucy-proposed

« back to all changes in this revision

Viewing changes to source/blender/makesdna/DNA_sequence_types.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#define __DNA_SEQUENCE_TYPES_H__
35
35
 
36
36
#include "DNA_defs.h"
 
37
#include "DNA_color_types.h"
37
38
#include "DNA_listBase.h"
38
39
#include "DNA_vec_types.h"
39
40
 
72
73
} StripColorBalance;
73
74
 
74
75
typedef struct StripProxy {
75
 
        char dir[768];         // custom directory for index and proxy files
 
76
        char dir[768];         // custom directory for index and proxy files
76
77
                               // (defaults to BL_proxy)
77
78
 
78
79
        char file[256];        // custom file
81
82
        short tc;              // time code in use
82
83
 
83
84
        short quality;         // proxy build quality
84
 
        short build_size_flags;// size flags (see below) of all proxies 
 
85
        short build_size_flags; // size flags (see below) of all proxies
85
86
                               // to build
86
87
        short build_tc_flags;  // time code flags (see below) of all tc indices
87
88
                               // to build
98
99
        StripProxy *proxy;
99
100
        StripCrop *crop;
100
101
        StripTransform *transform;
101
 
        StripColorBalance *color_balance;
 
102
        StripColorBalance *color_balance DNA_DEPRECATED;
 
103
 
 
104
        /* color management */
 
105
        ColorManagedColorspaceSettings colorspace_settings;
102
106
} Strip;
103
107
 
104
 
 
105
 
typedef struct PluginSeq {
106
 
        char name[1024]; /* 1024 = FILE_MAX */
107
 
        void *handle;
108
 
 
109
 
        char *pname;
110
 
 
111
 
        int vars, version;
112
 
 
113
 
        void *varstr;
114
 
        float *cfra;
115
 
 
116
 
        float data[32];
117
 
 
118
 
        void *instance_private_data;
119
 
        void **current_private_data;
120
 
 
121
 
        void (*doit)(void);
122
 
 
123
 
        void (*callback)(void);
124
 
} PluginSeq;
125
 
 
126
 
/* The sequence structure is the basic struct used by any strip. each of the strips uses a different sequence structure.*/
127
 
/* WATCH IT: first part identical to ID (for use in ipo's) */
128
 
 
 
108
/**
 
109
 * The sequence structure is the basic struct used by any strip.
 
110
 * each of the strips uses a different sequence structure.
 
111
 *
 
112
 * \warning The first part identical to ID (for use in ipo's)
 
113
 * the commend above is historic, probably we can drop the ID compatibility,
 
114
 * but take care making this change.
 
115
 *
 
116
 * \warning This is really a 'Strip' in the UI!, name is highly confusing.
 
117
 */
129
118
typedef struct Sequence {
130
119
        struct Sequence *next, *prev;
131
120
        void *tmp; /* tmp var for copying, and tagging for linked selection */
132
121
        void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */
133
122
        char name[64]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */
134
123
 
135
 
        int flag, type; /*flags bitmap (see below) and the type of sequence*/
 
124
        int flag, type; /*flags bitmap (see below) and the type of sequence*/
136
125
        int len; /* the length of the contents of this strip - before handles are applied */
137
126
        int start, startofs, endofs;
138
127
        int startstill, endstill;
139
128
        int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */
140
 
        int startdisp, enddisp; /*starting and ending points in the sequence*/
 
129
        int startdisp, enddisp; /*starting and ending points in the sequence*/
141
130
        float sat;
142
131
        float mul, handsize;
143
132
 
144
133
        short anim_preseek;
145
 
        short streamindex;   /* streamindex for movie or sound files with several streams */
 
134
        short streamindex;    /* streamindex for movie or sound files with several streams */
146
135
        int multicam_source;  /* for multicam source selection */
147
 
        int clip_flag;          /* MOVIECLIP render flags */
 
136
        int clip_flag;        /* MOVIECLIP render flags */
148
137
 
149
138
        Strip *strip;
150
139
 
151
 
        struct Ipo *ipo  DNA_DEPRECATED;  /* old animation system, deprecated for 2.5 */
152
 
        struct Scene *scene;
153
 
        struct Object *scene_camera; /* override scene camera */
 
140
        struct Ipo *ipo DNA_DEPRECATED;   /* old animation system, deprecated for 2.5 */
 
141
 
 
142
        /* these ID vars should never be NULL but can be when linked libs fail to load, so check on access */
 
143
        struct Scene     *scene;
 
144
        struct Object    *scene_camera;  /* override scene camera */
 
145
        struct MovieClip *clip;          /* for MOVIECLIP strips */
 
146
        struct Mask      *mask;          /* for MASK strips */
154
147
 
155
148
        struct anim *anim;      /* for MOVIE strips */
156
 
        struct MovieClip *clip; /* for MOVIECLIP strips */
157
149
 
158
150
        float effect_fader;
159
151
        float speed_fader;
160
152
 
161
 
        PluginSeq *plugin;
162
 
 
163
153
        /* pointers for effects: */
164
154
        struct Sequence *seq1, *seq2, *seq3;
165
155
 
166
 
        ListBase seqbase;       /* list of strips for metastrips */
 
156
        ListBase seqbase;       /* list of strips for metastrips */
167
157
 
168
 
        struct bSound *sound;   /* the linked "bSound" object */
 
158
        struct bSound *sound;   /* the linked "bSound" object */
169
159
        void *scene_sound;
170
160
        float volume;
171
161
 
172
 
        float pitch, pan;       /* pitch (-0.1..10), pan -2..2 */
 
162
        float pitch, pan;     /* pitch (-0.1..10), pan -2..2 */
173
163
        float strobe;
174
164
 
175
 
        void *effectdata;       /* Struct pointer for effect settings */
 
165
        void *effectdata;     /* Struct pointer for effect settings */
176
166
 
177
167
        int anim_startofs;    /* only use part of animation file */
178
168
        int anim_endofs;      /* is subtle different to startofs / endofs */
181
171
        int blend_mode;
182
172
        float blend_opacity;
183
173
 
184
 
                        /* is sfra needed anymore? - it looks like its only used in one place */
185
 
        int sfra, pad;  /* starting frame according to the timeline of the scene. */
 
174
        /* is sfra needed anymore? - it looks like its only used in one place */
 
175
        int sfra;  /* starting frame according to the timeline of the scene. */
 
176
 
 
177
        char alpha_mode;
 
178
        char pad[3];
 
179
 
 
180
        /* modifiers */
 
181
        ListBase modifiers;
186
182
} Sequence;
187
183
 
188
184
typedef struct MetaStack {
193
189
 
194
190
typedef struct Editing {
195
191
        ListBase *seqbasep; /* pointer to the current list of seq's being edited (can be within a meta strip) */
196
 
        ListBase seqbase;       /* pointer to the top-most seq's */
 
192
        ListBase seqbase;   /* pointer to the top-most seq's */
197
193
        ListBase metastack;
198
194
        
199
195
        /* Context vars, used to be static */
208
204
 
209
205
/* ************* Effect Variable Structs ********* */
210
206
typedef struct WipeVars {
211
 
        float edgeWidth,angle;
 
207
        float edgeWidth, angle;
212
208
        short forward, wipetype;
213
209
} WipeVars;
214
210
 
215
211
typedef struct GlowVars {       
216
 
        float fMini;    /*      Minimum intensity to trigger a glow */
 
212
        float fMini;    /*      Minimum intensity to trigger a glow */
217
213
        float fClamp;
218
 
        float fBoost;   /*      Amount to multiply glow intensity */
219
 
        float dDist;    /*      Radius of glow blurring */
220
 
        int     dQuality;
221
 
        int     bNoComp;        /*      SHOW/HIDE glow buffer */
 
214
        float fBoost;   /*      Amount to multiply glow intensity */
 
215
        float dDist;    /*      Radius of glow blurring */
 
216
        int dQuality;
 
217
        int bNoComp;    /*      SHOW/HIDE glow buffer */
222
218
} GlowVars;
223
219
 
224
220
typedef struct TransformVars {
238
234
} SolidColorVars;
239
235
 
240
236
typedef struct SpeedControlVars {
241
 
        float * frameMap;
 
237
        float *frameMap;
242
238
        float globalSpeed;
243
239
        int flags;
244
240
        int length;
245
241
        int lastValidFrame;
246
242
} SpeedControlVars;
247
243
 
 
244
/* ***************** Sequence modifiers ****************** */
 
245
 
 
246
typedef struct SequenceModifierData {
 
247
        struct SequenceModifierData *next, *prev;
 
248
        int type, flag;
 
249
        char name[64]; /* MAX_NAME */
 
250
 
 
251
        /* mask input, either sequence or maks ID */
 
252
        int mask_input_type, pad;
 
253
 
 
254
        struct Sequence *mask_sequence;
 
255
        struct Mask     *mask_id;
 
256
} SequenceModifierData;
 
257
 
 
258
typedef struct ColorBalanceModifierData {
 
259
        SequenceModifierData modifier;
 
260
 
 
261
        StripColorBalance color_balance;
 
262
        float color_multiply;
 
263
} ColorBalanceModifierData;
 
264
 
 
265
typedef struct CurvesModifierData {
 
266
        SequenceModifierData modifier;
 
267
 
 
268
        struct CurveMapping curve_mapping;
 
269
} CurvesModifierData;
 
270
 
 
271
typedef struct HueCorrectModifierData {
 
272
        SequenceModifierData modifier;
 
273
 
 
274
        struct CurveMapping curve_mapping;
 
275
} HueCorrectModifierData;
 
276
 
 
277
typedef struct BrightContrastModifierData {
 
278
        SequenceModifierData modifier;
 
279
 
 
280
        float bright;
 
281
        float contrast;
 
282
} BrightContrastModifierData;
 
283
 
 
284
/* ***************** Scopes ****************** */
 
285
 
 
286
typedef struct SequencerScopes {
 
287
        struct ImBuf *reference_ibuf;
 
288
 
 
289
        struct ImBuf *zebra_ibuf;
 
290
        struct ImBuf *waveform_ibuf;
 
291
        struct ImBuf *sep_waveform_ibuf;
 
292
        struct ImBuf *vector_ibuf;
 
293
        struct ImBuf *histogram_ibuf;
 
294
} SequencerScopes;
 
295
 
248
296
#define MAXSEQ          32
249
297
 
250
298
#define SELECT 1
251
299
 
252
300
/* Editor->over_flag */
253
 
#define SEQ_EDIT_OVERLAY_SHOW                   1
254
 
#define SEQ_EDIT_OVERLAY_ABS                    2
 
301
#define SEQ_EDIT_OVERLAY_SHOW           1
 
302
#define SEQ_EDIT_OVERLAY_ABS            2
255
303
 
256
 
#define SEQ_STRIP_OFSBOTTOM             0.2f
257
 
#define SEQ_STRIP_OFSTOP                0.8f
 
304
#define SEQ_STRIP_OFSBOTTOM     0.2f
 
305
#define SEQ_STRIP_OFSTOP        0.8f
258
306
 
259
307
/* SpeedControlVars->flags */
260
308
#define SEQ_SPEED_INTEGRATE      1
262
310
#define SEQ_SPEED_COMPRESS_IPO_Y 4
263
311
 
264
312
/* ***************** SEQUENCE ****************** */
265
 
#define SEQ_NAME_MAXSTR                 64
 
313
#define SEQ_NAME_MAXSTR         64
266
314
 
267
315
/* seq->flag */
268
 
#define SEQ_LEFTSEL                 (1<<1)
269
 
#define SEQ_RIGHTSEL                (1<<2)
270
 
#define SEQ_OVERLAP                 (1<<3)
271
 
#define SEQ_FILTERY                 (1<<4)
272
 
#define SEQ_MUTE                    (1<<5)
273
 
#define SEQ_MAKE_PREMUL             (1<<6)
274
 
#define SEQ_REVERSE_FRAMES          (1<<7)
275
 
#define SEQ_IPO_FRAME_LOCKED        (1<<8)
276
 
#define SEQ_EFFECT_NOT_LOADED       (1<<9)
277
 
#define SEQ_FLAG_DELETE             (1<<10)
278
 
#define SEQ_FLIPX                   (1<<11)
279
 
#define SEQ_FLIPY                   (1<<12)
280
 
#define SEQ_MAKE_FLOAT              (1<<13)
281
 
#define SEQ_LOCK                    (1<<14)
282
 
#define SEQ_USE_PROXY               (1<<15)
283
 
#define SEQ_USE_TRANSFORM           (1<<16)
284
 
#define SEQ_USE_CROP                (1<<17)
285
 
#define SEQ_USE_COLOR_BALANCE       (1<<18)
286
 
#define SEQ_USE_PROXY_CUSTOM_DIR    (1<<19)
 
316
#define SEQ_LEFTSEL                 (1 << 1)
 
317
#define SEQ_RIGHTSEL                (1 << 2)
 
318
#define SEQ_OVERLAP                 (1 << 3)
 
319
#define SEQ_FILTERY                 (1 << 4)
 
320
#define SEQ_MUTE                    (1 << 5)
 
321
#define SEQ_MAKE_PREMUL             (1 << 6) /* deprecated, used for compatibility code only */
 
322
#define SEQ_REVERSE_FRAMES          (1 << 7)
 
323
#define SEQ_IPO_FRAME_LOCKED        (1 << 8)
 
324
#define SEQ_EFFECT_NOT_LOADED       (1 << 9)
 
325
#define SEQ_FLAG_DELETE             (1 << 10)
 
326
#define SEQ_FLIPX                   (1 << 11)
 
327
#define SEQ_FLIPY                   (1 << 12)
 
328
#define SEQ_MAKE_FLOAT              (1 << 13)
 
329
#define SEQ_LOCK                    (1 << 14)
 
330
#define SEQ_USE_PROXY               (1 << 15)
 
331
#define SEQ_USE_TRANSFORM           (1 << 16)
 
332
#define SEQ_USE_CROP                (1 << 17)
 
333
/* #define SEQ_USE_COLOR_BALANCE       (1 << 18) */ /* DEPRECATED */
 
334
#define SEQ_USE_PROXY_CUSTOM_DIR    (1 << 19)
287
335
 
288
 
#define SEQ_USE_PROXY_CUSTOM_FILE   (1<<21)
289
 
#define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22)
 
336
#define SEQ_USE_PROXY_CUSTOM_FILE   (1 << 21)
 
337
#define SEQ_USE_EFFECT_DEFAULT_FADE (1 << 22)
 
338
#define SEQ_USE_LINEAR_MODIFIERS    (1 << 23)
290
339
 
291
340
// flags for whether those properties are animated or not
292
 
#define SEQ_AUDIO_VOLUME_ANIMATED   (1<<24)
293
 
#define SEQ_AUDIO_PITCH_ANIMATED    (1<<25)
294
 
#define SEQ_AUDIO_PAN_ANIMATED      (1<<26)
295
 
#define SEQ_AUDIO_DRAW_WAVEFORM     (1<<27)
 
341
#define SEQ_AUDIO_VOLUME_ANIMATED   (1 << 24)
 
342
#define SEQ_AUDIO_PITCH_ANIMATED    (1 << 25)
 
343
#define SEQ_AUDIO_PAN_ANIMATED      (1 << 26)
 
344
#define SEQ_AUDIO_DRAW_WAVEFORM     (1 << 27)
296
345
 
297
 
#define SEQ_INVALID_EFFECT          (1<<31)
 
346
#define SEQ_INVALID_EFFECT          (1 << 31)
298
347
 
299
348
/* convenience define for all selection flags */
300
 
#define SEQ_ALLSEL      (SELECT+SEQ_LEFTSEL+SEQ_RIGHTSEL)
 
349
#define SEQ_ALLSEL  (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL)
301
350
 
302
351
/* deprecated, don't use a flag anymore*/
303
352
/*#define SEQ_ACTIVE                            1048576*/
320
369
#define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS         8
321
370
#define SEQ_PROXY_TC_ALL                        15
322
371
 
323
 
/* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */
324
 
#define SEQ_IMAGE               0
325
 
#define SEQ_META                1
326
 
#define SEQ_SCENE               2
327
 
#define SEQ_MOVIE               3
328
 
#define SEQ_RAM_SOUND           4
329
 
#define SEQ_HD_SOUND            5
330
 
#define SEQ_SOUND               4
331
 
#define SEQ_MOVIECLIP           6
332
 
 
333
 
#define SEQ_EFFECT              8
334
 
#define SEQ_CROSS               8
335
 
#define SEQ_ADD                 9
336
 
#define SEQ_SUB                 10
337
 
#define SEQ_ALPHAOVER   11
338
 
#define SEQ_ALPHAUNDER  12
339
 
#define SEQ_GAMCROSS    13
340
 
#define SEQ_MUL                 14
341
 
#define SEQ_OVERDROP    15
342
 
#define SEQ_PLUGIN              24
343
 
#define SEQ_WIPE                25
344
 
#define SEQ_GLOW                26
345
 
#define SEQ_TRANSFORM           27
346
 
#define SEQ_COLOR               28
347
 
#define SEQ_SPEED               29
348
 
#define SEQ_MULTICAM            30
349
 
#define SEQ_ADJUSTMENT          31
350
 
#define SEQ_EFFECT_MAX          31
351
 
 
352
 
#define STRIPELEM_FAILED       0
353
 
#define STRIPELEM_OK           1
354
 
 
355
 
#define STRIPELEM_PREVIEW_DONE  1
356
 
 
357
 
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1<<0)
358
 
#define SEQ_MOVIECLIP_RENDER_STABILIZED  (1<<1)
 
372
/* seq->alpha_mode */
 
373
enum {
 
374
        SEQ_ALPHA_STRAIGHT = 0,
 
375
        SEQ_ALPHA_PREMUL   = 1
 
376
};
 
377
 
 
378
/* seq->type WATCH IT: SEQ_TYPE_EFFECT BIT is used to determine if this is an effect strip!!! */
 
379
enum {
 
380
        SEQ_TYPE_IMAGE       = 0,
 
381
        SEQ_TYPE_META        = 1,
 
382
        SEQ_TYPE_SCENE       = 2,
 
383
        SEQ_TYPE_MOVIE       = 3,
 
384
        SEQ_TYPE_SOUND_RAM   = 4,
 
385
        SEQ_TYPE_SOUND_HD    = 5,
 
386
        SEQ_TYPE_MOVIECLIP   = 6,
 
387
        SEQ_TYPE_MASK        = 7,
 
388
 
 
389
        SEQ_TYPE_EFFECT      = 8,
 
390
        SEQ_TYPE_CROSS       = 8,
 
391
        SEQ_TYPE_ADD         = 9,
 
392
        SEQ_TYPE_SUB         = 10,
 
393
        SEQ_TYPE_ALPHAOVER   = 11,
 
394
        SEQ_TYPE_ALPHAUNDER  = 12,
 
395
        SEQ_TYPE_GAMCROSS    = 13,
 
396
        SEQ_TYPE_MUL         = 14,
 
397
        SEQ_TYPE_OVERDROP    = 15,
 
398
        /* SEQ_TYPE_PLUGIN      = 24, */ /* Deprecated */
 
399
        SEQ_TYPE_WIPE        = 25,
 
400
        SEQ_TYPE_GLOW        = 26,
 
401
        SEQ_TYPE_TRANSFORM   = 27,
 
402
        SEQ_TYPE_COLOR       = 28,
 
403
        SEQ_TYPE_SPEED       = 29,
 
404
        SEQ_TYPE_MULTICAM    = 30,
 
405
        SEQ_TYPE_ADJUSTMENT  = 31,
 
406
        SEQ_TYPE_EFFECT_MAX  = 31
 
407
};
 
408
 
 
409
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
 
410
#define SEQ_MOVIECLIP_RENDER_STABILIZED  (1 << 1)
359
411
 
360
412
#define SEQ_BLEND_REPLACE      0
361
 
/* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical
 
413
/* all other BLEND_MODEs are simple SEQ_TYPE_EFFECT ids and therefore identical
362
414
 * to the table above. (Only those effects that handle _exactly_ two inputs,
363
415
 * otherwise, you can't really blend, right :) !)
364
416
 */
365
417
 
366
418
 
367
 
#define SEQ_HAS_PATH(_seq) (ELEM4((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_RAM_SOUND, SEQ_HD_SOUND))
 
419
#define SEQ_HAS_PATH(_seq) (ELEM4((_seq)->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD))
 
420
 
 
421
/* modifiers */
 
422
 
 
423
/* SequenceModifierData->type */
 
424
enum {
 
425
        seqModifierType_ColorBalance   = 1,
 
426
        seqModifierType_Curves         = 2,
 
427
        seqModifierType_HueCorrect     = 3,
 
428
        seqModifierType_BrightContrast = 4,
 
429
 
 
430
        NUM_SEQUENCE_MODIFIER_TYPES
 
431
};
 
432
 
 
433
/* SequenceModifierData->flag */
 
434
enum {
 
435
        SEQUENCE_MODIFIER_MUTE      = (1 << 0),
 
436
        SEQUENCE_MODIFIER_EXPANDED  = (1 << 1),
 
437
};
 
438
 
 
439
enum {
 
440
        SEQUENCE_MASK_INPUT_STRIP   = 0,
 
441
        SEQUENCE_MASK_INPUT_ID      = 1
 
442
};
368
443
 
369
444
#endif
370