diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-03-01 14:27:31 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-03-01 14:27:31 +0300 |
commit | d9c9108a6e62894d6ab696235af9a0af25693c76 (patch) | |
tree | 1261d026d7e7f873bea23d449d7fe9523805a366 /source/blender/blenkernel/BKE_fcurve.h | |
parent | db472a3d14f81086ea1b472d4da6dded0879d84c (diff) |
Graph Editor: Added operator to 'bake' keyframe-based F-Curves to be composed of samples.
This operator can be activated using the 'Alt-C' hotkey for now, and operates on selected + editable F-Curves. This is currently still highly experimental, and does crash
I've implemented this as a way to test out the FPoints/samples code, which will be used to provide better support of the dense F-Curves which result from importing Mocap/BVH data. These should use considerably less memory + have a few additional benefits over keyframes when they're working in a stable fashion.
Diffstat (limited to 'source/blender/blenkernel/BKE_fcurve.h')
-rw-r--r-- | source/blender/blenkernel/BKE_fcurve.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_fcurve.h b/source/blender/blenkernel/BKE_fcurve.h index dd5e0dd6e21..a8b1ad49648 100644 --- a/source/blender/blenkernel/BKE_fcurve.h +++ b/source/blender/blenkernel/BKE_fcurve.h @@ -108,5 +108,26 @@ float evaluate_fcurve(struct FCurve *fcu, float evaltime); /* evaluate fcurve and store value */ void calculate_fcurve(struct FCurve *fcu, float ctime); +/* ************* F-Curve Samples API ******************** */ + +/* -------- Defines -------- */ + +/* Basic signature for F-Curve sample-creation function + * - fcu: the F-Curve being operated on + * - data: pointer to some specific data that may be used by one of the callbacks + */ +typedef float (*FcuSampleFunc)(struct FCurve *fcu, void *data, float evaltime); + +/* ----- Sampling Callbacks ------ */ + +/* Basic sampling callback which acts as a wrapper for evaluate_fcurve() */ +float fcurve_samplingcb_evalcurve(struct FCurve *fcu, void *data, float evaltime); + +/* -------- Main Methods -------- */ + +/* Main API function for creating a set of sampled curve data, given some callback function + * used to retrieve the values to store. + */ +void fcurve_store_samples(struct FCurve *fcu, void *data, int start, int end, FcuSampleFunc sample_cb); #endif /* BKE_FCURVE_H*/ |