I’m writing a skeletal animation exporter. I’ve made a simple cube attached to a single bone which rotates around the Z axis over 3 keyframes. When I print out the keyframe information, it doesn’t seem right at all. I’m getting quaternion transformation values of -1.5828e-23 and such. I only have 3 frames at 0, 24, and 48, each with simple orthogonal transforms. I’m using Blender 2.4 alpha-2, but I’ve also tried with Blender 2.37.
Here’s the Blender file: http://habitualhiatus.com/extern/box.blend
Here’s the script:
import Blender
for obj in Blender.Object.GetSelected():
if type(obj.getData()) is Blender.Types.ArmatureType:
for action in Blender.Armature.NLA.GetActions().itervalues():
for channel, ipo in action.getAllChannelIpos().items():
for curve in ipo.getCurves():
for bez in curve.getPoints():
print bez.pt
I know the values are QuatX, QuatY, QuatZ, and QuatW, so I’m assuming the Blender quaternions work the same way as your typical quaternion. So I’m expecting values in the range -1.0 to 1.0.