I'm writing a small addon to export armatures and actions to an in-house rendering engine. The rendering engine uses a traditional OpenGL-style coordinate system, with +Y representing UP and -Z representing FORWARD.
Bones in the in-house system store a location, rotation (quaternion), and scale, so I'm exporting to this representation directly. In the addon, I'm using Blender's standard axis conversion functions to transform positions to the target coordinate system. However, my mathematical understanding of quaternions is somewhat weak and I'm not entirely sure if I need to be transforming quaternions too.
While I understand that quaternions do not have "handedness" or anything like that, I do feel that, for example, a quaternion that represents a rotation around the Z axis in Blender probably needs to be transformed so that it represents a rotation around the +Y axis in the target engine. Does this seem correct?
If some sort of transformation does need to occur, is there anything already in the standard API to facilitate this? I'm unable to find anything (possibly because it's not there, possibly because the transformation isn't actually necessary!).