17
$\begingroup$

I have a model in Blender with a full rig, including IK bones.
I also have a sword with two bones, on the top bone of the sword I have a set of constraints that copy the location and rotation of a child bone in the right hand.

The sword is then attached to the hand as expected. The second bone in the sword rig is the target for the left hand constraints that copy its location and rotation. In blender that works as expected.

I animate the primary rig right hand and the sword and the other hand moves as expected. The problem comes when I import the blender file into unity.

Unity is only seeing the right hand move but not the left. I can parent the sword to the right hand and it moves as expected. But the left hand data is not changing.

Back in blender I thought that if I were to select the left hand insert a keyframe (LocRotScale), when there was a keyframe for the right hand, that blender would then save the global position of the left hand, but when the new keyframe was inserted it had an orange line to the previous keyframe indicating that the position had not changed.

Is there away to get blender to save a keyframe for the left hand when the constraint moves it?

$\endgroup$
11
$\begingroup$

You could use Object > Animation > Bake action
(Or if you are in Pose mode, Pose > Animation > Bake action)

enter image description here

Bake action was added to the menu in Blender 2.62 (though it was previously available with Space> Search)
Unfortunately, there does not seem to be any documentation for this feature yet.

$\endgroup$
  • $\begingroup$ I don't seem to have that option with a bone contraint. When I open the menu I only have the top three options of your sub-menu. Could the bake option be in a diffent spot for bones? $\endgroup$ – Goff Aug 25 '13 at 4:59
  • $\begingroup$ Are you using the latest version of blender? $\endgroup$ – 00Ghz Aug 25 '13 at 8:52
  • $\begingroup$ @user1874355 It seems to be there in 2.68a (r58536) It is there in pose mode and object mode. $\endgroup$ – gandalf3 Aug 25 '13 at 20:36
  • $\begingroup$ I am using blender 2.60, I will upgrade and see if that makes a difference. I havn't upgraded in awhile because that version has done well for me. I will upgrade and post the results. $\endgroup$ – Goff Aug 26 '13 at 16:45
  • 3
    $\begingroup$ ok, Object > Animation > Bake action does not do anything appearent for me but Pose > Animation > Bake action from in pose mode does. It creates a new action so it is not very conveinent but it does get the motion that the contraint produces. Thank you all. $\endgroup$ – Goff Aug 27 '13 at 1:25
7
$\begingroup$

Sounds like you want to apply the Visual Transform before keyframing:

Apply Visual Transform CtrlA

Apply (set) the result of a constraint and apply this back to the Object's location, rotation and scale. See the following post for more detailed discussion: Apply visual transform.

$\endgroup$
  • $\begingroup$ I did try that, and it produced some odd errors. I set the influence of the two constraints to 1 set then crtl-a, set the influence to 0 and the hand is torn off the body and floating in space. was I missing something? do I need to delete the key frames of the hand then apply, then readd keyframes? $\endgroup$ – Goff Aug 24 '13 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.