[Bf-blender-cvs] [b1e48ab] master: Fix T43879: Autokey ignore pref /w viewlock-camera
Campbell Barton
noreply at git.blender.org
Wed Mar 4 07:18:35 CET 2015
Commit: b1e48ab4e483efd5382e5206a2c0177fdf8a7c64
Author: Campbell Barton
Date: Wed Mar 4 17:15:11 2015 +1100
Branches: master
https://developer.blender.org/rBb1e48ab4e483efd5382e5206a2c0177fdf8a7c64
Fix T43879: Autokey ignore pref /w viewlock-camera
===================================================================
M source/blender/editors/space_view3d/view3d_edit.c
===================================================================
diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c
index cfe5eb8..7169fa9 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 */
More information about the Bf-blender-cvs
mailing list