Fix #27926: autokey not working with auto IK, broke this with an earlier bugfix.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 10 Jul 2011 18:21:40 +0000 (18:21 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Sun, 10 Jul 2011 18:21:40 +0000 (18:21 +0000)
source/blender/editors/transform/transform_conversions.c

index de8eda78d6372db74ed25ab42af098807d134b55..16bfc75c97979cf54b57069acd27261876bf4a92 100644 (file)
@@ -4979,6 +4979,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
                        where_is_pose(t->scene, pose_ob);
                }
 
                        where_is_pose(t->scene, pose_ob);
                }
 
+               /* set BONE_TRANSFORM flags for autokey, manipulator draw might have changed them */
+               if (!cancelled && (t->mode != TFM_DUMMY))
+                       count_set_pose_transflags(&t->mode, t->around, ob);
+
                /* if target-less IK grabbing, we calculate the pchan transforms and clear flag */
                if (!cancelled && t->mode==TFM_TRANSLATION)
                        targetless_ik= apply_targetless_ik(ob);
                /* if target-less IK grabbing, we calculate the pchan transforms and clear flag */
                if (!cancelled && t->mode==TFM_TRANSLATION)
                        targetless_ik= apply_targetless_ik(ob);
@@ -4995,8 +4999,6 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
 
                /* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */
                if (!cancelled && (t->mode != TFM_DUMMY)) {
 
                /* automatic inserting of keys and unkeyed tagging - only if transform wasn't cancelled (or TFM_DUMMY) */
                if (!cancelled && (t->mode != TFM_DUMMY)) {
-                       /* set BONE_TRANSFORM flags, they get changed by manipulator draw */
-                       count_set_pose_transflags(&t->mode, t->around, ob);
                        autokeyframe_pose_cb_func(C, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                }
                        autokeyframe_pose_cb_func(C, t->scene, (View3D *)t->view, ob, t->mode, targetless_ik);
                        DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
                }