Exporting trouble. Bone tail and head positions change quaternion rotation I managed to program a cute script to export animated models for Play Station Portable. 

If all the bones are aligned with Y pointing up, It works perfect, But animating the models that way is a bit strange:



So I want to export models with bones not aligned like this:



But the bones rotated in edit mode, like the ones for the arms, are now rotating along their rotated Y axis, the exported quaternions are wrong when loaded in PSP and they rotate in flipped axis. 

So... Is there a way to export the quaternions without the rotation added by the head-tail axis?. Like, multiply the quaternion by the head-tail vector... or something like that?

Thanks a lot!
Short Answer: No.
Long answer: it likely isn't worth it.

You can do things like this by shifting the rotational axis of the animations once you have adjusted your bones as described by this question/comment set:
Rotate a particular bone in edit mode without offsetting animation?

But, from experience, you should not make adjustments to your armature once animations are created.