From 618b459e8b3630eea747523febec666889a364f7 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Thu, 18 Mar 2010 13:04:46 +0000 Subject: F-Modifier Goodies (as requested by @ndy): * Copy/Paste operators for F-Modifiers Available in Graph and NLA Editors. Use the Copy/Paste buttons beside the 'Add Modifier' buttons. Copy copies all the modifiers of the ACTIVE F-Curve or Strip depending on the editor. Paste pastes modifiers from the buffer to all the selected F-Curves or Strips, adding the new modifiers to the ends of each list. * 'Stepped Interpolation' F-Modifier This modifier holds each interpolated value from the F-Curve for several frames without changing the timing. This allows to preview motions 'on-twos' for example without altering the timing, or having to go through setting heaps of keyframes. In this case, Andy wanted to use this for CG <-> StopMo. --- source/blender/editors/include/ED_anim_api.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'source/blender/editors/include/ED_anim_api.h') diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h index 2f089a41a3f..3892770c1f4 100644 --- a/source/blender/editors/include/ED_anim_api.h +++ b/source/blender/editors/include/ED_anim_api.h @@ -452,9 +452,28 @@ void ANIM_draw_previewrange(const struct bContext *C, struct View2D *v2d); /* ************************************************* */ /* F-MODIFIER TOOLS */ +/* ------------- UI Panel Drawing -------------- */ + /* draw a given F-Modifier for some layout/UI-Block */ void ANIM_uiTemplate_fmodifier_draw(struct uiLayout *layout, struct ID *id, ListBase *modifiers, struct FModifier *fcm); +/* ------------- Copy/Paste Buffer -------------- */ + + +/* free the copy/paste buffer */ +void free_fmodifiers_copybuf(void); + +/* copy the given F-Modifiers to the buffer, returning whether anything was copied or not + * assuming that the buffer has been cleared already with free_fmodifiers_copybuf() + * - active: only copy the active modifier + */ +short ANIM_fmodifiers_copy_to_buf(ListBase *modifiers, short active); + +/* 'Paste' the F-Modifier(s) from the buffer to the specified list + * - replace: free all the existing modifiers to leave only the pasted ones + */ +short ANIM_fmodifiers_paste_from_buf(ListBase *modifiers, short replace); + /* ************************************************* */ /* ASSORTED TOOLS */ -- cgit v1.2.3