1

I need to copy the world matrix of a bone and assign it to another bone. Both have different parents. Pretty much what the copy transforms constraint does, but for a single frame without dependencies, because I need it to be set in a certain frame and then put a loc/rot keyframe there. I am fine with either a script or manual solution (like cursor to selected -> selection to cursor, but for rotations as well)

I found this: Global Pose/Rotation of a bone But that script gives me an error, that the expected matrix would need to be 3x3, if I put mat.to_3x3() behind it, nothing happens at all. Also since both bones in that script share a branch in the hierarchy I'm not sure if it would suit me in the first place. I don't care about scale at all. Thanks

Frederik Steinmetz
  • 2,879
  • 1
  • 8
  • 11

1 Answers1

1

The link batFINGER provider is the correct answer, just in case someone is wondering: The reason why my bone was expecting a matrix 3x3 is that I used

bone = C.active_bone

the correct way to get the bone is

bone = my_armature.pose.bones['my_bone']
Frederik Steinmetz
  • 2,879
  • 1
  • 8
  • 11