I am writing a custom exporter to export from blender to my opengl program. To read the roatation, as well as convert from blender's cordinate system to my game's system, i use this code:
e = poseBone.rotation_quaternion.to_euler() quat = Euler((e, e, e)).to_quaternion() #write this quat to file
Bones in blender, as demonstrated by this image, have their own local space: I believe this difference in local bone space vs world space is the last thing causing incorrect rotations in my opengl program. How would convert bone.rotation_quaternion from local bone to world space prior to export? I have seen several similar questions, but none that helped me.