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:
authorJoshua Leung <aligorith@gmail.com>2009-04-15 05:10:36 +0400
committerJoshua Leung <aligorith@gmail.com>2009-04-15 05:10:36 +0400
commit2dbf73f6a032ab44539cfd8c05f5743fbaf33902 (patch)
tree2a3093dfa8b561213db1c58bf2583cb05f6b2ed5 /source/blender/editors/animation/keyframes_edit.c
parent5b3d7bfdf6305e880f89d58cbe852a8d2ba7b241 (diff)
2.5 PoseLib - First steps to get PoseLib to work in 2.5
* Cleaned up Keyframing API to get eliminate some of the problems faced during the original implementation of PoseLib, thus reducing code redundancy. * Added new Animato evaluation functions specifically for use by PoseLib. * Replaced parts of PoseLib code which relied on old animation system to the equivalent code for Animato. Notice the much cleaner + saner + compact code! Next step is to operatorfy the PoseLib tools (while maintaining possibility for an API to some things) :)
Diffstat (limited to 'source/blender/editors/animation/keyframes_edit.c')
-rw-r--r--source/blender/editors/animation/keyframes_edit.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/source/blender/editors/animation/keyframes_edit.c b/source/blender/editors/animation/keyframes_edit.c
index 8b83022507d..bef44448829 100644
--- a/source/blender/editors/animation/keyframes_edit.c
+++ b/source/blender/editors/animation/keyframes_edit.c
@@ -239,6 +239,36 @@ short ANIM_animchannel_keys_bezier_loop(BeztEditData *bed, bAnimListElem *ale, B
return 0;
}
+/* This function is used to apply operation to all keyframes, regardless of the type without needed an AnimListElem wrapper */
+short ANIM_animchanneldata_keys_bezier_loop(BeztEditData *bed, void *data, int keytype, BeztEditFunc bezt_ok, BeztEditFunc bezt_cb, FcuEditFunc fcu_cb, int filterflag)
+{
+ /* sanity checks */
+ if (data == NULL)
+ return 0;
+
+ /* method to use depends on the type of keyframe data */
+ switch (keytype) {
+ /* direct keyframe data (these loops are exposed) */
+ case ALE_FCURVE: /* F-Curve */
+ return ANIM_fcurve_keys_bezier_loop(bed, data, bezt_ok, bezt_cb, fcu_cb);
+
+ /* indirect 'summaries' (these are not exposed directly)
+ * NOTE: must keep this code in sync with the drawing code and also the filtering code!
+ */
+ case ALE_GROUP: /* action group */
+ return agrp_keys_bezier_loop(bed, (bActionGroup *)data, bezt_ok, bezt_cb, fcu_cb);
+ case ALE_ACT: /* action */
+ return act_keys_bezier_loop(bed, (bAction *)data, bezt_ok, bezt_cb, fcu_cb);
+
+ case ALE_OB: /* object */
+ return ob_keys_bezier_loop(bed, (Object *)data, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ case ALE_SCE: /* scene */
+ return scene_keys_bezier_loop(bed, (Scene *)data, bezt_ok, bezt_cb, fcu_cb, filterflag);
+ }
+
+ return 0;
+}
+
/* ************************************************************************** */
/* Keyframe Integrity Tools */