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 * Contributor(s): Original design: Reevan McKay
22 * Contributor(s): Full recode, Ton Roosendaal, Crete 2005
23 * Contributor(s): Animation recode, Joshua Leung
25 * ***** END GPL LICENSE BLOCK *****
28 /** \file DNA_action_types.h
31 * Define actions data-block for the animation system.
32 * A collection of animation curves and drivers to be assigned to data-blocks
33 * or sequenced in the non-linear-editor (NLA).
36 #ifndef __DNA_ACTION_TYPES_H__
37 #define __DNA_ACTION_TYPES_H__
39 #include "DNA_listBase.h"
41 #include "DNA_view2d_types.h"
42 #include "DNA_userdef_types.h" /* ThemeWireColor */
49 /* ************************************************ */
52 /* Motion Paths ------------------------------------ */
53 /* (used for Pose Channels and Objects) */
55 /* Data point for motion path (mpv) */
56 typedef struct bMotionPathVert {
57 float co[3]; /* coordinates of point in 3D-space */
58 int flag; /* quick settings */
61 /* bMotionPathVert->flag */
62 typedef enum eMotionPathVert_Flag {
63 /* vert is selected */
64 MOTIONPATH_VERT_SEL = (1 << 0)
65 } eMotionPathVert_Flag;
69 /* Motion Path data cache (mpath)
70 * - for elements providing transforms (i.e. Objects or PoseChannels)
72 typedef struct bMotionPath {
73 bMotionPathVert *points; /* path samples */
74 int length; /* the number of cached verts */
76 int start_frame; /* for drawing paths, the start frame number */
77 int end_frame; /* for drawing paths, the end frame number */
79 float color[3]; /* optional custom color */
80 int line_thickness; /* line thickness */
81 int flag; /* baking settings - eMotionPath_Flag */
84 /* bMotionPath->flag */
85 typedef enum eMotionPath_Flag {
86 /* (for bones) path represents the head of the bone */
87 MOTIONPATH_FLAG_BHEAD = (1 << 0),
88 /* motion path is being edited */
89 MOTIONPATH_FLAG_EDIT = (1 << 1),
91 MOTIONPATH_FLAG_CUSTOM = (1 << 2),
92 /* Draw lines or only points */
93 MOTIONPATH_FLAG_LINES = (1 << 3)
96 /* Visualization General --------------------------- */
97 /* for Objects or Poses (but NOT PoseChannels) */
99 /* Animation Visualization Settings (avs) */
100 typedef struct bAnimVizSettings {
101 /* Onion-Skinning Settings ----------------- */
102 int ghost_sf, ghost_ef; /* start and end frames of ghost-drawing range (only used for GHOST_TYPE_RANGE) */
103 int ghost_bc, ghost_ac; /* number of frames before/after current frame to show */
105 short ghost_type; /* eOnionSkin_Types */
106 short ghost_step; /* number of frames between each ghost shown (not for GHOST_TYPE_KEYS) */
108 short ghost_flag; /* eOnionSkin_Flag */
110 /* General Settings ------------------------ */
111 short recalc; /* eAnimViz_RecalcFlags */
113 /* Motion Path Settings ------------------- */
114 short path_type; /* eMotionPath_Types */
115 short path_step; /* number of frames between points indicated on the paths */
117 short path_viewflag; /* eMotionPaths_ViewFlag */
118 short path_bakeflag; /* eMotionPaths_BakeFlag */
120 int path_sf, path_ef; /* start and end frames of path-calculation range */
121 int path_bc, path_ac; /* number of frames before/after current frame to show */
125 /* bAnimVizSettings->recalc */
126 typedef enum eAnimViz_RecalcFlags {
127 /* motionpaths need recalculating */
128 ANIMVIZ_RECALC_PATHS = (1 << 0)
129 } eAnimViz_RecalcFlags;
132 /* bAnimVizSettings->ghost_type */
133 typedef enum eOnionSkin_Types {
134 /* no ghosts at all */
136 /* around current frame */
137 GHOST_TYPE_ACFRA = 1,
138 /* show ghosts within the specified frame range */
139 GHOST_TYPE_RANGE = 2,
140 /* show ghosts on keyframes within the specified range only */
144 /* bAnimVizSettings->ghost_flag */
145 typedef enum eOnionSkin_Flag {
146 /* only show selected bones in ghosts */
147 GHOST_FLAG_ONLYSEL = (1 << 0)
151 /* bAnimVizSettings->path_type */
152 typedef enum eMotionPaths_Types {
153 /* show the paths along their entire ranges */
154 MOTIONPATH_TYPE_RANGE = 0,
155 /* only show the parts of the paths around the current frame */
156 MOTIONPATH_TYPE_ACFRA = 1,
159 /* bAnimVizSettings->path_viewflag */
160 typedef enum eMotionPaths_ViewFlag {
161 /* show frames on path */
162 MOTIONPATH_VIEW_FNUMS = (1 << 0),
163 /* show keyframes on path */
164 MOTIONPATH_VIEW_KFRAS = (1 << 1),
165 /* show keyframe/frame numbers */
166 MOTIONPATH_VIEW_KFNOS = (1 << 2),
167 /* find keyframes in whole action (instead of just in matching group name) */
168 MOTIONPATH_VIEW_KFACT = (1 << 3),
169 /* draw lines on path */
170 MOTIONPATH_VIEW_LINES = (1 << 4)
171 } eMotionPath_ViewFlag;
173 /* bAnimVizSettings->path_bakeflag */
174 typedef enum eMotionPaths_BakeFlag {
175 /* motion paths directly associated with this block of settings needs updating */
176 MOTIONPATH_BAKE_NEEDS_RECALC = (1 << 0),
177 /* for bones - calculate head-points for curves instead of tips */
178 MOTIONPATH_BAKE_HEADS = (1 << 1),
179 /* motion paths exist for AnimVizSettings instance - set when calc for first time, and unset when clearing */
180 MOTIONPATH_BAKE_HAS_PATHS = (1 << 2)
181 } eMotionPath_BakeFlag;
186 typedef struct bPoseChannelDrawData {
187 float solid_color[4];
190 int bbone_matrix_len;
192 float bbone_matrix[0][4][4];
193 } bPoseChannelDrawData;
195 /* ************************************************ */
198 /* PoseChannel ------------------------------------ */
202 * A PoseChannel stores the results of Actions and transform information
203 * with respect to the restposition of Armature bones
205 typedef struct bPoseChannel {
206 struct bPoseChannel *next, *prev;
208 IDProperty *prop; /* User-Defined Properties on this PoseChannel */
210 ListBase constraints; /* Constraints that act on this PoseChannel */
211 char name[64]; /* need to match bone name length: MAXBONENAME */
213 short flag; /* dynamic, for detecting transform changes */
214 short ikflag; /* settings for IK bones */
215 short protectflag; /* protect channels from being transformed */
216 short agrp_index; /* index of action-group this bone belongs to (0 = default/no group) */
217 char constflag; /* for quick detecting which constraints affect this channel */
218 char selectflag; /* copy of bone flag, so you can work with library armatures, not for runtime use */
223 struct Bone *bone; /* set on read file or rebuild pose */
224 struct bPoseChannel *parent; /* set on read file or rebuild pose */
225 struct bPoseChannel *child; /* set on read file or rebuild pose, the 'ik' child, for b-bones */
227 struct ListBase iktree; /* "IK trees" - only while evaluating pose */
228 struct ListBase siktree; /* Spline-IK "trees" - only while evaluating pose */
230 bMotionPath *mpath; /* motion path cache for this bone */
231 struct Object *custom; /* draws custom object instead of default bone shape */
232 struct bPoseChannel *custom_tx; /* odd feature, display with another bones transform.
233 * needed in rare cases for advanced rigs,
234 * since the alternative is highly complicated - campbell */
239 /* transforms - written in by actions or transform */
243 /* rotations - written in by actions or transform (but only one representation gets used at any time) */
244 float eul[3]; /* euler rotation */
245 float quat[4]; /* quaternion rotation */
246 float rotAxis[3], rotAngle; /* axis-angle rotation */
247 short rotmode; /* eRotationModes - rotation representation to use */
250 float chan_mat[4][4]; /* matrix result of loc/quat/size, and where we put deform in, see next line */
251 float pose_mat[4][4]; /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat
252 * this matrix is object space */
253 float disp_mat[4][4]; /* for display, pose_mat with bone length applied */
254 float disp_tail_mat[4][4]; /* for display, pose_mat with bone length applied and translated to tail*/
255 float constinv[4][4]; /* inverse result of constraints.
256 * doesn't include effect of restposition, parent, and local transform*/
258 float pose_head[3]; /* actually pose_mat[3] */
259 float pose_tail[3]; /* also used for drawing help lines... */
261 float limitmin[3], limitmax[3]; /* DOF constraint, note! - these are stored in degrees, not radians */
262 float stiffness[3]; /* DOF stiffness */
264 float ikrotweight; /* weight of joint rotation constraint */
265 float iklinweight; /* weight of joint stretch constraint */
267 /* curved bones settings - these are for animating, and are applied on top of the copies in pchan->bone */
269 float curveInX, curveInY;
270 float curveOutX, curveOutY;
271 float scaleIn, scaleOut;
273 struct bPoseChannel *bbone_prev; /* next/prev bones to use as handle references when calculating bbones (optional) */
274 struct bPoseChannel *bbone_next;
276 void *temp; /* use for outliner */
277 /* Runtime data for color and bbone segment matrix. */
278 bPoseChannelDrawData *draw_data;
282 /* PoseChannel (transform) flags */
283 typedef enum ePchan_Flag {
287 POSE_SIZE = (1 << 2),
289 /* old IK/cache stuff
290 * - used to be here from (1 << 3) to (1 << 8)
291 * but has been repurposed since 2.77.2
292 * as they haven't been used in over 10 years
295 /* has BBone deforms */
296 POSE_BBONE_SHAPE = (1 << 3),
298 /* IK/Pose solving */
299 POSE_CHAIN = (1 << 9),
300 POSE_DONE = (1 << 10),
302 POSE_KEY = (1 << 11),
303 POSE_STRIDE = (1 << 12),
304 /* standard IK solving */
305 POSE_IKTREE = (1 << 13),
308 POSE_HAS_IKS = (1 << 14),
310 /* spline IK solving */
311 POSE_IKSPLINE = (1 << 15)
314 /* PoseChannel constflag (constraint detection) */
315 typedef enum ePchan_ConstFlag {
316 PCHAN_HAS_IK = (1 << 0),
317 PCHAN_HAS_CONST = (1 << 1),
318 /* only used for drawing Posemode, not stored in channel */
319 PCHAN_HAS_ACTION = (1 << 2),
320 PCHAN_HAS_TARGET = (1 << 3),
321 /* only for drawing Posemode too */
322 PCHAN_HAS_STRIDE = (1 << 4),
324 PCHAN_HAS_SPLINEIK = (1 << 5)
327 /* PoseChannel->ikflag */
328 typedef enum ePchan_IkFlag {
329 BONE_IK_NO_XDOF = (1 << 0),
330 BONE_IK_NO_YDOF = (1 << 1),
331 BONE_IK_NO_ZDOF = (1 << 2),
333 BONE_IK_XLIMIT = (1 << 3),
334 BONE_IK_YLIMIT = (1 << 4),
335 BONE_IK_ZLIMIT = (1 << 5),
337 BONE_IK_ROTCTL = (1 << 6),
338 BONE_IK_LINCTL = (1 << 7),
340 BONE_IK_NO_XDOF_TEMP = (1 << 10),
341 BONE_IK_NO_YDOF_TEMP = (1 << 11),
342 BONE_IK_NO_ZDOF_TEMP = (1 << 12)
345 /* PoseChannel->drawflag */
346 typedef enum ePchan_DrawFlag {
347 PCHAN_DRAW_NO_CUSTOM_BONE_SIZE = (1 << 0),
350 #define PCHAN_CUSTOM_DRAW_SIZE(pchan) \
351 (pchan)->custom_scale * (((pchan)->drawflag & PCHAN_DRAW_NO_CUSTOM_BONE_SIZE) ? 1.0f : (pchan)->bone->length)
353 /* PoseChannel->bboneflag */
354 typedef enum ePchan_BBoneFlag {
355 /* Use custom reference bones (for roll and handle alignment), instead of immediate neighbors */
356 PCHAN_BBONE_CUSTOM_HANDLES = (1 << 1),
357 /* Evaluate start handle as being "relative" */
358 PCHAN_BBONE_CUSTOM_START_REL = (1 << 2),
359 /* Evaluate end handle as being "relative" */
360 PCHAN_BBONE_CUSTOM_END_REL = (1 << 3),
363 /* PoseChannel->rotmode and Object->rotmode */
364 typedef enum eRotationModes {
365 /* quaternion rotations (default, and for older Blender versions) */
367 /* euler rotations - keep in sync with enum in BLI_math.h */
368 ROT_MODE_EUL = 1, /* Blender 'default' (classic) - must be as 1 to sync with BLI_math_rotation.h defines */
375 /* NOTE: space is reserved here for 18 other possible
376 * euler rotation orders not implemented
378 /* axis angle rotations */
379 ROT_MODE_AXISANGLE = -1,
381 ROT_MODE_MIN = ROT_MODE_AXISANGLE, /* sentinel for Py API */
382 ROT_MODE_MAX = ROT_MODE_ZYX
385 /* Pose ------------------------------------ */
389 * It is only found under ob->pose. It is not library data, even
390 * though there is a define for it (hack for the outliner).
392 typedef struct bPose {
393 ListBase chanbase; /* list of pose channels, PoseBones in RNA */
394 struct GHash *chanhash; /* ghash for quicker string lookups */
397 unsigned int proxy_layer; /* proxy layer: copy from armature, gets synced */
400 float ctime; /* local action time of this pose */
401 float stride_offset[3]; /* applied to object */
402 float cyclic_offset[3]; /* result of match and cycles, applied in BKE_pose_where_is() */
405 ListBase agroups; /* list of bActionGroups */
407 int active_group; /* index of active group (starts from 1) */
408 int iksolver; /* ik solver to use, see ePose_IKSolverType */
409 void *ikdata; /* temporary IK data, depends on the IK solver. Not saved in file */
410 void *ikparam; /* IK solver parameters, structure depends on iksolver */
412 bAnimVizSettings avs; /* settings for visualization of bone animation */
413 char proxy_act_bone[64]; /* proxy active bone name, MAXBONENAME */
418 typedef enum ePose_Flags {
419 /* results in BKE_pose_rebuild being called */
420 POSE_RECALC = (1 << 0),
421 /* prevents any channel from getting overridden by anim from IPO */
422 POSE_LOCKED = (1 << 1),
423 /* clears the POSE_LOCKED flag for the next time the pose is evaluated */
424 POSE_DO_UNLOCK = (1 << 2),
425 /* pose has constraints which depend on time (used when depsgraph updates for a new frame) */
426 POSE_CONSTRAINTS_TIMEDEPEND = (1 << 3),
427 /* recalculate bone paths */
428 POSE_RECALCPATHS = (1 << 4),
429 /* set by BKE_pose_rebuild to give a chance to the IK solver to rebuild IK tree */
430 POSE_WAS_REBUILT = (1 << 5),
431 /* set by game_copy_pose to indicate that this pose is used in the game engine */
432 POSE_GAME_ENGINE = (1 << 6),
433 /* pose constraint flags needs to be updated */
434 POSE_CONSTRAINTS_NEED_UPDATE_FLAGS = (1 << 7),
437 /* IK Solvers ------------------------------------ */
439 /* bPose->iksolver and bPose->ikparam->iksolver */
440 typedef enum ePose_IKSolverType {
441 IKSOLVER_STANDARD = 0,
443 } ePose_IKSolverType;
445 /* header for all bPose->ikparam structures */
446 typedef struct bIKParam {
450 /* bPose->ikparam when bPose->iksolver=1 */
451 typedef struct bItasc {
461 float maxvel; /* max velocity to SDLS solver */
462 float dampmax; /* maximum damping for DLS solver */
463 float dampeps; /* threshold of singular value from which the damping start progressively */
467 typedef enum eItasc_Flags {
468 ITASC_AUTO_STEP = (1 << 0),
469 ITASC_INITIAL_REITERATION = (1 << 1),
470 ITASC_REITERATION = (1 << 2),
471 ITASC_SIMULATION = (1 << 3)
475 typedef enum eItasc_Solver {
476 ITASC_SOLVER_SDLS = 0, /* selective damped least square, suitable for CopyPose constraint */
477 ITASC_SOLVER_DLS = 1, /* damped least square with numerical filtering of damping */
480 /* ************************************************ */
483 /* Groups -------------------------------------- */
485 /* Action-Channel Group (agrp)
487 * These are stored as a list per-Action, and are only used to
488 * group that Action's channels in an Animation Editor.
490 * Even though all FCurves live in a big list per Action, each group they are in also
491 * holds references to the achans within that list which belong to it. Care must be taken to
492 * ensure that action-groups never end up being the sole 'owner' of a channel.
494 * This is also exploited for bone-groups. Bone-Groups are stored per bPose, and are used
495 * primarily to color bones in the 3d-view. There are other benefits too, but those are mostly related
498 * Note that these two uses each have their own RNA 'ActionGroup' and 'BoneGroup'.
500 typedef struct bActionGroup {
501 struct bActionGroup *next, *prev;
503 ListBase channels; /* Note: this must not be touched by standard listbase functions which would clear links to other channels */
505 int flag; /* settings for this action-group */
506 int customCol; /* index of custom color set to use when used for bones (0=default - used for all old files, -1=custom set) */
507 char name[64]; /* name of the group */
509 ThemeWireColor cs; /* color set to use when customCol == -1 */
512 /* Action Group flags */
513 typedef enum eActionGroup_Flag {
514 /* group is selected */
515 AGRP_SELECTED = (1 << 0),
516 /* group is 'active' / last selected one */
517 AGRP_ACTIVE = (1 << 1),
518 /* keyframes/channels belonging to it cannot be edited */
519 AGRP_PROTECTED = (1 << 2),
520 /* for UI (DopeSheet), sub-channels are shown */
521 AGRP_EXPANDED = (1 << 3),
522 /* sub-channels are not evaluated */
523 AGRP_MUTED = (1 << 4),
524 /* sub-channels are not visible in Graph Editor */
525 AGRP_NOTVISIBLE = (1 << 5),
526 /* for UI (Graph Editor), sub-channels are shown */
527 AGRP_EXPANDED_G = (1 << 6),
529 /* sub channel modifiers off */
530 AGRP_MODIFIERS_OFF = (1 << 7),
532 AGRP_TEMP = (1 << 30),
533 AGRP_MOVED = (1 << 31)
537 /* Actions -------------------------------------- */
539 /* Action - reusable F-Curve 'bag' (act)
541 * This contains F-Curves that may affect settings from more than one ID blocktype and/or
542 * datablock (i.e. sub-data linked/used directly to the ID block that the animation data is linked to),
543 * but with the restriction that the other unrelated data (i.e. data that is not directly used or linked to
544 * by the source ID block).
546 * It serves as a 'unit' of reusable animation information (i.e. keyframes/motion data), that
547 * affects a group of related settings (as defined by the user).
549 typedef struct bAction {
550 ID id; /* ID-serialisation for relinking */
552 ListBase curves; /* function-curves (FCurve) */
553 ListBase chanbase DNA_DEPRECATED; /* legacy data - Action Channels (bActionChannel) in pre-2.5 animation system */
554 ListBase groups; /* groups of function-curves (bActionGroup) */
555 ListBase markers; /* markers local to the Action (used to provide Pose-Libraries) */
557 int flag; /* settings for this action */
558 int active_marker; /* index of the active marker */
560 int idroot; /* type of ID-blocks that action can be assigned to (if 0, will be set to whatever ID first evaluates it) */
565 /* Flags for the action */
566 typedef enum eAction_Flags {
567 /* flags for displaying in UI */
568 ACT_COLLAPSED = (1 << 0),
569 ACT_SELECTED = (1 << 1),
571 /* flags for evaluation/editing */
572 ACT_MUTED = (1 << 9),
573 ACT_PROTECTED = (1 << 10),
574 ACT_DISABLED = (1 << 11)
578 /* ************************************************ */
579 /* Action/Dopesheet Editor */
581 /* Storage for Dopesheet/Grease-Pencil Editor data */
582 typedef struct bDopeSheet {
583 ID *source; /* currently ID_SCE (for Dopesheet), and ID_SC (for Grease Pencil) */
584 ListBase chanbase; /* cache for channels (only initialized when pinned) */ // XXX not used!
586 struct Group *filter_grp; /* object group for ADS_FILTER_ONLYOBGROUP filtering option */
587 char searchstr[64]; /* string to search for in displayed names of F-Curves for ADS_FILTER_BY_FCU_NAME filtering option */
589 int filterflag; /* flags to use for filtering data */
590 int flag; /* standard flags */
592 int renameIndex; /* index+1 of channel to rename - only gets set by renaming operator */
597 /* DopeSheet filter-flag */
598 typedef enum eDopeSheet_FilterFlag {
599 /* general filtering */
600 ADS_FILTER_ONLYSEL = (1 << 0), /* only include channels relating to selected data */
602 /* temporary filters */
603 ADS_FILTER_ONLYDRIVERS = (1 << 1), /* for 'Drivers' editor - only include Driver data from AnimData */
604 ADS_FILTER_ONLYNLA = (1 << 2), /* for 'NLA' editor - only include NLA data from AnimData */
605 ADS_FILTER_SELEDIT = (1 << 3), /* for Graph Editor - used to indicate whether to include a filtering flag or not */
607 /* general filtering */
608 ADS_FILTER_SUMMARY = (1 << 4), /* for 'DopeSheet' Editors - include 'summary' line */
609 ADS_FILTER_ONLYOBGROUP = (1 << 5), /* only the objects in the specified object group get used */
611 /* datatype-based filtering */
612 ADS_FILTER_NOSHAPEKEYS = (1 << 6),
613 ADS_FILTER_NOMESH = (1 << 7),
614 ADS_FILTER_NOOBJ = (1 << 8), /* for animdata on object level, if we only want to concentrate on materials/etc. */
615 ADS_FILTER_NOLAT = (1 << 9),
616 ADS_FILTER_NOCAM = (1 << 10),
617 ADS_FILTER_NOMAT = (1 << 11),
618 ADS_FILTER_NOLAM = (1 << 12),
619 ADS_FILTER_NOCUR = (1 << 13),
620 ADS_FILTER_NOWOR = (1 << 14),
621 ADS_FILTER_NOSCE = (1 << 15),
622 ADS_FILTER_NOPART = (1 << 16),
623 ADS_FILTER_NOMBA = (1 << 17),
624 ADS_FILTER_NOARM = (1 << 18),
625 ADS_FILTER_NONTREE = (1 << 19),
626 ADS_FILTER_NOTEX = (1 << 20),
627 ADS_FILTER_NOSPK = (1 << 21),
628 ADS_FILTER_NOLINESTYLE = (1 << 22),
629 ADS_FILTER_NOMODIFIERS = (1 << 23),
630 ADS_FILTER_NOGPENCIL = (1 << 24),
631 /* NOTE: all new datablock filters will have to go in filterflag2 (see below) */
633 /* NLA-specific filters */
634 ADS_FILTER_NLA_NOACT = (1 << 25), /* if the AnimData block has no NLA data, don't include to just show Action-line */
636 /* general filtering 3 */
637 ADS_FILTER_INCL_HIDDEN = (1 << 26), /* include 'hidden' channels too (i.e. those from hidden Objects/Bones) */
638 ADS_FILTER_BY_FCU_NAME = (1 << 27), /* for F-Curves, filter by the displayed name (i.e. to isolate all Location curves only) */
639 ADS_FILTER_ONLY_ERRORS = (1 << 28), /* show only F-Curves which are disabled/have errors - for debugging drivers */
642 ADS_FILTER_GP_3DONLY = (1 << 29), /* GP Mode - Only show datablocks used in the scene */
644 /* combination filters (some only used at runtime) */
645 ADS_FILTER_NOOBDATA = (ADS_FILTER_NOCAM | ADS_FILTER_NOMAT | ADS_FILTER_NOLAM | ADS_FILTER_NOCUR | ADS_FILTER_NOPART | ADS_FILTER_NOARM | ADS_FILTER_NOSPK | ADS_FILTER_NOMODIFIERS)
646 } eDopeSheet_FilterFlag;
648 /* DopeSheet general flags */
649 typedef enum eDopeSheet_Flag {
650 ADS_FLAG_SUMMARY_COLLAPSED = (1 << 0), /* when summary is shown, it is collapsed, so all other channels get hidden */
651 ADS_FLAG_SHOW_DBFILTERS = (1 << 1), /* show filters for datablocks */
653 ADS_FLAG_FUZZY_NAMES = (1 << 2), /* use fuzzy/partial string matches when ADS_FILTER_BY_FCU_NAME is enabled (WARNING: expensive operation) */
654 ADS_FLAG_NO_DB_SORT = (1 << 3), /* do not sort datablocks (mostly objects) by name (NOTE: potentially expensive operation) */
656 /* NOTE: datablock filter flags continued (1 << 10) onwards... */
661 /* Action Editor Space. This is defined here instead of in DNA_space_types.h */
662 typedef struct SpaceAction {
663 struct SpaceLink *next, *prev;
664 ListBase regionbase; /* storage of regions for inactive spaces */
668 short blockhandler[8];
670 View2D v2d DNA_DEPRECATED; /* copied to region */
672 bAction *action; /* the currently active action */
673 bDopeSheet ads; /* the currently active context (when not showing action) */
675 char mode, autosnap; /* mode: editing context; autosnap: automatic keyframe snapping mode */
676 short flag; /* flag: bitmapped settings; */
677 float timeslide; /* for Time-Slide transform mode drawing - current frame? */
680 /* SpaceAction flag */
681 typedef enum eSAction_Flag {
682 /* during transform (only set for TimeSlide) */
683 SACTION_MOVING = (1 << 0),
685 SACTION_SLIDERS = (1 << 1),
686 /* draw time in seconds instead of time in frames */
687 SACTION_DRAWTIME = (1 << 2),
688 /* don't filter action channels according to visibility */
689 //SACTION_NOHIDE = (1<<3), // XXX deprecated... old animation system
690 /* don't kill overlapping keyframes after transform */
691 SACTION_NOTRANSKEYCULL = (1 << 4),
692 /* don't include keyframes that are out of view */
693 //SACTION_HORIZOPTIMISEON = (1<<5), // XXX deprecated... old irrelevant trick
694 /* show pose-markers (local to action) in Action Editor mode */
695 SACTION_POSEMARKERS_SHOW = (1 << 6),
696 /* don't draw action channels using group colors (where applicable) */
697 SACTION_NODRAWGCOLORS = (1 << 7),
698 /* don't draw current frame number beside frame indicator */
699 SACTION_NODRAWCFRANUM = (1 << 8),
700 /* temporary flag to force channel selections to be synced with main */
701 SACTION_TEMP_NEEDCHANSYNC = (1 << 9),
702 /* don't perform realtime updates */
703 SACTION_NOREALTIMEUPDATES = (1 << 10),
704 /* move markers as well as keyframes */
705 SACTION_MARKERS_MOVE = (1 << 11)
708 /* SpaceAction Mode Settings */
709 typedef enum eAnimEdit_Context {
710 /* action on the active object */
712 /* list of all shapekeys on the active object, linked with their F-Curves */
713 SACTCONT_SHAPEKEY = 1,
714 /* editing of gpencil data */
715 SACTCONT_GPENCIL = 2,
716 /* dopesheet (default) */
717 SACTCONT_DOPESHEET = 3,
721 SACTCONT_CACHEFILE = 5,
724 /* SpaceAction AutoSnap Settings (also used by other Animation Editors) */
725 typedef enum eAnimEdit_AutoSnap {
728 /* snap to 1.0 frame/second intervals */
730 /* snap to actual frames/seconds (nla-action time) */
732 /* snap to nearest marker */
734 /* snap to actual seconds (nla-action time) */
736 /* snap to 1.0 second increments */
738 } eAnimEdit_AutoSnap;
741 /* ************************************************ */
744 /* WARNING: Action Channels are now deprecated... they were part of the old animation system!
745 * (ONLY USED FOR DO_VERSIONS...)
747 * Action Channels belong to Actions. They are linked with an IPO block, and can also own
748 * Constraint Channels in certain situations.
750 * Action-Channels can only belong to one group at a time, but they still live the Action's
751 * list of achans (to preserve backwards compatibility, and also minimize the code
752 * that would need to be recoded). Grouped achans are stored at the start of the list, according
753 * to the position of the group in the list, and their position within the group.
755 typedef struct bActionChannel {
756 struct bActionChannel *next, *prev;
757 bActionGroup *grp; /* Action Group this Action Channel belongs to */
759 struct Ipo *ipo; /* IPO block this action channel references */
760 ListBase constraintChannels; /* Constraint Channels (when Action Channel represents an Object or Bone) */
762 int flag; /* settings accessed via bitmapping */
763 char name[64]; /* channel name, MAX_NAME */
764 int temp; /* temporary setting - may be used to indicate group that channel belongs to during syncing */
767 /* Action Channel flags (ONLY USED FOR DO_VERSIONS...) */
768 typedef enum ACHAN_FLAG {
769 ACHAN_SELECTED = (1 << 0),
770 ACHAN_HIGHLIGHTED = (1 << 1),
771 ACHAN_HIDDEN = (1 << 2),
772 ACHAN_PROTECTED = (1 << 3),
773 ACHAN_EXPANDED = (1 << 4),
774 ACHAN_SHOWIPO = (1 << 5),
775 ACHAN_SHOWCONS = (1 << 6),
776 ACHAN_MOVED = (1 << 31)
779 #endif /* __DNA_ACTION_TYPES_H__ */