Exporting the correct bone data

Hello, this is cross poseted from stackoverflow.com hopefully someone could answer it here?

http://stackoverflow.com/q/6129866/274249

I have searched this forum a few times but have not been able to find a good explanation of how to get a bind pose matrix from blender’s data. Is bone.matrix_local the rotation part? Is bone.tail() - bone.head() the translation part? (I am using blender 2.56.3)
Thanks!

Lot of luck! I’ve been trying to get that info plus the bone location for some time no but have not gotten a lot of help on this forum and I’m using Blender 2.45.