diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-06-23 10:56:16 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-06-23 10:56:16 +0400 |
commit | 1c41d19964088e3d21fe1899bc5ea0718ffe59a8 (patch) | |
tree | 71ecd093877c6b4d2a0eef1f180eb9b7f1ee3520 /source/blender/src/edit.c | |
parent | ca26aeb7b23e37e65f49d907ea53fcaeee77ad4e (diff) |
== Auto-Keyframing ==
I've moved the Auto-Keyframing functionality out of the special_aftertrans_update function into two separate functions, which can be called independent of the Transform system. One is for Bones, while the other is for Objects.
This now means that the Shift-S Snapping Tools will now work with auto-keyframing.
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r-- | source/blender/src/edit.c | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index 5a088ec6bef..d2220be7128 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -120,6 +120,7 @@ /*#include "armature.h"*/ /* #include "edit.h" */ #include "nla.h" +#include "transform.h" #ifdef __NLA #include "BIF_editarmature.h" @@ -1209,7 +1210,10 @@ void snap_sel_to_grid() } } ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - ob->recalc |= OB_RECALC_DATA; + + /* autokeyframing */ + autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -1235,6 +1239,9 @@ void snap_sel_to_grid() #ifdef WITH_VERSE if(ob->vnode) b_verse_send_transformation(ob); #endif + + /* auto-keyframing */ + autokeyframe_ob_cb_func(ob, TFM_TRANSLATION); } } @@ -1318,7 +1325,10 @@ void snap_sel_to_curs() } } ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - ob->recalc |= OB_RECALC_DATA; + + /* autokeyframing */ + autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -1344,6 +1354,9 @@ void snap_sel_to_curs() #ifdef WITH_VERSE if(ob->vnode) b_verse_send_transformation(ob); #endif + + /* auto-keyframing */ + autokeyframe_ob_cb_func(ob, TFM_TRANSLATION); } } @@ -1667,8 +1680,11 @@ void snap_to_center() } } } - ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); - ob->recalc |= OB_RECALC_DATA; + + /* autokeyframing */ + ob->pose->flag |= POSE_DO_UNLOCK; + autokeyframe_pose_cb_func(ob, TFM_TRANSLATION, 0); + DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); } else { ob->recalc |= OB_RECALC_OB; @@ -1694,6 +1710,9 @@ void snap_to_center() #ifdef WITH_VERSE if(ob->vnode) b_verse_send_transformation(ob); #endif + + /* auto-keyframing */ + autokeyframe_ob_cb_func(ob, TFM_TRANSLATION); } } |