I’m exporting a mesh to DirectX using Blender’s export script…the root frame has a transformation matrix ( SystemMatrix ) that cannot be correctly converted to a quaternion. The root matrix is the following:

._11 = 1;

._12 = 0;

._13 = 0;

._14 = 0;

._21 = 0;

._22 = 0;

._23 = 1;

._24 = 0;

._31 = 0;

._32 = 1;

._33 = 0;

._34 = 0;

._41 = 0;

._42 = 0;

._43 = 0;

._44 = 1;

this matrix is not an affine transformation…the data here does not represent, entirely, a rotation matrix and therefore DirectX is not able to create a quaternion from this matrix…I use quaternions in my coding because they are much more stable! Is there a rotation quaternion within the system’s configuration that I can access with python? I would like to create a rotation matrix from that instead and change the export script to write this newtransformation matrix within the root frame…

…part of this matrix’s function is to rotate the entire character around the x-axis by 90 degrees. I believe it also rotates the character around the z or the y axis by 180 degrees…

…what I’d like to know is how to create a rotation matrix that will transform the mesh from Blender space to a relative orientation in DirectX…