diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-09-30 15:56:39 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-09-30 15:56:39 +0400 |
commit | d6ee8a0e4d10f3a5479ce2c94b403b2f59e5c523 (patch) | |
tree | bd4e5243141f2c7c335a97aee1b23b7e1329f14d /source/blender/editors/armature/poselib.c | |
parent | e8465555cb18aa2d337accf5eb13e1d270af3424 (diff) |
Cleanup of Auto-Keyframing code:
Moved duplicated code out to a special new function so that this doesn't need to be copied all over for each transform op that needs this.
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index 5ead0d42cd2..6083616044e 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -773,21 +773,9 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData if (pchan) { if (autokeyframe_cfra_can_key(scene, &pld->ob->id)) { ListBase dsources = {NULL, NULL}; - KeyingSet *ks = NULL; - /* get KeyingSet to use - * - use the active KeyingSet if defined (and user wants to use it for all autokeying), - * or otherwise key transforms only - */ - if (poselib_ks_locrotscale == NULL) - poselib_ks_locrotscale= ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); - - if (IS_AUTOKEY_FLAG(ONLYKEYINGSET) && (scene->active_keyingset)) - ks = ANIM_scene_get_active_keyingset(scene); - else if (IS_AUTOKEY_FLAG(INSERTAVAIL)) - ks = ANIM_builtin_keyingset_get_named(NULL, "Available"); - else - ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); + /* get KeyingSet to use */ + KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, "LocRotScale"); /* now insert the keyframe(s) using the Keying Set * 1) add datasource override for the PoseChannel |