diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-12-22 13:14:13 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-12-22 13:14:13 +0300 |
commit | 5a3ac3ceeb0d3550c14987f5cfd607e1ad126e64 (patch) | |
tree | a8745cb5bf1ad23a1702993f964a96ddf64092a3 /source/blender/editors/include/ED_keyframes_edit.h | |
parent | e207d045322db4656f42f68ae9fa092ac1478635 (diff) |
Assorted F-Curve/Keyframe API stuff (for use with some Sequencer editing):
* Added function for F-Curves to find the F-Curves in a given list which affect some named data, such as bones, nodes, or sequence strips.
* Added a BezTriple offsetting callback to be used with the F-Curve+Keyframe loopers in use for many of the keyframe editing tools.
Diffstat (limited to 'source/blender/editors/include/ED_keyframes_edit.h')
-rw-r--r-- | source/blender/editors/include/ED_keyframes_edit.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/editors/include/ED_keyframes_edit.h b/source/blender/editors/include/ED_keyframes_edit.h index 4a0a3ee24db..26290d8771c 100644 --- a/source/blender/editors/include/ED_keyframes_edit.h +++ b/source/blender/editors/include/ED_keyframes_edit.h @@ -100,11 +100,19 @@ typedef struct BeztEditData { /* ------- Function Pointer Typedefs ---------------- */ - /* callback function that refreshes the IPO 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 */ typedef short (*BeztEditFunc)(BeztEditData *bed, struct BezTriple *bezt); +/* ------- Custom Data Type Defines ------------------ */ + +/* Custom data for remapping one range to another in a fixed way */ +typedef struct BeztEditCD_Remap { + float oldMin, oldMax; /* old range */ + float newMin, newMax; /* new range */ +} BeztEditCD_Remap; + /* ---------------- Looping API --------------------- */ /* functions for looping over keyframes */ @@ -137,9 +145,17 @@ BeztEditFunc ANIM_editkeyframes_keytype(short mode); /* ----------- BezTriple Callback (Assorted Utilities) ---------- */ +/* used to calculate the the average location of all relevant BezTriples by summing their locations */ short bezt_calc_average(BeztEditData *bed, struct BezTriple *bezt); + +/* used to extract a set of cfra-elems from the keyframes */ short bezt_to_cfraelem(BeztEditData *bed, struct BezTriple *bezt); +/* used to remap times from one range to another + * requires: bed->custom = BeztEditCD_Remap + */ +short bezt_remap_times(BeztEditData *bed, struct BezTriple *bezt); + /* ************************************************ */ /* Destructive Editing API (keyframes_general.c) */ |