diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-13 00:39:39 +0400 |
commit | 9892736206676c5b7fabc8d1184f9655511ff2dd (patch) | |
tree | 83562ac50c93fe3004959d35c1af4a5b380fdd97 /source/blender/editors/include/ED_keyframes_edit.h | |
parent | cffaa42d3a34c6b310c3c87c98e1f8313881e473 (diff) |
code cleanup: header cleanup and remove some duplicate defines.
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_edit.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframes_edit.h | 114 |
1 files changed, 57 insertions, 57 deletions
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 7ba37b49f85..bdb70696742 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -43,15 +43,15 @@ struct Scene; /* --------- BezTriple Selection ------------- */ -#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } -#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } -#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; } +#define BEZ_SEL(bezt) { (bezt)->f1 |= SELECT; (bezt)->f2 |= SELECT; (bezt)->f3 |= SELECT; } +#define BEZ_DESEL(bezt) { (bezt)->f1 &= ~SELECT; (bezt)->f2 &= ~SELECT; (bezt)->f3 &= ~SELECT; } +#define BEZ_INVSEL(bezt) { (bezt)->f1 ^= SELECT; (bezt)->f2 ^= SELECT; (bezt)->f3 ^= SELECT; } /* --------- Tool Flags ------------ */ /* bezt validation */ typedef enum eEditKeyframes_Validate { - BEZT_OK_FRAME = 1, + BEZT_OK_FRAME = 1, BEZT_OK_FRAMERANGE, BEZT_OK_SELECTED, BEZT_OK_VALUE, @@ -63,19 +63,19 @@ typedef enum eEditKeyframes_Validate { /* select modes */ typedef enum eEditKeyframes_Select { - /* SELECT_SUBTRACT for all, followed by SELECT_ADD for some */ - SELECT_REPLACE = (1<<0), - /* add ok keyframes to selection */ - SELECT_ADD = (1<<1), - /* remove ok keyframes from selection */ - SELECT_SUBTRACT = (1<<2), - /* flip ok status of keyframes based on key status */ - SELECT_INVERT = (1<<3) + /* SELECT_SUBTRACT for all, followed by SELECT_ADD for some */ + SELECT_REPLACE = (1 << 0), + /* add ok keyframes to selection */ + SELECT_ADD = (1 << 1), + /* remove ok keyframes from selection */ + SELECT_SUBTRACT = (1 << 2), + /* flip ok status of keyframes based on key status */ + SELECT_INVERT = (1 << 3) } eEditKeyframes_Select; /* "selection map" building modes */ typedef enum eEditKeyframes_SelMap { - SELMAP_MORE = 0, + SELMAP_MORE = 0, SELMAP_LESS } eEditKeyframes_SelMap; @@ -104,92 +104,92 @@ typedef enum eEditKeyframes_Mirror { /* --- Generic Properties for Keyframe Edit Tools ----- */ typedef struct KeyframeEditData { - /* generic properties/data access */ - ListBase list; /* temp list for storing custom list of data to check */ - struct Scene *scene; /* pointer to current scene - many tools need access to cfra/etc. */ - void *data; /* pointer to custom data - usually 'Object' but also 'rectf', but could be other types too */ - float f1, f2; /* storage of times/values as 'decimals' */ - int i1, i2; /* storage of times/values/flags as 'whole' numbers */ - - /* current iteration data */ - struct FCurve *fcu; /* F-Curve that is being iterated over */ - 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... + /* generic properties/data access */ + ListBase list; /* temp list for storing custom list of data to check */ + struct Scene *scene; /* pointer to current scene - many tools need access to cfra/etc. */ + void *data; /* pointer to custom data - usually 'Object' but also 'rectf', but could be other types too */ + float f1, f2; /* storage of times/values as 'decimals' */ + int i1, i2; /* storage of times/values/flags as 'whole' numbers */ + + /* current iteration data */ + struct FCurve *fcu; /* F-Curve that is being iterated over */ + 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... } KeyframeEditData; /* ------- Function Pointer Typedefs ---------------- */ - /* callback function that refreshes the F-Curve after use */ +/* callback function that refreshes the F-Curve after use */ typedef void (*FcuEditFunc)(struct FCurve *fcu); - /* callback function that operates on the given BezTriple */ +/* 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) + /* '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), + /* consider handles in addition to key itself */ + KEYFRAME_ITER_INCL_HANDLES = (1 << 0), } eKeyframeIterFlags; /* ------- Custom Data Type Defines ------------------ */ /* Custom data for remapping one range to another in a fixed way */ typedef struct KeyframeEditCD_Remap { - float oldMin, oldMax; /* old range */ - float newMin, newMax; /* new range */ + float oldMin, oldMax; /* old range */ + float newMin, newMax; /* new range */ } KeyframeEditCD_Remap; /* Paste options */ typedef enum eKeyPasteOffset { - /* paste keys starting at current frame */ + /* paste keys starting at current frame */ KEYFRAME_PASTE_OFFSET_CFRA_START, - /* paste keys ending at current frame */ + /* paste keys ending at current frame */ KEYFRAME_PASTE_OFFSET_CFRA_END, - /* paste keys relative to the current frame when copying */ + /* paste keys relative to the current frame when copying */ KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE, - /* paste keys from original time */ + /* paste keys from original time */ KEYFRAME_PASTE_OFFSET_NONE } eKeyPasteOffset; typedef enum eKeyMergeMode { - /* overlay existing with new keys */ + /* overlay existing with new keys */ KEYFRAME_PASTE_MERGE_MIX, - /* replace entire fcurve */ + /* replace entire fcurve */ KEYFRAME_PASTE_MERGE_OVER, - /* overwrite keys in pasted range */ + /* overwrite keys in pasted range */ KEYFRAME_PASTE_MERGE_OVER_RANGE, - /* overwrite keys in pasted range (use all keyframe start & end for range) */ + /* overwrite keys in pasted range (use all keyframe start & end for range) */ KEYFRAME_PASTE_MERGE_OVER_RANGE_ALL } eKeyMergeMode; /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ - /* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ +/* function for working with F-Curve data only (i.e. when filters have been chosen to explicitly use this) */ short ANIM_fcurve_keyframes_loop(KeyframeEditData *ked, struct FCurve *fcu, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); - /* function for working with any type (i.e. one of the known types) of animation channel - * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) - */ +/* function for working with any type (i.e. one of the known types) of animation channel + * - filterflag is bDopeSheet->flag (DOPESHEET_FILTERFLAG) + */ short ANIM_animchannel_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, struct bAnimListElem *ale, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); - /* same as above, except bAnimListElem wrapper is not needed... - * - keytype is eAnim_KeyType - */ +/* same as above, except bAnimListElem wrapper is not needed... + * - keytype is eAnim_KeyType + */ short ANIM_animchanneldata_keyframes_loop(KeyframeEditData *ked, struct bDopeSheet *ads, void *data, int keytype, KeyframeEditFunc key_ok, KeyframeEditFunc key_cb, FcuEditFunc fcu_cb); /* functions for making sure all keyframes are in good order */ @@ -250,7 +250,7 @@ void sample_fcurve(struct FCurve *fcu); void free_anim_copybuf(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); + const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode); /* ************************************************ */ |