Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * Contributor(s): Original design: Reevan McKay 00022 * Contributor(s): Full recode, Ton Roosendaal, Crete 2005 00023 * Contributor(s): Animation recode, Joshua Leung 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00032 #ifndef DNA_ACTION_TYPES_H 00033 #define DNA_ACTION_TYPES_H 00034 00035 #include "DNA_listBase.h" 00036 #include "DNA_ID.h" 00037 #include "DNA_view2d_types.h" 00038 #include "DNA_userdef_types.h" /* ThemeWireColor */ 00039 00040 struct SpaceLink; 00041 struct Object; 00042 struct Group; 00043 struct GHash; 00044 00045 /* ************************************************ */ 00046 /* Visualisation */ 00047 00048 /* Motion Paths ------------------------------------ */ 00049 /* (used for Pose Channels and Objects) */ 00050 00051 /* Data point for motion path (mpv) */ 00052 typedef struct bMotionPathVert { 00053 float co[3]; /* coordinates of point in 3D-space */ 00054 int flag; /* quick settings */ 00055 } bMotionPathVert; 00056 00057 /* bMotionPathVert->flag */ 00058 typedef enum eMotionPathVert_Flag { 00059 /* vert is selected */ 00060 MOTIONPATH_VERT_SEL = (1<<0) 00061 } eMotionPathVert_Flag; 00062 00063 /* ........ */ 00064 00065 /* Motion Path data cache (mpath) 00066 * - for elements providing transforms (i.e. Objects or PoseChannels) 00067 */ 00068 typedef struct bMotionPath { 00069 bMotionPathVert *points; /* path samples */ 00070 int length; /* the number of cached verts */ 00071 00072 int start_frame; /* for drawing paths, the start frame number */ 00073 int end_frame; /* for drawing paths, the end frame number */ 00074 00075 int flag; /* baking settings - eMotionPath_Flag */ 00076 } bMotionPath; 00077 00078 /* bMotionPath->flag */ 00079 typedef enum eMotionPath_Flag { 00080 /* (for bones) path represents the head of the bone */ 00081 MOTIONPATH_FLAG_BHEAD = (1<<0), 00082 /* motion path is being edited */ 00083 MOTIONPATH_FLAG_EDIT = (1<<1) 00084 } eMotionPath_Flag; 00085 00086 /* Visualisation General --------------------------- */ 00087 /* for Objects or Poses (but NOT PoseChannels) */ 00088 00089 /* Animation Visualisation Settings (avs) */ 00090 typedef struct bAnimVizSettings { 00091 /* Onion-Skinning Settings ----------------- */ 00092 int ghost_sf, ghost_ef; /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */ 00093 int ghost_bc, ghost_ac; /* number of frames before/after current frame to show */ 00094 00095 short ghost_type; /* eOnionSkin_Types */ 00096 short ghost_step; /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */ 00097 00098 short ghost_flag; /* eOnionSkin_Flag */ 00099 00100 /* General Settings ------------------------ */ 00101 short recalc; /* eAnimViz_RecalcFlags */ 00102 00103 /* Motion Path Settings ------------------- */ 00104 short path_type; /* eMotionPath_Types */ 00105 short path_step; /* number of frames between points indicated on the paths */ 00106 00107 short path_viewflag; /* eMotionPaths_ViewFlag */ 00108 short path_bakeflag; /* eMotionPaths_BakeFlag */ 00109 00110 int path_sf, path_ef; /* start and end frames of path-calculation range */ 00111 int path_bc, path_ac; /* number of frames before/after current frame to show */ 00112 } bAnimVizSettings; 00113 00114 00115 /* bAnimVizSettings->recalc */ 00116 typedef enum eAnimViz_RecalcFlags { 00117 /* motionpaths need recalculating */ 00118 ANIMVIZ_RECALC_PATHS = (1<<0) 00119 } eAnimViz_RecalcFlags; 00120 00121 00122 /* bAnimVizSettings->ghost_type */ 00123 typedef enum eOnionSkin_Types { 00124 /* no ghosts at all */ 00125 GHOST_TYPE_NONE = 0, 00126 /* around current frame */ 00127 GHOST_TYPE_ACFRA, 00128 /* show ghosts within the specified frame range */ 00129 GHOST_TYPE_RANGE, 00130 /* show ghosts on keyframes within the specified range only */ 00131 GHOST_TYPE_KEYS 00132 } eOnionSkin_Types; 00133 00134 /* bAnimVizSettings->ghost_flag */ 00135 typedef enum eOnionSkin_Flag { 00136 /* only show selected bones in ghosts */ 00137 GHOST_FLAG_ONLYSEL = (1<<0) 00138 } eOnionSkin_Flag; 00139 00140 00141 /* bAnimVizSettings->path_type */ 00142 typedef enum eMotionPaths_Types { 00143 /* show the paths along their entire ranges */ 00144 MOTIONPATH_TYPE_RANGE = 0, 00145 /* only show the parts of the paths around the current frame */ 00146 MOTIONPATH_TYPE_ACFRA 00147 } eMotionPath_Types; 00148 00149 /* bAnimVizSettings->path_viewflag */ 00150 typedef enum eMotionPaths_ViewFlag { 00151 /* show frames on path */ 00152 MOTIONPATH_VIEW_FNUMS = (1<<0), 00153 /* show keyframes on path */ 00154 MOTIONPATH_VIEW_KFRAS = (1<<1), 00155 /* show keyframe/frame numbers */ 00156 MOTIONPATH_VIEW_KFNOS = (1<<2), 00157 /* find keyframes in whole action (instead of just in matching group name) */ 00158 MOTIONPATH_VIEW_KFACT = (1<<3) 00159 } eMotionPath_ViewFlag; 00160 00161 /* bAnimVizSettings->path_bakeflag */ 00162 typedef enum eMotionPaths_BakeFlag { 00163 /* motion paths directly associated with this block of settings needs updating */ 00164 MOTIONPATH_BAKE_NEEDS_RECALC = (1<<0), 00165 /* for bones - calculate head-points for curves instead of tips */ 00166 MOTIONPATH_BAKE_HEADS = (1<<1), 00167 /* motion paths exist for AnimVizSettings instance - set when calc for first time, and unset when clearing */ 00168 MOTIONPATH_BAKE_HAS_PATHS = (1<<2) 00169 } eMotionPath_BakeFlag; 00170 00171 /* ************************************************ */ 00172 /* Poses */ 00173 00174 /* PoseChannel ------------------------------------ */ 00175 00176 /* PoseChannel 00177 * 00178 * A PoseChannel stores the results of Actions and transform information 00179 * with respect to the restposition of Armature bones 00180 */ 00181 typedef struct bPoseChannel { 00182 struct bPoseChannel *next, *prev; 00183 00184 IDProperty *prop; /* User-Defined Properties on this PoseChannel */ 00185 00186 ListBase constraints;/* Constraints that act on this PoseChannel */ 00187 char name[64]; /* need to match bone name length: MAXBONENAME */ 00188 00189 short flag; /* dynamic, for detecting transform changes */ 00190 short ikflag; /* settings for IK bones */ 00191 short protectflag; /* protect channels from being transformed */ 00192 short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */ 00193 char constflag; /* for quick detecting which constraints affect this channel */ 00194 char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */ 00195 char pad0[6]; 00196 00197 struct Bone *bone; /* set on read file or rebuild pose */ 00198 struct bPoseChannel *parent; /* set on read file or rebuild pose */ 00199 struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */ 00200 00201 struct ListBase iktree; /* "IK trees" - only while evaluating pose */ 00202 struct ListBase siktree; /* Spline-IK "trees" - only while evaluating pose */ 00203 00204 bMotionPath *mpath; /* motion path cache for this bone */ 00205 struct Object *custom; /* draws custom object instead of default bone shape */ 00206 struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform. 00207 * needed in rare cases for advanced rigs, 00208 * since the alternative is highly complicated - campbell */ 00209 00210 /* transforms - written in by actions or transform */ 00211 float loc[3]; 00212 float size[3]; 00213 00214 /* rotations - written in by actions or transform (but only one representation gets used at any time) */ 00215 float eul[3]; /* euler rotation */ 00216 float quat[4]; /* quaternion rotation */ 00217 float rotAxis[3], rotAngle; /* axis-angle rotation */ 00218 short rotmode; /* eRotationModes - rotation representation to use */ 00219 short pad; 00220 00221 float chan_mat[4][4]; /* matrix result of loc/quat/size , and where we put deform in, see next line */ 00222 float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat */ 00223 float constinv[4][4]; /* inverse result of constraints. 00224 * doesn't include effect of restposition, parent, and local transform*/ 00225 00226 float pose_head[3]; /* actually pose_mat[3] */ 00227 float pose_tail[3]; /* also used for drawing help lines... */ 00228 00229 float limitmin[3], limitmax[3]; /* DOF constraint */ 00230 float stiffness[3]; /* DOF stiffness */ 00231 float ikstretch; 00232 float ikrotweight; /* weight of joint rotation constraint */ 00233 float iklinweight; /* weight of joint stretch constraint */ 00234 00235 void *temp; /* use for outliner */ 00236 } bPoseChannel; 00237 00238 00239 /* PoseChannel (transform) flags */ 00240 typedef enum ePchan_Flag { 00241 /* has transforms */ 00242 POSE_LOC = (1<<0), 00243 POSE_ROT = (1<<1), 00244 POSE_SIZE = (1<<2), 00245 /* old IK/cache stuff... */ 00246 POSE_IK_MAT = (1<<3), 00247 POSE_UNUSED2 = (1<<4), 00248 POSE_UNUSED3 = (1<<5), 00249 POSE_UNUSED4 = (1<<6), 00250 POSE_UNUSED5 = (1<<7), 00251 /* has Standard IK */ 00252 POSE_HAS_IK = (1<<8), 00253 /* IK/Pose solving*/ 00254 POSE_CHAIN = (1<<9), 00255 POSE_DONE = (1<<10), 00256 /* visualisation */ 00257 POSE_KEY = (1<<11), 00258 POSE_STRIDE = (1<<12), 00259 /* standard IK solving */ 00260 POSE_IKTREE = (1<<13), 00261 /* has Spline IK */ 00262 POSE_HAS_IKS = (1<<14), 00263 /* spline IK solving */ 00264 POSE_IKSPLINE = (1<<15) 00265 } ePchan_Flag; 00266 00267 /* PoseChannel constflag (constraint detection) */ 00268 typedef enum ePchan_ConstFlag { 00269 PCHAN_HAS_IK = (1<<0), 00270 PCHAN_HAS_CONST = (1<<1), 00271 /* only used for drawing Posemode, not stored in channel */ 00272 PCHAN_HAS_ACTION = (1<<2), 00273 PCHAN_HAS_TARGET = (1<<3), 00274 /* only for drawing Posemode too */ 00275 PCHAN_HAS_STRIDE = (1<<4), 00276 /* spline IK */ 00277 PCHAN_HAS_SPLINEIK = (1<<5) 00278 } ePchan_ConstFlag; 00279 00280 /* PoseChannel->ikflag */ 00281 typedef enum ePchan_IkFlag { 00282 BONE_IK_NO_XDOF = (1<<0), 00283 BONE_IK_NO_YDOF = (1<<1), 00284 BONE_IK_NO_ZDOF = (1<<2), 00285 00286 BONE_IK_XLIMIT = (1<<3), 00287 BONE_IK_YLIMIT = (1<<4), 00288 BONE_IK_ZLIMIT = (1<<5), 00289 00290 BONE_IK_ROTCTL = (1<<6), 00291 BONE_IK_LINCTL = (1<<7), 00292 00293 BONE_IK_NO_XDOF_TEMP = (1<<10), 00294 BONE_IK_NO_YDOF_TEMP = (1<<11), 00295 BONE_IK_NO_ZDOF_TEMP = (1<<12) 00296 } ePchan_IkFlag; 00297 00298 /* PoseChannel->rotmode and Object->rotmode */ 00299 typedef enum eRotationModes { 00300 /* quaternion rotations (default, and for older Blender versions) */ 00301 ROT_MODE_QUAT = 0, 00302 /* euler rotations - keep in sync with enum in BLI_math.h */ 00303 ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */ 00304 ROT_MODE_XYZ = 1, 00305 ROT_MODE_XZY, 00306 ROT_MODE_YXZ, 00307 ROT_MODE_YZX, 00308 ROT_MODE_ZXY, 00309 ROT_MODE_ZYX, 00310 /* NOTE: space is reserved here for 18 other possible 00311 * euler rotation orders not implemented 00312 */ 00313 /* axis angle rotations */ 00314 ROT_MODE_AXISANGLE = -1, 00315 00316 ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */ 00317 ROT_MODE_MAX = ROT_MODE_ZYX 00318 } eRotationModes; 00319 00320 /* Pose ------------------------------------ */ 00321 00322 /* Pose-Object. 00323 * 00324 * It is only found under ob->pose. It is not library data, even 00325 * though there is a define for it (hack for the outliner). 00326 */ 00327 typedef struct bPose { 00328 ListBase chanbase; /* list of pose channels, PoseBones in RNA */ 00329 struct GHash *chanhash; /* ghash for quicker string lookups */ 00330 00331 short flag, pad; 00332 unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */ 00333 int pad1; 00334 00335 float ctime; /* local action time of this pose */ 00336 float stride_offset[3]; /* applied to object */ 00337 float cyclic_offset[3]; /* result of match and cycles, applied in where_is_pose() */ 00338 00339 00340 ListBase agroups; /* list of bActionGroups */ 00341 00342 int active_group; /* index of active group (starts from 1) */ 00343 int iksolver; /* ik solver to use, see ePose_IKSolverType */ 00344 void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */ 00345 void *ikparam; /* IK solver parameters, structure depends on iksolver */ 00346 00347 bAnimVizSettings avs; /* settings for visualization of bone animation */ 00348 char proxy_act_bone[64]; /* proxy active bone name, MAXBONENAME */ 00349 } bPose; 00350 00351 00352 /* Pose->flag */ 00353 typedef enum ePose_Flags { 00354 /* results in armature_rebuild_pose being called */ 00355 POSE_RECALC = (1<<0), 00356 /* prevents any channel from getting overridden by anim from IPO */ 00357 POSE_LOCKED = (1<<1), 00358 /* clears the POSE_LOCKED flag for the next time the pose is evaluated */ 00359 POSE_DO_UNLOCK = (1<<2), 00360 /* pose has constraints which depend on time (used when depsgraph updates for a new frame) */ 00361 POSE_CONSTRAINTS_TIMEDEPEND = (1<<3), 00362 /* recalculate bone paths */ 00363 POSE_RECALCPATHS = (1<<4), 00364 /* set by armature_rebuild_pose to give a chance to the IK solver to rebuild IK tree */ 00365 POSE_WAS_REBUILT = (1<<5), 00366 /* set by game_copy_pose to indicate that this pose is used in the game engine */ 00367 POSE_GAME_ENGINE = (1<<6) 00368 } ePose_Flags; 00369 00370 /* IK Solvers ------------------------------------ */ 00371 00372 /* bPose->iksolver and bPose->ikparam->iksolver */ 00373 typedef enum ePose_IKSolverType { 00374 IKSOLVER_LEGACY = 0, 00375 IKSOLVER_ITASC 00376 } ePose_IKSolverType; 00377 00378 /* header for all bPose->ikparam structures */ 00379 typedef struct bIKParam { 00380 int iksolver; 00381 } bIKParam; 00382 00383 /* bPose->ikparam when bPose->iksolver=1 */ 00384 typedef struct bItasc { 00385 int iksolver; 00386 float precision; 00387 short numiter; 00388 short numstep; 00389 float minstep; 00390 float maxstep; 00391 short solver; 00392 short flag; 00393 float feedback; 00394 float maxvel; /* max velocity to SDLS solver */ 00395 float dampmax; /* maximum damping for DLS solver */ 00396 float dampeps; /* threshold of singular value from which the damping start progressively */ 00397 } bItasc; 00398 00399 /* bItasc->flag */ 00400 typedef enum eItasc_Flags { 00401 ITASC_AUTO_STEP = (1<<0), 00402 ITASC_INITIAL_REITERATION = (1<<1), 00403 ITASC_REITERATION = (1<<2), 00404 ITASC_SIMULATION = (1<<3) 00405 } eItasc_Flags; 00406 00407 /* bItasc->solver */ 00408 typedef enum eItasc_Solver { 00409 ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */ 00410 ITASC_SOLVER_DLS /* damped least square with numerical filtering of damping */ 00411 } eItasc_Solver; 00412 00413 /* ************************************************ */ 00414 /* Action */ 00415 00416 /* Groups -------------------------------------- */ 00417 00418 /* Action-Channel Group (agrp) 00419 00420 * These are stored as a list per-Action, and are only used to 00421 * group that Action's channels in an Animation Editor. 00422 * 00423 * Even though all FCurves live in a big list per Action, each group they are in also 00424 * holds references to the achans within that list which belong to it. Care must be taken to 00425 * ensure that action-groups never end up being the sole 'owner' of a channel. 00426 * 00427 * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used 00428 * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related 00429 * to Action-Groups. 00430 * 00431 * Note that these two uses each have their own RNA 'ActionGroup' and 'BoneGroup'. 00432 */ 00433 typedef struct bActionGroup { 00434 struct bActionGroup *next, *prev; 00435 00436 ListBase channels; /* Note: this must not be touched by standard listbase functions which would clear links to other channels */ 00437 00438 int flag; /* settings for this action-group */ 00439 int customCol; /* index of custom color set to use when used for bones (0=default - used for all old files, -1=custom set) */ 00440 char name[64]; /* name of the group */ 00441 00442 ThemeWireColor cs; /* color set to use when customCol == -1 */ 00443 } bActionGroup; 00444 00445 /* Action Group flags */ 00446 typedef enum eActionGroup_Flag { 00447 /* group is selected */ 00448 AGRP_SELECTED = (1<<0), 00449 /* group is 'active' / last selected one */ 00450 AGRP_ACTIVE = (1<<1), 00451 /* keyframes/channels belonging to it cannot be edited */ 00452 AGRP_PROTECTED = (1<<2), 00453 /* for UI (DopeSheet), sub-channels are shown */ 00454 AGRP_EXPANDED = (1<<3), 00455 /* sub-channels are not evaluated */ 00456 AGRP_MUTED = (1<<4), 00457 /* sub-channels are not visible in Graph Editor */ 00458 AGRP_NOTVISIBLE = (1<<5), 00459 /* for UI (Graph Editor), sub-channels are shown */ 00460 AGRP_EXPANDED_G = (1<<6), 00461 00462 AGRP_TEMP = (1<<30), 00463 AGRP_MOVED = (1<<31) 00464 } eActionGroup_Flag; 00465 00466 00467 /* Actions -------------------------------------- */ 00468 00469 /* Action - reusable F-Curve 'bag' (act) 00470 * 00471 * This contains F-Curves that may affect settings from more than one ID blocktype and/or 00472 * datablock (i.e. sub-data linked/used directly to the ID block that the animation data is linked to), 00473 * but with the restriction that the other unrelated data (i.e. data that is not directly used or linked to 00474 * by the source ID block). 00475 * 00476 * It serves as a 'unit' of reusable animation information (i.e. keyframes/motion data), that 00477 * affects a group of related settings (as defined by the user). 00478 */ 00479 typedef struct bAction { 00480 ID id; /* ID-serialisation for relinking */ 00481 00482 ListBase curves; /* function-curves (FCurve) */ 00483 ListBase chanbase; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */ 00484 ListBase groups; /* groups of function-curves (bActionGroup) */ 00485 ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */ 00486 00487 int flag; /* settings for this action */ 00488 int active_marker; /* index of the active marker */ 00489 00490 int idroot; /* type of ID-blocks that action can be assigned to (if 0, will be set to whatever ID first evaluates it) */ 00491 int pad; 00492 } bAction; 00493 00494 00495 /* Flags for the action */ 00496 typedef enum eAction_Flags { 00497 /* flags for displaying in UI */ 00498 ACT_COLLAPSED = (1<<0), 00499 ACT_SELECTED = (1<<1), 00500 00501 /* flags for evaluation/editing */ 00502 ACT_MUTED = (1<<9), 00503 ACT_PROTECTED = (1<<10), 00504 ACT_DISABLED = (1<<11) 00505 } eAction_Flags; 00506 00507 00508 /* ************************************************ */ 00509 /* Action/Dopesheet Editor */ 00510 00511 /* Storage for Dopesheet/Grease-Pencil Editor data */ 00512 typedef struct bDopeSheet { 00513 ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */ 00514 ListBase chanbase; /* cache for channels (only initialised when pinned) */ // XXX not used! 00515 00516 struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */ 00517 char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */ 00518 00519 int filterflag; /* flags to use for filtering data */ 00520 int flag; /* standard flags */ 00521 00522 int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */ 00523 int pad; 00524 } bDopeSheet; 00525 00526 00527 /* DopeSheet filter-flag */ 00528 typedef enum eDopeSheet_FilterFlag { 00529 /* general filtering */ 00530 ADS_FILTER_ONLYSEL = (1<<0), /* only include channels relating to selected data */ 00531 00532 /* temporary filters */ 00533 ADS_FILTER_ONLYDRIVERS = (1<<1), /* for 'Drivers' editor - only include Driver data from AnimData */ 00534 ADS_FILTER_ONLYNLA = (1<<2), /* for 'NLA' editor - only include NLA data from AnimData */ 00535 ADS_FILTER_SELEDIT = (1<<3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */ 00536 00537 /* general filtering 2 */ 00538 ADS_FILTER_SUMMARY = (1<<4), /* for 'DopeSheet' Editors - include 'summary' line */ 00539 ADS_FILTER_ONLYOBGROUP = (1<<5), /* only the objects in the specified object group get used */ 00540 00541 /* datatype-based filtering */ 00542 ADS_FILTER_NOSHAPEKEYS = (1<<6), 00543 ADS_FILTER_NOMESH = (1<<7), 00544 ADS_FILTER_NOOBJ = (1<<8), /* for animdata on object level, if we only want to concentrate on materials/etc. */ 00545 ADS_FILTER_NOLAT = (1<<9), 00546 ADS_FILTER_NOCAM = (1<<10), 00547 ADS_FILTER_NOMAT = (1<<11), 00548 ADS_FILTER_NOLAM = (1<<12), 00549 ADS_FILTER_NOCUR = (1<<13), 00550 ADS_FILTER_NOWOR = (1<<14), 00551 ADS_FILTER_NOSCE = (1<<15), 00552 ADS_FILTER_NOPART = (1<<16), 00553 ADS_FILTER_NOMBA = (1<<17), 00554 ADS_FILTER_NOARM = (1<<18), 00555 ADS_FILTER_NONTREE = (1<<19), 00556 ADS_FILTER_NOTEX = (1<<20), 00557 ADS_FILTER_NOSPK = (1<<21), 00558 00559 /* NLA-specific filters */ 00560 ADS_FILTER_NLA_NOACT = (1<<25), /* if the AnimData block has no NLA data, don't include to just show Action-line */ 00561 00562 /* general filtering 3 */ 00563 ADS_FILTER_INCL_HIDDEN = (1<<26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */ 00564 ADS_FILTER_BY_FCU_NAME = (1<<27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */ 00565 00566 /* combination filters (some only used at runtime) */ 00567 ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM|ADS_FILTER_NOMAT|ADS_FILTER_NOLAM|ADS_FILTER_NOCUR|ADS_FILTER_NOPART|ADS_FILTER_NOARM|ADS_FILTER_NOSPK) 00568 } eDopeSheet_FilterFlag; 00569 00570 /* DopeSheet general flags */ 00571 typedef enum eDopeSheet_Flag { 00572 ADS_FLAG_SUMMARY_COLLAPSED = (1<<0), /* when summary is shown, it is collapsed, so all other channels get hidden */ 00573 ADS_FLAG_SHOW_DBFILTERS = (1<<1) /* show filters for datablocks */ 00574 } eDopeSheet_Flag; 00575 00576 00577 00578 /* Action Editor Space. This is defined here instead of in DNA_space_types.h */ 00579 typedef struct SpaceAction { 00580 struct SpaceLink *next, *prev; 00581 ListBase regionbase; /* storage of regions for inactive spaces */ 00582 int spacetype; 00583 float blockscale; 00584 00585 short blockhandler[8]; 00586 00587 View2D v2d DNA_DEPRECATED; /* copied to region */ 00588 00589 bAction *action; /* the currently active action */ 00590 bDopeSheet ads; /* the currently active context (when not showing action) */ 00591 00592 char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */ 00593 short flag; /* flag: bitmapped settings; */ 00594 float timeslide; /* for Time-Slide transform mode drawing - current frame? */ 00595 } SpaceAction; 00596 00597 /* SpaceAction flag */ 00598 typedef enum eSAction_Flag { 00599 /* during transform (only set for TimeSlide) */ 00600 SACTION_MOVING = (1<<0), 00601 /* show sliders */ 00602 SACTION_SLIDERS = (1<<1), 00603 /* draw time in seconds instead of time in frames */ 00604 SACTION_DRAWTIME = (1<<2), 00605 /* don't filter action channels according to visibility */ 00606 //SACTION_NOHIDE = (1<<3), // XXX depreceated... old animation system 00607 /* don't kill overlapping keyframes after transform */ 00608 SACTION_NOTRANSKEYCULL = (1<<4), 00609 /* don't include keyframes that are out of view */ 00610 //SACTION_HORIZOPTIMISEON = (1<<5), // XXX depreceated... old irrelevant trick 00611 /* show pose-markers (local to action) in Action Editor mode */ 00612 SACTION_POSEMARKERS_SHOW = (1<<6), 00613 /* don't draw action channels using group colors (where applicable) */ 00614 SACTION_NODRAWGCOLORS = (1<<7), // XXX depreceated... irrelevant for current groups implementation 00615 /* don't draw current frame number beside frame indicator */ 00616 SACTION_NODRAWCFRANUM = (1<<8), 00617 /* temporary flag to force channel selections to be synced with main */ 00618 SACTION_TEMP_NEEDCHANSYNC = (1<<9), 00619 /* don't perform realtime updates */ 00620 SACTION_NOREALTIMEUPDATES = (1<<10), 00621 /* move markers as well as keyframes */ 00622 SACTION_MARKERS_MOVE = (1<<11) 00623 } eSAction_Flag; 00624 00625 /* SpaceAction Mode Settings */ 00626 typedef enum eAnimEdit_Context { 00627 /* action on the active object */ 00628 SACTCONT_ACTION = 0, 00629 /* list of all shapekeys on the active object, linked with their F-Curves */ 00630 SACTCONT_SHAPEKEY, 00631 /* editing of gpencil data */ 00632 SACTCONT_GPENCIL, 00633 /* dopesheet (default) */ 00634 SACTCONT_DOPESHEET 00635 } eAnimEdit_Context; 00636 00637 /* SpaceAction AutoSnap Settings (also used by other Animation Editors) */ 00638 typedef enum eAnimEdit_AutoSnap { 00639 /* no auto-snap */ 00640 SACTSNAP_OFF = 0, 00641 /* snap to 1.0 frame/second intervals */ 00642 SACTSNAP_STEP, 00643 /* snap to actual frames/seconds (nla-action time) */ 00644 SACTSNAP_FRAME, 00645 /* snap to nearest marker */ 00646 SACTSNAP_MARKER 00647 } eAnimEdit_AutoSnap; 00648 00649 00650 /* ************************************************ */ 00651 /* Legacy Data */ 00652 00653 /* WARNING: Action Channels are now depreceated... they were part of the old animation system! 00654 * (ONLY USED FOR DO_VERSIONS...) 00655 * 00656 * Action Channels belong to Actions. They are linked with an IPO block, and can also own 00657 * Constraint Channels in certain situations. 00658 * 00659 * Action-Channels can only belong to one group at a time, but they still live the Action's 00660 * list of achans (to preserve backwards compatibility, and also minimize the code 00661 * that would need to be recoded). Grouped achans are stored at the start of the list, according 00662 * to the position of the group in the list, and their position within the group. 00663 */ 00664 typedef struct bActionChannel { 00665 struct bActionChannel *next, *prev; 00666 bActionGroup *grp; /* Action Group this Action Channel belongs to */ 00667 00668 struct Ipo *ipo; /* IPO block this action channel references */ 00669 ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */ 00670 00671 int flag; /* settings accessed via bitmapping */ 00672 char name[64]; /* channel name, MAX_NAME */ 00673 int temp; /* temporary setting - may be used to indicate group that channel belongs to during syncing */ 00674 } bActionChannel; 00675 00676 /* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */ 00677 typedef enum ACHAN_FLAG { 00678 ACHAN_SELECTED = (1<<0), 00679 ACHAN_HILIGHTED = (1<<1), 00680 ACHAN_HIDDEN = (1<<2), 00681 ACHAN_PROTECTED = (1<<3), 00682 ACHAN_EXPANDED = (1<<4), 00683 ACHAN_SHOWIPO = (1<<5), 00684 ACHAN_SHOWCONS = (1<<6), 00685 ACHAN_MOVED = (1<<31) 00686 } ACHAN_FLAG; 00687 00688 #endif