diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-18 06:03:19 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2010-04-18 06:03:19 +0400 |
commit | dfe2f8dc03267e041102837e92f547fb04881510 (patch) | |
tree | d9582c4667ce5b9e39e2adce40832aa4f44b4fe7 /source/blender/editors/armature/poselib.c | |
parent | d7e08f2d33207fdf76b1b597ef0de9dec26e3987 (diff) | |
parent | 00e46ef739cf2bfddb8805af056aa59fd3b3c71c (diff) |
Merged changes in the trunk up to revision 28247.
Diffstat (limited to 'source/blender/editors/armature/poselib.c')
-rw-r--r-- | source/blender/editors/armature/poselib.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/editors/armature/poselib.c b/source/blender/editors/armature/poselib.c index e2ceb534066..71033fbe3ec 100644 --- a/source/blender/editors/armature/poselib.c +++ b/source/blender/editors/armature/poselib.c @@ -769,12 +769,19 @@ 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 */ - // TODO: for getting the KeyingSet used, we should really check which channels were affected - // TODO: this should get modified so that custom props are taken into account too! + /* 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 + ks = ANIM_builtin_keyingset_get_named(NULL, "LocRotScale"); /* now insert the keyframe(s) using the Keying Set * 1) add datasource override for the PoseChannel @@ -782,7 +789,7 @@ static void poselib_keytag_pose (bContext *C, Scene *scene, tPoseLib_PreviewData * 3) free the extra info */ ANIM_relative_keyingset_add_source(&dsources, &pld->ob->id, &RNA_PoseBone, pchan); - ANIM_apply_keyingset(C, &dsources, NULL, poselib_ks_locrotscale, MODIFYKEY_MODE_INSERT, (float)CFRA); + ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); BLI_freelistN(&dsources); /* clear any unkeyed tags */ |