When I try to set pose bone's head in keyframe, I knew that the bone's head is just read only, so I have to convert the bone's head to bone's location or matrix, after searching a lot of information,I know this furmula:

(pbone.matrix*armature.matrix_world).to_translation()=pbone.head

now I want to change pbone.head and keep armature.matrix_world constant, so how do I get pbone.matrix?

New contributor
bai mi is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
  • Related My understanding is pb.head = pb.matrix.translation, or in other words keyframe pose bone location (when not connected) Moving the pose bone doesn't effect the world matrix of its armature object. The matrix world of the object is used to calc the global transform of the local data, in this case pose bones. blender.stackexchange.com/questions/109815/… – batFINGER Oct 12 at 12:18
  • yes, now I just want to set the value of pbone.head to be half of its original value, but in pose mode, the value is read only, so is there any way to do that? Thank you very much. – bai mi Oct 12 at 12:31
  • Please elaborate on this in question. If the bone is not connected, set pb.location if it is then would need to adjust the parent bone, such that its tail is where the head is to be. Possible Duplicate – batFINGER Oct 12 at 12:39
  • The problem I actually had at work is to scale my animations in three dimensional space and not in time. For example, if I want to apply a giant's motion data to a little man or scale a giant to small man, there will be some problems , such as the slightly open legs of the giant becoming split legs of the little man, the keyframe just record the rotation and location of the bone, and the rotation data is right, but the location data is wrong, so I want to scale the location of all the bone, and set the zoom center as the center of the foot, so in my scripts – bai mi Oct 12 at 12:54
  • so in my scripts, I just get the global coordinates of the bones by "pbone.head" and want to scale the data, but I don't know how to set the value back. I'm sorry that my English is not good. I don't know whether I can describe it clearly – bai mi Oct 12 at 13:04

Your Answer

bai mi is a new contributor. Be nice, and check out our Code of Conduct.
 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.