# Blender GLTF : which rotation values are really exported?

I am using https://github.com/KhronosGroup/glTF-Blender-Exporter in a script and trying to compare the exported rotation values. But none of them seem to match. Ie. for exported values in the gltf file such as :

"rotation": [0.7071068286895752, 0.0, 0.0, 0.7071067094802856]


the exported object in blender has the following values:

---> OBJECT ROTATION QUATERNION: <Quaternion (w=0.3715, x=0.6323, y=0.4318, z=-0.5251)>
---> OBJECT MATRIX LOCAL: <Quaternion (w=0.3715, x=0.6323, y=0.4318, z=-0.5251)>
---> OBJECT MATRIX WORLD: <Quaternion (w=0.3715, x=0.6323, y=0.4318, z=-0.5251)>


while exporting, the settings are set to export_yup=False so I guess no other transformation should be involved?

• it seems that the tool exports raw matrix data instead of converting it to quaternions. The only true way is to find this piece of code in the source, and read it out. – Mechanic Nov 24 '18 at 23:01

In glTF, the order of the quaternion's components is different. Blender is showing [W, X, Y, Z], but in glTF they are expressed as [X, Y, Z, W].
Thus, my exported cube (with export_yup turned off) looks like this:
These are the same numbers, it's just that W has moved from the front to the back of the array.