diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-03-04 09:15:11 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-03-04 09:15:11 +0300 |
commit | b1e48ab4e483efd5382e5206a2c0177fdf8a7c64 (patch) | |
tree | dcfdf46498efbb20a10e0675c13259288c08c1e6 /source | |
parent | cf2876b77aaf84a50922f7398f89feaeb56bad0b (diff) |
Fix T43879: Autokey ignore pref /w viewlock-camera
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index cfe5eb83219..7169fa95763 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -189,6 +189,7 @@ bool ED_view3d_camera_autokey( struct bContext *C, const bool do_rotate, const bool do_translate) { if (autokeyframe_cfra_can_key(scene, id_key)) { + const float cfra = (float)CFRA; ListBase dsources = {NULL, NULL}; /* add data-source override for the camera object */ @@ -200,12 +201,12 @@ bool ED_view3d_camera_autokey( * TODO: need to check in future that frame changed before doing this */ if (do_rotate) { - struct KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_ROTATION_ID); - ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); + struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_ROTATION_ID); + ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); } if (do_translate) { - struct KeyingSet *ks = ANIM_builtin_keyingset_get_named(NULL, ANIM_KS_LOCATION_ID); - ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, (float)CFRA); + struct KeyingSet *ks = ANIM_get_keyingset_for_autokeying(scene, ANIM_KS_LOCATION_ID); + ANIM_apply_keyingset(C, &dsources, NULL, ks, MODIFYKEY_MODE_INSERT, cfra); } /* free temp data */ |