0
$\begingroup$

I can translate an object to the position of a bone with snap menu. But I would also like to give the object the same orientation as the bone. Is there a way to do this (without using a script)?

$\endgroup$
  • $\begingroup$ blender.stackexchange.com/questions/25948/… $\endgroup$ – batFINGER Feb 7 at 3:25
  • $\begingroup$ @batFINGER Thanks for the link but I don't want to copy the transform through a constraint. I want to apply rotation and translation of a bone to an object, basically modifying its matrix. $\endgroup$ – Lenny White Feb 7 at 3:29
1
$\begingroup$

Use constraints

How do you use constraints with Armatures?

enter image description here

In 2.8 can add a constraint, tweak the settings to suit, then hit the Disable and Keep Transform button to RHS of influence slider.

Remove constraint and it still has the transform.

As a script, in pose mode, Suzanne has default XYZ Euler rotation mode

>>> monkey = C.scene.objects['Suzanne']
>>> C.active_pose_bone
bpy.data.objects['Armature'].pose.bones["Bone"]

>>> M = C.object.matrix_world @ C.active_pose_bone.matrix
>>> monkey.rotation_euler = M.to_euler()
|improve this answer|||||
$\endgroup$
  • $\begingroup$ Hey thanks this is a great tip. Do you know if it is possible to keep the transform from constraints in 2.79? $\endgroup$ – Lenny White Feb 7 at 4:03
  • 1
    $\begingroup$ Equivalent of Keyframe visual then remove keyframes. Or in console M = C.object.matrix_world.copy() remove constraint reset matrix world. $\endgroup$ – batFINGER Feb 7 at 4:06
  • $\begingroup$ Awesome thanks very much @batFINGER, complete forgot that you can apply visual transform! $\endgroup$ – Lenny White Feb 7 at 4:18

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.