I would like to know if it is possible to get the real coordinates of a bone's head and tail when the armature is rotated. I already got something working with translations of armature but can't figure out how to do it when a rotation is applied.
To demonstrate what I want I created two cubes that will be moved to the bone's head and tail. Here is the code :
import bpy
armature = bpy.data.objects["Armature"]
bname = 'bone_2'
bone = armature.pose.bones[bname]
tail = bone.tail + armature.location
head = bone.head + armature.location
bpy.data.objects['head'].location = head
bpy.data.objects['tail'].location = tail
And here is the result without rotation and with rotation:
Thanks for your help!