|
Blender
V2.59
|
00001 /* 00002 * $Id: DNA_sequence_types.h 37303 2011-06-07 18:34:33Z campbellbarton $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): none yet. 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef DNA_SEQUENCE_TYPES_H 00030 #define DNA_SEQUENCE_TYPES_H 00031 00037 #include "DNA_listBase.h" 00038 #include "DNA_vec_types.h" 00039 00040 struct Ipo; 00041 struct Scene; 00042 struct bSound; 00043 00044 /* strlens; 80= FILE_MAXFILE, 160= FILE_MAXDIR */ 00045 00046 typedef struct StripElem { 00047 char name[80]; 00048 int orig_width, orig_height; 00049 } StripElem; 00050 00051 typedef struct StripCrop { 00052 int top; 00053 int bottom; 00054 int left; 00055 int right; 00056 } StripCrop; 00057 00058 typedef struct StripTransform { 00059 int xofs; 00060 int yofs; 00061 } StripTransform; 00062 00063 typedef struct StripColorBalance { 00064 float lift[3]; 00065 float gamma[3]; 00066 float gain[3]; 00067 int flag; 00068 int pad; 00069 // float exposure; 00070 // float saturation; 00071 } StripColorBalance; 00072 00073 typedef struct StripProxy { 00074 char dir[160]; 00075 char file[80]; 00076 struct anim *anim; 00077 short size; 00078 short quality; 00079 int pad; 00080 } StripProxy; 00081 00082 typedef struct Strip { 00083 struct Strip *next, *prev; 00084 int rt, len, us, done; 00085 int startstill, endstill; 00086 StripElem *stripdata; 00087 char dir[160]; 00088 StripProxy *proxy; 00089 StripCrop *crop; 00090 StripTransform *transform; 00091 StripColorBalance *color_balance; 00092 } Strip; 00093 00094 00095 typedef struct PluginSeq { 00096 char name[256]; 00097 void *handle; 00098 00099 char *pname; 00100 00101 int vars, version; 00102 00103 void *varstr; 00104 float *cfra; 00105 00106 float data[32]; 00107 00108 void *instance_private_data; 00109 void **current_private_data; 00110 00111 void (*doit)(void); 00112 00113 void (*callback)(void); 00114 } PluginSeq; 00115 00116 /* The sequence structure is the basic struct used by any strip. each of the strips uses a different sequence structure.*/ 00117 /* WATCH IT: first part identical to ID (for use in ipo's) */ 00118 00119 typedef struct Sequence { 00120 struct Sequence *next, *prev; 00121 void *tmp; /* tmp var for copying, and tagging for linked selection */ 00122 void *lib; /* needed (to be like ipo), else it will raise libdata warnings, this should never be used */ 00123 char name[24]; /* SEQ_NAME_MAXSTR - name, set by default and needs to be unique, for RNA paths */ 00124 00125 int flag, type; /*flags bitmap (see below) and the type of sequence*/ 00126 int len; /* the length of the contense of this strip - before handles are applied */ 00127 int start, startofs, endofs; 00128 int startstill, endstill; 00129 int machine, depth; /*machine - the strip channel, depth - the depth in the sequence when dealing with metastrips */ 00130 int startdisp, enddisp; /*starting and ending points in the sequence*/ 00131 float sat, pad; 00132 float mul, handsize; 00133 /* is sfra needed anymore? - it looks like its only used in one place */ 00134 int sfra; /* starting frame according to the timeline of the scene. */ 00135 int anim_preseek; 00136 00137 Strip *strip; 00138 00139 struct Ipo *ipo; // xxx depreceated... old animation system 00140 struct Scene *scene; 00141 struct Object *scene_camera; /* override scene camera */ 00142 00143 struct anim *anim; 00144 float effect_fader; 00145 float speed_fader; 00146 00147 PluginSeq *plugin; 00148 00149 /* pointers for effects: */ 00150 struct Sequence *seq1, *seq2, *seq3; 00151 00152 ListBase seqbase; /* list of strips for metastrips */ 00153 00154 struct bSound *sound; /* the linked "bSound" object */ 00155 void *scene_sound; 00156 float volume; 00157 00158 float level, pan; /* level in dB (0=full), pan -1..1 */ 00159 int scenenr; /* for scene selection */ 00160 int multicam_source; /* for multicam source selection */ 00161 float strobe; 00162 00163 void *effectdata; /* Struct pointer for effect settings */ 00164 00165 int anim_startofs; /* only use part of animation file */ 00166 int anim_endofs; /* is subtle different to startofs / endofs */ 00167 00168 int blend_mode; 00169 float blend_opacity; 00170 00171 } Sequence; 00172 00173 typedef struct MetaStack { 00174 struct MetaStack *next, *prev; 00175 ListBase *oldbasep; 00176 Sequence *parseq; 00177 } MetaStack; 00178 00179 typedef struct Editing { 00180 ListBase *seqbasep; /* pointer to the current list of seq's being edited (can be within a meta strip) */ 00181 ListBase seqbase; /* pointer to the top-most seq's */ 00182 ListBase metastack; 00183 00184 /* Context vars, used to be static */ 00185 Sequence *act_seq; 00186 char act_imagedir[256]; 00187 char act_sounddir[256]; 00188 00189 int over_ofs, over_cfra; 00190 int over_flag, pad; 00191 rctf over_border; 00192 } Editing; 00193 00194 /* ************* Effect Variable Structs ********* */ 00195 typedef struct WipeVars { 00196 float edgeWidth,angle; 00197 short forward, wipetype; 00198 } WipeVars; 00199 00200 typedef struct GlowVars { 00201 float fMini; /* Minimum intensity to trigger a glow */ 00202 float fClamp; 00203 float fBoost; /* Amount to multiply glow intensity */ 00204 float dDist; /* Radius of glow blurring */ 00205 int dQuality; 00206 int bNoComp; /* SHOW/HIDE glow buffer */ 00207 } GlowVars; 00208 00209 typedef struct TransformVars { 00210 float ScalexIni; 00211 float ScaleyIni; 00212 float ScalexFin; /* deprecated - old transform strip */ 00213 float ScaleyFin; /* deprecated - old transform strip */ 00214 float xIni; 00215 float xFin; /* deprecated - old transform strip */ 00216 float yIni; 00217 float yFin; /* deprecated - old transform strip */ 00218 float rotIni; 00219 float rotFin; /* deprecated - old transform strip */ 00220 int percent; 00221 int interpolation; 00222 int uniform_scale; /* preserve aspect/ratio when scaling */ 00223 } TransformVars; 00224 00225 typedef struct SolidColorVars { 00226 float col[3]; 00227 float pad; 00228 } SolidColorVars; 00229 00230 typedef struct SpeedControlVars { 00231 float * frameMap; 00232 float globalSpeed; 00233 int flags; 00234 int length; 00235 int lastValidFrame; 00236 } SpeedControlVars; 00237 00238 #define SELECT 1 00239 00240 /* Editor->over_flag */ 00241 #define SEQ_EDIT_OVERLAY_SHOW 1 00242 #define SEQ_EDIT_OVERLAY_ABS 2 00243 00244 #define SEQ_STRIP_OFSBOTTOM 0.2f 00245 #define SEQ_STRIP_OFSTOP 0.8f 00246 00247 /* SpeedControlVars->flags */ 00248 #define SEQ_SPEED_INTEGRATE 1 00249 #define SEQ_SPEED_BLEND 2 00250 #define SEQ_SPEED_COMPRESS_IPO_Y 4 00251 00252 /* ***************** SEQUENCE ****************** */ 00253 #define SEQ_NAME_MAXSTR 24 00254 00255 /* seq->flag */ 00256 #define SEQ_LEFTSEL (1<<1) 00257 #define SEQ_RIGHTSEL (1<<2) 00258 #define SEQ_OVERLAP (1<<3) 00259 #define SEQ_FILTERY (1<<4) 00260 #define SEQ_MUTE (1<<5) 00261 #define SEQ_MAKE_PREMUL (1<<6) 00262 #define SEQ_REVERSE_FRAMES (1<<7) 00263 #define SEQ_IPO_FRAME_LOCKED (1<<8) 00264 #define SEQ_EFFECT_NOT_LOADED (1<<9) 00265 #define SEQ_FLAG_DELETE (1<<10) 00266 #define SEQ_FLIPX (1<<11) 00267 #define SEQ_FLIPY (1<<12) 00268 #define SEQ_MAKE_FLOAT (1<<13) 00269 #define SEQ_LOCK (1<<14) 00270 #define SEQ_USE_PROXY (1<<15) 00271 #define SEQ_USE_TRANSFORM (1<<16) 00272 #define SEQ_USE_CROP (1<<17) 00273 #define SEQ_USE_COLOR_BALANCE (1<<18) 00274 #define SEQ_USE_PROXY_CUSTOM_DIR (1<<19) 00275 00276 #define SEQ_USE_PROXY_CUSTOM_FILE (1<<21) 00277 #define SEQ_USE_EFFECT_DEFAULT_FADE (1<<22) 00278 00279 #define SEQ_INVALID_EFFECT (1<<31) 00280 00281 /* convenience define for all selection flags */ 00282 #define SEQ_ALLSEL (SELECT+SEQ_LEFTSEL+SEQ_RIGHTSEL) 00283 00284 /* deprecated, dont use a flag anymore*/ 00285 /*#define SEQ_ACTIVE 1048576*/ 00286 00287 #define SEQ_COLOR_BALANCE_INVERSE_GAIN 1 00288 #define SEQ_COLOR_BALANCE_INVERSE_GAMMA 2 00289 #define SEQ_COLOR_BALANCE_INVERSE_LIFT 4 00290 00291 /* seq->type WATCH IT: SEQ_EFFECT BIT is used to determine if this is an effect strip!!! */ 00292 #define SEQ_IMAGE 0 00293 #define SEQ_META 1 00294 #define SEQ_SCENE 2 00295 #define SEQ_MOVIE 3 00296 #define SEQ_RAM_SOUND 4 00297 #define SEQ_HD_SOUND 5 00298 #define SEQ_SOUND 4 00299 00300 #define SEQ_EFFECT 8 00301 #define SEQ_CROSS 8 00302 #define SEQ_ADD 9 00303 #define SEQ_SUB 10 00304 #define SEQ_ALPHAOVER 11 00305 #define SEQ_ALPHAUNDER 12 00306 #define SEQ_GAMCROSS 13 00307 #define SEQ_MUL 14 00308 #define SEQ_OVERDROP 15 00309 #define SEQ_PLUGIN 24 00310 #define SEQ_WIPE 25 00311 #define SEQ_GLOW 26 00312 #define SEQ_TRANSFORM 27 00313 #define SEQ_COLOR 28 00314 #define SEQ_SPEED 29 00315 #define SEQ_MULTICAM 30 00316 #define SEQ_ADJUSTMENT 31 00317 #define SEQ_EFFECT_MAX 31 00318 00319 #define STRIPELEM_FAILED 0 00320 #define STRIPELEM_OK 1 00321 00322 #define STRIPELEM_PREVIEW_DONE 1 00323 00324 #define SEQ_BLEND_REPLACE 0 00325 /* all other BLEND_MODEs are simple SEQ_EFFECT ids and therefore identical 00326 to the table above. (Only those effects that handle _exactly_ two inputs, 00327 otherwise, you can't really blend, right :) !) 00328 */ 00329 00330 00331 #define SEQ_HAS_PATH(_seq) (ELEM5((_seq)->type, SEQ_MOVIE, SEQ_IMAGE, SEQ_SOUND, SEQ_RAM_SOUND, SEQ_HD_SOUND)) 00332 00333 #endif 00334