Blender 2.57 export all action set animations psa script Help!

I need some help on export all the action sets but I getting None in return. It only work in exporting one action set for the animations.

Here the file:
http://code.google.com/p/unrealtacticalmod/downloads/detail?name=Blender257ExportUnreal20110415svn36183.rar

Here the file sample.
http://unrealtacticalmod.googlecode.com/files/chibi_format_2_57_20110419.blend

Can anyone help with this. This might be the last coding to be done.


Manage to fixed the script. I was lost in my own script and took a while think and manage to fixed it.

http://code.google.com/p/unrealtacticalmod/downloads/detail?name=Blender257ExportUnreal20110424svn36299.rar

Here the update version.

Can you give some info as to which line/function returns None?

This for all action set export and doesn’t work.
Line 1355 posebonemat = parentposemat.invert() * posebonemat
Line 1358 quat = posebonemat.to_quaternion().normalize()
those return None

Single export.
Line 1513 posebonemat = parentposemat.invert() * posebonemat
Line 1517 quat = posebonemat.to_quaternion().normalize()
It works

Use these functions instead:
http://www.blender.org/documentation/blender_python_api_2_57_release/mathutils.html#mathutils.Quaternion.normalized
http://www.blender.org/documentation/blender_python_api_2_57_release/mathutils.html#mathutils.Matrix.inverted

the ‘ed’ suffix denotes that a new copy is returned rather then modifying in-place, similar to pythons sort() / sorted() functions.

How to deal with the parent and non parent matrix coding. I wanted to get the head fixed location. Else it give offset of the head location of it. Not sure how to deal with invert > inverted when the value is different.