Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-12-14 18:14:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-12-14 18:14:16 +0300
commit78e7c6b329585a0dd6b4d07112d66e54c2a9d5f4 (patch)
tree845c67e5a03a7da21f11bcfcd66d874d52b97fed /source/blender/editors/include/ED_keyframes_edit.h
parent93cbc840e088ca0ecb62f96596d2f7c46e5635ee (diff)
graph editor & action keyframe paste options.
- Offset, so you can paste at the same time of the original frames, at the current frame or relative to the current frame at time of copying. - Merge method, so the pasted keys can overwrite keys in their range or the entire curve. Currently there is no redo panel for these space types so the only way to access these options is with F6 redo popup.
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_edit.h')
-rw-r--r--source/blender/editors/include/ED_keyframes_edit.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h
index 5ea9287a71e..2a7ce9b540b 100644
--- a/source/blender/editors/include/ED_keyframes_edit.h
+++ b/source/blender/editors/include/ED_keyframes_edit.h
@@ -152,6 +152,29 @@ typedef struct KeyframeEditCD_Remap {
float newMin, newMax; /* new range */
} KeyframeEditCD_Remap;
+/* Paste options */
+typedef enum eKeyPasteOffset {
+ /* paste keys starting at current frame */
+ KEYFRAME_PASTE_OFFSET_CFRA_START,
+ /* paste keys ending at current frame */
+ KEYFRAME_PASTE_OFFSET_CFRA_END,
+ /* paste keys relative to the current frame when copying */
+ KEYFRAME_PASTE_OFFSET_CFRA_RELATIVE,
+ /* paste keys from original time */
+ KEYFRAME_PASTE_OFFSET_NONE
+} eKeyPasteOffset;
+
+typedef enum eKeyMergeMode {
+ /* overlay existing with new keys */
+ KEYFRAME_PASTE_MERGE_MIX,
+ /* replace entire fcurve */
+ KEYFRAME_PASTE_MERGE_OVER,
+ /* overwrite keys in pasted range */
+ KEYFRAME_PASTE_MERGE_OVER_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 */
@@ -212,6 +235,7 @@ void bezt_remap_times(KeyframeEditData *ked, struct BezTriple *bezt);
void delete_fcurve_key(struct FCurve *fcu, int index, short do_recalc);
void delete_fcurve_keys(struct FCurve *fcu);
+void clear_fcurve_keys(struct FCurve *fcu);
void duplicate_fcurve_keys(struct FCurve *fcu);
void clean_fcurve(struct FCurve *fcu, float thresh);
@@ -222,7 +246,8 @@ 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);
+short paste_animedit_keys(struct bAnimContext *ac, ListBase *anim_data,
+ const eKeyPasteOffset offset_mode, const eKeyMergeMode merge_mode);
/* ************************************************ */