diff options
author | Joshua Leung <aligorith@gmail.com> | 2011-06-30 17:56:47 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2011-06-30 17:56:47 +0400 |
commit | a6270b0204b2a9424eaa51d475aa761d77f43a69 (patch) | |
tree | 92467389c658f50240228583f4d708a68467a243 /source/blender/editors/include/ED_anim_api.h | |
parent | 2a85eff40cba602cb07aeb43c1af672ce2945bbb (diff) |
Animation Channels Filtering Refactor - Part 5
Channels can now be used as "animation containers" to be filtered
further to obtain a set of subsidiary channels (i.e. F-Curves
associated with some summary channel).
The main use of this is that object and scene summary channels can now
be defined without defining the filtering logic in three different
places - once for channel filtering, once for drawing keyframes in
action editor, and once for editing these keyframes.
An indirect consequence of this, is that the "Only selected channels"
option in Timeline will now result in only the keyframes for a
selected bones getting shown (when enabled), instead of all keyframes
for the active object. This was requested by Lee during Durian, and is
something which has only become possible as a result of this commit.
Diffstat (limited to 'source/blender/editors/include/ED_anim_api.h')
-rw-r--r-- | source/blender/editors/include/ED_anim_api.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index c149102a6a7..8454f058238 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -77,6 +77,8 @@ typedef struct bAnimContext { struct SpaceLink *sl; /* editor data */ struct ARegion *ar; /* region within editor */ + struct bDopeSheet *ads; /* dopesheet data for editor (or which is being used) */ + struct Scene *scene; /* active scene */ struct Object *obact; /* active object */ ListBase *markers; /* active set of markers */ @@ -85,7 +87,6 @@ typedef struct bAnimContext { } bAnimContext; /* Main Data container types */ -// XXX was ACTCONT_* typedef enum eAnimCont_Types { ANIMCONT_NONE = 0, /* invalid or no data */ ANIMCONT_ACTION, /* action (bAction) */ @@ -94,7 +95,8 @@ typedef enum eAnimCont_Types { ANIMCONT_DOPESHEET, /* dopesheet (bDopesheet) */ ANIMCONT_FCURVES, /* animation F-Curves (bDopesheet) */ ANIMCONT_DRIVERS, /* drivers (bDopesheet) */ - ANIMCONT_NLA /* nla (bDopesheet) */ + ANIMCONT_NLA, /* nla (bDopesheet) */ + ANIMCONT_CHANNEL /* animation channel (bAnimListElem) */ } eAnimCont_Types; /* --------------- Channels -------------------- */ @@ -256,8 +258,8 @@ typedef enum eAnimFilter_Flags { /* Action Channel Group */ #define EDITABLE_AGRP(agrp) ((agrp->flag & AGRP_PROTECTED)==0) #define EXPANDED_AGRP(ac, agrp) \ - ( ( ((ac)->spacetype == SPACE_IPO) && (agrp->flag & AGRP_EXPANDED_G) ) || \ - ( ((ac)->spacetype != SPACE_IPO) && (agrp->flag & AGRP_EXPANDED) ) ) + ( ((!(ac) || ((ac)->spacetype != SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED)) || \ + (( (ac) && ((ac)->spacetype == SPACE_IPO)) && (agrp->flag & AGRP_EXPANDED_G)) ) #define SEL_AGRP(agrp) ((agrp->flag & AGRP_SELECTED) || (agrp->flag & AGRP_ACTIVE)) /* F-Curve Channels */ #define EDITABLE_FCU(fcu) ((fcu->flag & FCURVE_PROTECTED)==0) |