diff options
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_edit.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframes_edit.h | 59 |
1 files changed, 35 insertions, 24 deletions
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index c6ef303b694..fae3e3677a0 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -82,7 +82,8 @@ typedef enum eEditKeyframes_Snap { SNAP_KEYS_NEARSEC, SNAP_KEYS_NEARMARKER, SNAP_KEYS_HORIZONTAL, - SNAP_KEYS_VALUE + SNAP_KEYS_VALUE, + SNAP_KEYS_TIME, } eEditKeyframes_Snap; /* mirroring tools */ @@ -91,7 +92,8 @@ typedef enum eEditKeyframes_Mirror { MIRROR_KEYS_YAXIS, MIRROR_KEYS_XAXIS, MIRROR_KEYS_MARKER, - MIRROR_KEYS_VALUE + MIRROR_KEYS_VALUE, + MIRROR_KEYS_TIME, } eEditKeyframes_Mirror; /* use with BEZT_OK_REGION_LASSO */ @@ -114,6 +116,34 @@ struct KeyframeEdit_CircleData { /* ************************************************ */ /* Non-Destuctive Editing API (keyframes_edit.c) */ +/* --- Defines for 'OK' polls + KeyframeEditData Flags --------- */ + +/* which verts of a keyframe is active (after polling) */ +typedef enum eKeyframeVertOk { + /* 'key' itself is ok */ + KEYFRAME_OK_KEY = (1 << 0), + /* 'handle 1' is ok */ + KEYFRAME_OK_H1 = (1 << 1), + /* 'handle 2' is ok */ + KEYFRAME_OK_H2 = (1 << 2), + /* all flags */ + KEYFRAME_OK_ALL = (KEYFRAME_OK_KEY | KEYFRAME_OK_H1 | KEYFRAME_OK_H2) +} eKeyframeVertOk; + +/* Flags for use during iteration */ +typedef enum eKeyframeIterFlags { + /* consider handles in addition to key itself */ + KEYFRAME_ITER_INCL_HANDLES = (1 << 0), + + /* Perform NLA time remapping (global -> strip) for the "f1" parameter + * (e.g. used for selection tools on summary tracks) + */ + KED_F1_NLA_UNMAP = (1 << 1), + + /* Perform NLA time remapping (global -> strip) for the "f2" parameter */ + KED_F2_NLA_UNMAP = (1 << 2), +} eKeyframeIterFlags; + /* --- Generic Properties for Keyframe Edit Tools ----- */ typedef struct KeyframeEditData { @@ -129,8 +159,8 @@ typedef struct KeyframeEditData { int curIndex; /* index of current keyframe being iterated over */ /* flags */ - short curflags; /* current flags for the keyframe we're reached in the iteration process */ - short iterflags; /* settings for iteration process */ // XXX: unused... + eKeyframeVertOk curflags; /* current flags for the keyframe we're reached in the iteration process */ + eKeyframeIterFlags iterflags; /* settings for iteration process */ } KeyframeEditData; /* ------- Function Pointer Typedefs ---------------- */ @@ -140,25 +170,6 @@ typedef void (*FcuEditFunc)(struct FCurve *fcu); /* callback function that operates on the given BezTriple */ typedef short (*KeyframeEditFunc)(KeyframeEditData *ked, struct BezTriple *bezt); -/* ---------- Defines for 'OK' polls ----------------- */ - -/* which verts of a keyframe is active (after polling) */ -typedef enum eKeyframeVertOk { - /* 'key' itself is ok */ - KEYFRAME_OK_KEY = (1 << 0), - /* 'handle 1' is ok */ - KEYFRAME_OK_H1 = (1 << 1), - /* 'handle 2' is ok */ - KEYFRAME_OK_H2 = (1 << 2), - /* all flags */ - KEYFRAME_OK_ALL = (KEYFRAME_OK_KEY | KEYFRAME_OK_H1 | KEYFRAME_OK_H2) -} eKeyframeVertOk; - -/* Flags for use during iteration */ -typedef enum eKeyframeIterFlags { - /* consider handles in addition to key itself */ - KEYFRAME_ITER_INCL_HANDLES = (1 << 0), -} eKeyframeIterFlags; /* ------- Custom Data Type Defines ------------------ */ @@ -261,7 +272,7 @@ void sample_fcurve(struct FCurve *fcu); /* ----------- */ -void free_anim_copybuf(void); +void ANIM_fcurves_copybuf_free(void); short copy_animedit_keys(struct bAnimContext *ac, ListBase *anim_data); short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data, const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode, bool flip); |