diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-10-02 12:39:30 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-10-02 12:39:30 +0400 |
commit | f66ae0dacac7fa1b65253725f48414a7378b559f (patch) | |
tree | 2deb2b853bcaf13c0e9c905e6c68f4289baaa88c /source/blender/include | |
parent | 7e704c8c03fb2ce44ec18e476151966cf034ef0d (diff) |
Keyframe Checking (i.e. does given frame have a keyframe) is now implemented in the keyframing api.
Replaced the method used in to check if there's a keyframe on the current frame, when drawing the active object name / frame number info with this new code.
- It should in theory be faster than the previous code, as it doesn't have to build an entire list everytime of all keyframes, and also uses more efficient search method.
- Added some settings to control what sources of animation data are used (per 3d-view). Can be found in the View Properties panel.
This should be stable... release builders should ignore this commit for now (to avoid having differences between release candidates).
Diffstat (limited to 'source/blender/include')
-rw-r--r-- | source/blender/include/BIF_keyframing.h | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/source/blender/include/BIF_keyframing.h b/source/blender/include/BIF_keyframing.h index 5d43a50efec..9f85e69b77f 100644 --- a/source/blender/include/BIF_keyframing.h +++ b/source/blender/include/BIF_keyframing.h @@ -65,7 +65,7 @@ enum { /* -------- */ /* Main Keyframing API calls: - * Use this to create any necessary animation data,, and then insert a keyframe + * Use this to create any necessary animation data, and then insert a keyframe * using the current value being keyframed, in the relevant place. Returns success. */ // TODO: adapt this for new data-api -> this blocktype, etc. stuff is evil! @@ -104,18 +104,28 @@ void common_deletekey(void); /* ************ Keyframe Checking ******************** */ -/* Checks whether a keyframe exists for the given ID-block one the given frame */ -short id_cfra_has_keyframe(struct ID *id, short filter); +/* Main Keyframe Checking API call: + * Checks whether a keyframe exists for the given ID-block one the given frame. + * - It is recommended to call this method over the other keyframe-checkers directly, + * in case some detail of the implementation changes... + * - frame: the value of this is quite often result of frame_to_float(CFRA) + */ +short id_frame_has_keyframe(struct ID *id, float frame, short filter); -/* filter flags fr id_cfra_has_keyframe */ +/* filter flags for id_cfra_has_keyframe + * + * WARNING: do not alter order of these, as also stored in files + * (for v3d->keyflags) + */ enum { /* general */ - ANIMFILTER_ALL = 0, /* include all available animation data */ ANIMFILTER_LOCAL = (1<<0), /* only include locally available anim data */ + ANIMFILTER_MUTED = (1<<1), /* include muted elements */ + ANIMFILTER_ACTIVE = (1<<2), /* only include active-subelements */ /* object specific */ - ANIMFILTER_MAT = (1<<1), /* include material keyframes too */ - ANIMFILTER_SKEY = (1<<2), /* shape keys (for geometry) */ + ANIMFILTER_NOMAT = (1<<9), /* don't include material keyframes */ + ANIMFILTER_NOSKEY = (1<<10), /* don't include shape keys (for geometry) */ } eAnimFilterFlags; #endif /* BIF_KEYFRAMING_H */ |