Blender  V2.93
DNA_sequence_types.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) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
31 #pragma once
32 
33 #include "DNA_color_types.h"
34 #include "DNA_defs.h"
35 #include "DNA_listBase.h"
36 #include "DNA_session_uuid_types.h" /* for #SessionUUID */
37 #include "DNA_vec_types.h" /* for #rctf */
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
43 struct Ipo;
44 struct MovieClip;
45 struct Scene;
46 struct VFont;
47 struct bSound;
48 
49 /* strlens; 256= FILE_MAXFILE, 768= FILE_MAXDIR */
50 
51 typedef struct StripAnim {
52  struct StripAnim *next, *prev;
53  struct anim *anim;
55 
56 typedef struct StripElem {
57  char name[256];
61 
62 typedef struct StripCrop {
63  int top;
64  int bottom;
65  int left;
66  int right;
68 
69 typedef struct StripTransform {
70  int xofs;
71  int yofs;
72  float scale_x;
73  float scale_y;
74  float rotation;
76 
77 typedef struct StripColorBalance {
78  float lift[3];
79  float gamma[3];
80  float gain[3];
81  int flag;
82  char _pad[4];
83  /* float exposure; */
84  /* float saturation; */
86 
87 typedef struct StripProxy {
88  char dir[768]; /* custom directory for index and proxy files */
89  /* (defaults to BL_proxy) */
90 
91  char file[256]; /* custom file */
92  struct anim *anim; /* custom proxy anim file */
93 
94  short tc; /* time code in use */
95 
96  short quality; /* proxy build quality */
97  short build_size_flags; /* size flags (see below) of all proxies */
98  /* to build */
99  short build_tc_flags; /* time code flags (see below) of all tc indices */
100  /* to build */
101  short build_flags;
102  char storage;
103  char _pad[5];
105 
106 typedef struct Strip {
107  struct Strip *next, *prev;
108  int us, done;
116  char dir[768];
121 
122  /* color management */
125 
126 typedef struct SequenceRuntime {
129 
140 typedef struct Sequence {
141  struct Sequence *next, *prev;
143  void *tmp;
145  void *lib;
147  char name[64];
148 
150  int flag, type;
152  int len;
157  int start;
172  float sat;
173  float mul, handsize;
174 
175  short anim_preseek; /* UNUSED. */
177  short streamindex;
182 
184 
186  struct Ipo *ipo DNA_DEPRECATED;
187 
190  struct Scene *scene;
194  struct MovieClip *clip;
196  struct Mask *mask;
199 
201  float speed_fader;
202 
203  /* pointers for effects: */
204  struct Sequence *seq1, *seq2, *seq3;
205 
208 
210  struct bSound *sound;
211  void *scene_sound;
212  float volume;
213 
215  float pitch, pan;
216  float strobe;
217 
219  void *effectdata;
220 
225 
228 
229  /* is sfra needed anymore? - it looks like its only used in one place */
231  int sfra;
232 
234  char _pad[2];
235 
236  /* Multiview */
239 
240  struct IDProperty *prop;
241 
242  /* modifiers */
244 
246  int _pad2[3];
247 
250 
251 typedef struct MetaStack {
252  struct MetaStack *next, *prev;
255  /* the startdisp/enddisp when entering the meta */
256  int disp_range[2];
258 
259 typedef struct Editing {
265 
266  /* Context vars, used to be static */
269  char act_imagedir[1024];
271  char act_sounddir[1024];
273  char proxy_dir[1024];
274 
278 
279  struct SeqCache *cache;
280 
281  /* Cache control */
282  float recycle_max_cost; /* UNUSED only for versioning. */
284 
286 
287  /* Must be initialized only by seq_cache_create() */
290 
291 /* ************* Effect Variable Structs ********* */
292 typedef struct WipeVars {
293  float edgeWidth, angle;
296 
297 typedef struct GlowVars {
299  float fMini;
300  float fClamp;
302  float fBoost;
304  float dDist;
305  int dQuality;
307  int bNoComp;
309 
310 typedef struct TransformVars {
311  float ScalexIni;
312  float ScaleyIni;
313  float xIni;
314  float yIni;
315  float rotIni;
316  int percent;
321 
322 typedef struct SolidColorVars {
323  float col[3];
324  char _pad[4];
326 
327 typedef struct SpeedControlVars {
328  float *frameMap;
329  float globalSpeed;
330  int flags;
331  int length;
334 
335 typedef struct GaussianBlurVars {
336  float size_x;
337  float size_y;
339 
340 typedef struct TextVars {
341  char text[512];
342  struct VFont *text_font;
345  float color[4], shadow_color[4], box_color[4];
346  float loc[2];
347  float wrap_width;
348  float box_margin;
349  char flag;
350  char align, align_y;
351  char _pad[5];
353 
354 /* TextVars.flag */
355 enum {
356  SEQ_TEXT_SHADOW = (1 << 0),
357  SEQ_TEXT_BOX = (1 << 1),
358  SEQ_TEXT_BOLD = (1 << 2),
359  SEQ_TEXT_ITALIC = (1 << 3),
360 };
361 
362 /* TextVars.align */
363 enum {
367 };
368 
369 /* TextVars.align_y */
370 enum {
374 };
375 
376 #define SEQ_FONT_NOT_LOADED -2
377 
378 typedef struct ColorMixVars {
382  float factor;
384 
385 /* ***************** Sequence modifiers ****************** */
386 
387 typedef struct SequenceModifierData {
389  int type, flag;
391  char name[64];
392 
393  /* mask input, either sequence or mask ID */
396 
398  struct Mask *mask_id;
400 
401 typedef struct ColorBalanceModifierData {
403 
407 
408 typedef struct CurvesModifierData {
410 
413 
414 typedef struct HueCorrectModifierData {
416 
419 
422 
423  float bright;
424  float contrast;
426 
430 
431 typedef struct WhiteBalanceModifierData {
433 
434  float white_value[3];
435  char _pad[4];
437 
440 
441  float key, offset, gamma;
443  int type;
445 
446 enum {
449 };
450 
451 /* ***************** Scopes ****************** */
452 
453 typedef struct SequencerScopes {
455 
456  struct ImBuf *zebra_ibuf;
462 
463 #define MAXSEQ 32
464 
465 #define SELECT 1
466 
467 /* Editor->over_flag */
468 #define SEQ_EDIT_OVERLAY_SHOW 1
469 #define SEQ_EDIT_OVERLAY_ABS 2
470 
471 #define SEQ_STRIP_OFSBOTTOM 0.05f
472 #define SEQ_STRIP_OFSTOP 0.95f
473 
474 /* Editor->proxy_storage */
475 /* store proxies in project directory */
476 #define SEQ_EDIT_PROXY_DIR_STORAGE 1
477 
478 /* SpeedControlVars->flags */
479 #define SEQ_SPEED_INTEGRATE (1 << 0)
480 #define SEQ_SPEED_UNUSED_1 (1 << 1) /* cleared */
481 #define SEQ_SPEED_COMPRESS_IPO_Y (1 << 2)
482 #define SEQ_SPEED_USE_INTERPOLATION (1 << 3)
483 
484 /* ***************** SEQUENCE ****************** */
485 #define SEQ_NAME_MAXSTR 64
486 
487 /* seq->flag */
488 enum {
489  /* SELECT */
490  SEQ_LEFTSEL = (1 << 1),
491  SEQ_RIGHTSEL = (1 << 2),
492  SEQ_OVERLAP = (1 << 3),
493  SEQ_FILTERY = (1 << 4),
494  SEQ_MUTE = (1 << 5),
495  SEQ_FLAG_UNUSED_6 = (1 << 6), /* cleared */
496  SEQ_REVERSE_FRAMES = (1 << 7),
499  SEQ_FLAG_DELETE = (1 << 10),
500  SEQ_FLIPX = (1 << 11),
501  SEQ_FLIPY = (1 << 12),
502  SEQ_MAKE_FLOAT = (1 << 13),
503  SEQ_LOCK = (1 << 14),
504  SEQ_USE_PROXY = (1 << 15),
505  SEQ_FLAG_UNUSED_23 = (1 << 16), /* cleared */
506  SEQ_FLAG_UNUSED_22 = (1 << 17), /* cleared */
507  SEQ_FLAG_UNUSED_18 = (1 << 18), /* cleared */
508  SEQ_FLAG_UNUSED_19 = (1 << 19), /* cleared */
509  SEQ_FLAG_UNUSED_21 = (1 << 21), /* cleared */
510 
513 
514  /* flags for whether those properties are animated or not */
519 
520  /* don't include Grease Pencil in OpenGL previews of Scene strips */
521  SEQ_SCENE_NO_GPENCIL = (1 << 28),
522  SEQ_USE_VIEWS = (1 << 29),
523 
524  /* access scene strips directly (like a metastrip) */
525  SEQ_SCENE_STRIPS = (1 << 30),
526 
527  SEQ_INVALID_EFFECT = (1u << 31),
528 };
529 
530 /* StripProxy->storage */
531 enum {
532  SEQ_STORAGE_PROXY_CUSTOM_FILE = (1 << 1), /* store proxy in custom directory */
533  SEQ_STORAGE_PROXY_CUSTOM_DIR = (1 << 2), /* store proxy in custom file */
534 };
535 
536 /* convenience define for all selection flags */
537 #define SEQ_ALLSEL (SELECT + SEQ_LEFTSEL + SEQ_RIGHTSEL)
538 
539 /* deprecated, don't use a flag anymore*/
540 /*#define SEQ_ACTIVE 1048576*/
541 
542 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1
543 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2
544 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4
545 
546 /* !!! has to be same as IMB_imbuf.h IMB_PROXY_... and IMB_TC_... */
547 
548 #define SEQ_PROXY_IMAGE_SIZE_25 1
549 #define SEQ_PROXY_IMAGE_SIZE_50 2
550 #define SEQ_PROXY_IMAGE_SIZE_75 4
551 #define SEQ_PROXY_IMAGE_SIZE_100 8
552 
553 #define SEQ_PROXY_TC_NONE 0
554 #define SEQ_PROXY_TC_RECORD_RUN 1
555 #define SEQ_PROXY_TC_FREE_RUN 2
556 #define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN 4
557 #define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS 8
558 #define SEQ_PROXY_TC_ALL 15
559 
560 /* SeqProxy->build_flags */
561 enum {
563 };
564 
565 /* seq->alpha_mode */
566 enum {
569 };
570 
571 /* seq->type WATCH IT: SEQ_TYPE_EFFECT BIT is used to determine if this is an effect strip!!! */
572 enum {
581 
591  /* SEQ_TYPE_PLUGIN = 24, */ /* Deprecated */
602 
603  /* Blend modes */
622 
624 };
625 
626 #define SEQ_MOVIECLIP_RENDER_UNDISTORTED (1 << 0)
627 #define SEQ_MOVIECLIP_RENDER_STABILIZED (1 << 1)
628 
629 #define SEQ_BLEND_REPLACE 0
630 /* all other BLEND_MODEs are simple SEQ_TYPE_EFFECT ids and therefore identical
631  * to the table above. (Only those effects that handle _exactly_ two inputs,
632  * otherwise, you can't really blend, right :) !)
633  */
634 
635 #define SEQ_HAS_PATH(_seq) \
636  (ELEM((_seq)->type, SEQ_TYPE_MOVIE, SEQ_TYPE_IMAGE, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD))
637 
638 /* modifiers */
639 
640 /* SequenceModifierData->type */
641 enum {
649  /* Keep last. */
651 };
652 
653 /* SequenceModifierData->flag */
654 enum {
657 };
658 
659 enum {
662 };
663 
664 enum {
665  /* Mask animation will be remapped relative to the strip start frame. */
667  /* Global (scene) frame number will be used to access the mask. */
669 };
670 
671 /* Sequence->cache_flag
672  * SEQ_CACHE_STORE_RAW
673  * SEQ_CACHE_STORE_PREPROCESSED
674  * SEQ_CACHE_STORE_COMPOSITE
675  * FINAL_OUT is ignored
676  *
677  * Editing->cache_flag
678  * all entries
679  */
680 enum {
685 
686  /* For lookup purposes */
689 
690  SEQ_CACHE_OVERRIDE = (1 << 4),
691 
692  /* enable cache visualization overlay in timeline UI */
694  SEQ_CACHE_VIEW_RAW = (1 << 6),
698 
701 };
702 
703 #ifdef __cplusplus
704 }
705 #endif
These structs are the foundation for all linked lists in the library system.
struct SpeedControlVars SpeedControlVars
struct WipeVars WipeVars
@ SEQ_MUTE
@ SEQ_FLAG_UNUSED_18
@ SEQ_FLAG_DELETE
@ SEQ_INVALID_EFFECT
@ SEQ_FILTERY
@ SEQ_REVERSE_FRAMES
@ SEQ_FLIPX
@ SEQ_RIGHTSEL
@ SEQ_MAKE_FLOAT
@ SEQ_EFFECT_NOT_LOADED
@ SEQ_SCENE_NO_GPENCIL
@ SEQ_FLAG_UNUSED_19
@ SEQ_IPO_FRAME_LOCKED
@ SEQ_FLAG_UNUSED_23
@ SEQ_SCENE_STRIPS
@ SEQ_FLAG_UNUSED_6
@ SEQ_AUDIO_PITCH_ANIMATED
@ SEQ_USE_PROXY
@ SEQ_OVERLAP
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_FLAG_UNUSED_22
@ SEQ_FLIPY
@ SEQ_LOCK
@ SEQ_FLAG_UNUSED_21
@ SEQ_AUDIO_VOLUME_ANIMATED
@ SEQ_USE_VIEWS
@ SEQ_AUDIO_PAN_ANIMATED
@ SEQ_USE_LINEAR_MODIFIERS
@ SEQ_AUDIO_DRAW_WAVEFORM
@ SEQ_LEFTSEL
struct ColorMixVars ColorMixVars
struct StripColorBalance StripColorBalance
struct TransformVars TransformVars
struct StripAnim StripAnim
struct WhiteBalanceModifierData WhiteBalanceModifierData
@ SEQUENCE_MASK_INPUT_STRIP
@ SEQUENCE_MASK_INPUT_ID
struct ColorBalanceModifierData ColorBalanceModifierData
struct CurvesModifierData CurvesModifierData
struct SequencerScopes SequencerScopes
@ SEQUENCE_MODIFIER_MUTE
@ SEQUENCE_MODIFIER_EXPANDED
struct GlowVars GlowVars
@ SEQ_CACHE_ALL_TYPES
@ SEQ_CACHE_VIEW_RAW
@ SEQ_CACHE_STORE_PREPROCESSED
@ SEQ_CACHE_STORE_RAW
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_VIEW_ENABLE
@ SEQ_CACHE_STORE_COMPOSITE
@ SEQ_CACHE_VIEW_FINAL_OUT
@ SEQ_CACHE_DISK_CACHE_ENABLE
@ SEQ_CACHE_VIEW_COMPOSITE
@ SEQ_CACHE_PREFETCH_ENABLE
@ SEQ_CACHE_VIEW_PREPROCESSED
@ SEQ_CACHE_OVERRIDE
struct StripTransform StripTransform
@ SEQ_PROXY_SKIP_EXISTING
@ SEQUENCE_MASK_TIME_RELATIVE
@ SEQUENCE_MASK_TIME_ABSOLUTE
struct SequenceModifierData SequenceModifierData
struct StripCrop StripCrop
struct Editing Editing
struct SequencerTonemapModifierData SequencerTonemapModifierData
@ NUM_SEQUENCE_MODIFIER_TYPES
@ seqModifierType_Curves
@ seqModifierType_Mask
@ seqModifierType_WhiteBalance
@ seqModifierType_BrightContrast
@ seqModifierType_ColorBalance
@ seqModifierType_HueCorrect
@ seqModifierType_Tonemap
@ SEQ_TEXT_ITALIC
@ SEQ_TEXT_SHADOW
@ SEQ_TEXT_BOLD
@ SEQ_TEXT_BOX
struct SequenceRuntime SequenceRuntime
struct Sequence Sequence
@ SEQ_ALPHA_PREMUL
@ SEQ_ALPHA_STRAIGHT
struct TextVars TextVars
struct GaussianBlurVars GaussianBlurVars
@ SEQ_TEXT_ALIGN_X_RIGHT
@ SEQ_TEXT_ALIGN_X_CENTER
@ SEQ_TEXT_ALIGN_X_LEFT
struct SolidColorVars SolidColorVars
struct HueCorrectModifierData HueCorrectModifierData
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
@ SEQ_TONEMAP_RH_SIMPLE
struct StripProxy StripProxy
struct MetaStack MetaStack
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
struct StripElem StripElem
struct Strip Strip
struct BrightContrastModifierData BrightContrastModifierData
@ SEQ_TYPE_TRANSFORM
@ SEQ_TYPE_COLOR_BURN
@ SEQ_TYPE_HARD_LIGHT
@ SEQ_TYPE_EXCLUSION
@ SEQ_TYPE_SOUND_RAM
@ SEQ_TYPE_CROSS
@ SEQ_TYPE_SOUND_HD
@ SEQ_TYPE_GLOW
@ SEQ_TYPE_MAX
@ SEQ_TYPE_VALUE
@ SEQ_TYPE_COLORMIX
@ SEQ_TYPE_WIPE
@ SEQ_TYPE_META
@ SEQ_TYPE_OVERDROP
@ SEQ_TYPE_PIN_LIGHT
@ SEQ_TYPE_ALPHAUNDER
@ SEQ_TYPE_DODGE
@ SEQ_TYPE_SCENE
@ SEQ_TYPE_HUE
@ SEQ_TYPE_LINEAR_BURN
@ SEQ_TYPE_GAMCROSS
@ SEQ_TYPE_MULTICAM
@ SEQ_TYPE_BLEND_COLOR
@ SEQ_TYPE_MOVIECLIP
@ SEQ_TYPE_DARKEN
@ SEQ_TYPE_MUL
@ SEQ_TYPE_GAUSSIAN_BLUR
@ SEQ_TYPE_ADD
@ SEQ_TYPE_ALPHAOVER
@ SEQ_TYPE_TEXT
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_SCREEN
@ SEQ_TYPE_SOFT_LIGHT
@ SEQ_TYPE_SUB
@ SEQ_TYPE_VIVID_LIGHT
@ SEQ_TYPE_OVERLAY
@ SEQ_TYPE_SPEED
@ SEQ_TYPE_COLOR
@ SEQ_TYPE_SATURATION
@ SEQ_TYPE_LIN_LIGHT
@ SEQ_TYPE_EFFECT
@ SEQ_TYPE_MOVIE
@ SEQ_TYPE_MASK
@ SEQ_TYPE_DIFFERENCE
@ SEQ_TYPE_ADJUSTMENT
@ SEQ_TYPE_LIGHTEN
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_TOP
@ SEQ_TEXT_ALIGN_Y_CENTER
struct SequencerMaskModifierData SequencerMaskModifierData
__int64 int64_t
Definition: stdint.h:92
SequenceModifierData modifier
StripColorBalance color_balance
SequenceModifierData modifier
SequenceModifierData modifier
struct CurveMapping curve_mapping
ListBase seqbase
struct PrefetchJob * prefetch_job
ListBase * seqbasep
Sequence * act_seq
char proxy_dir[1024]
int64_t disk_cache_timestamp
float recycle_max_cost
ListBase metastack
char act_sounddir[1024]
char act_imagedir[1024]
struct SeqCache * cache
SequenceModifierData modifier
struct CurveMapping curve_mapping
Sequence * parseq
struct MetaStack * prev
ListBase * oldbasep
struct MetaStack * next
struct SequenceModifierData * next
struct SequenceModifierData * prev
struct Sequence * mask_sequence
SessionUUID session_uuid
struct MovieClip * clip
struct Scene * scene
ListBase anims
struct Object * scene_camera
struct Sequence * seq3
void * scene_sound
struct Mask * mask
struct Sequence * prev
ListBase modifiers
ListBase seqbase
struct bSound * sound
struct Sequence * seq1
struct Sequence * seq2
struct Sequence * next
struct IDProperty * prop
SequenceRuntime runtime
struct Stereo3dFormat * stereo3d_format
struct Ipo *ipo DNA_DEPRECATED
SequenceModifierData modifier
struct ImBuf * reference_ibuf
struct ImBuf * waveform_ibuf
struct ImBuf * sep_waveform_ibuf
struct ImBuf * zebra_ibuf
struct ImBuf * histogram_ibuf
struct ImBuf * vector_ibuf
struct StripAnim * prev
struct anim * anim
struct StripAnim * next
char name[256]
struct anim * anim
char file[256]
short build_size_flags
ColorManagedColorspaceSettings colorspace_settings
StripColorBalance *color_balance DNA_DEPRECATED
StripProxy * proxy
struct Strip * prev
StripTransform * transform
StripElem * stripdata
char dir[768]
StripCrop * crop
struct Strip * next
float box_color[4]
float color[4]
float shadow_color[4]
struct VFont * text_font
char text[512]
SequenceModifierData modifier
Definition: IMB_anim.h:87