0

I have the following armature, and I want to write a code sets the position each bone pose to a new pose. In the image below I've added cubes to indicate the desired positions for the armature. However, I couldn't find any systematic way to set the bones position. I found a way using convert_space, however I can't set separatelly the position of the tail and bone. Does someone have a good idea?

EDIT: There is a similar question that shows how to properly get the bones position, however my intention here would be to SET the bones position, and that I couldn't do succesfully.

enter image description here

Manveru
  • 223
  • 1
  • 9
  • 2
    Also related https://blender.stackexchange.com/questions/215570/setting-angles-between-bones. https://blender.stackexchange.com/questions/44637/how-can-i-manually-calculate-bpy-types-posebone-matrix-using-blenders-python-ap – batFINGER Apr 26 '21 at 07:33
  • Please add what you have tried so far. Basically we only position edit bones by setting the head, tail and roll, whereas for pose bones the tail is moved via rotation and scale, either directly or by constraint. Via constraint this is copy location of "head" cube, track to "tail" or next head cube. https://blender.stackexchange.com/questions/214844/python-how-to-make-pose-bone-rotation-toward-a-point https://blender.stackexchange.com/questions/215570/setting-angles-between-bones/215599#215599 – batFINGER Apr 26 '21 at 08:03
  • Hi @badFinger, thanks for the help. I have managed to move a disconnected bone to a given location. However it is not possible to move children bones, naturally. Because of that I am bit loss about how to move all bones. I get I should iterate recursively through all children moving the tails. But that seems a bit complicated to me. – Manveru Apr 26 '21 at 09:05
  • 1
    https://blender.stackexchange.com/questions/109815/how-can-i-move-a-posebone-to-a-specific-world-space-position https://blender.stackexchange.com/questions/1283/how-to-get-world-space-matrix-of-any-pose-bone – batFINGER Apr 26 '21 at 11:57

0 Answers0