[Bf-committers] Quaternions in large

Anders Nilsson bf-committers@blender.org
21 Jun 2004 04:01:21 +0200

Are they supposed to be defined as (w,x,y,z) or (x,y,z,w)? It's pretty
darn hard to find out which!

In Python::Mathutils they are defined as (w,x,y,z) in the documentation.
Some functions here operate using built-in blender functions such as
EulToQuat in blenkernel/artihb.c. Then on the other hand quaternions
mostly seems to be defined (allocated) as (x,y,z,w) such as in the
"transform properties" for the bones.

But the python:API get the quaternions from the bones by copying the
four floats thus getting (w,x,y,z)=(x,y,z,w) as return value of the

But if I have a bone with a certain rotation and create a
IPO-quaternion-track for it what's QuatX in the transform properties
become QuatW in the ipo-window (and some other stuff).

What have I missed? Is is really such a mess? How can one know what is

I'm trying to get armatures working in my application but it's very hard
when I don't really know what I get from Blender, guess that's a
documentation problem with the Python-API though.

Anders Nilsson (breakin)