To load a jointmesh from xml

Trying to load a jointmesh from xml fails, jME says ‘ilformatted quat’, probably when reading the localrot property of a joint. Which is quite right, because looking in the (jME generated, via the JmeBinaryWriter->BinaryToXML chain) xml file I find something which looks very much like a matrix rather than a quaternion: localrot=“1.0 -0.0 0.0 0.0 1.0 -0.0 0.0 0.0 1.0”. Changing this to the appropriate quaternion (jme quat order is xyzw, right?) doesn’t help much, i just get another error:

java.lang.ClassCastException: java.lang.String

    at com.jme.scene.model.XMLparser.JmeBinaryReader.processBSphere(Unknown Source)

    at com.jme.scene.model.XMLparser.JmeBinaryReader.readBegining(Unknown Source)

    at com.jme.scene.model.XMLparser.JmeBinaryReader.loadBinaryFormat(Unknown Source)

    at com.jme.scene.model.XMLparser.JmeBinaryReader.loadBinaryFormat(Unknown Source)

What can I do to get this working?

EDIT: BTW, the tested model is a very simplistic one-bone-one-cube ms3d model loaded via MilkToJme, and my jME version is cvs from around march 04

Just tried removing everything but the jointmesh and it’s jointcontroller from the xml file, the ClassCastException remains:

java.lang.ClassCastException: java.lang.String
    at com.jme.scene.model.XMLparser.JmeBinaryReader.processController(Unknown Source)

My xml file is pretty clean now, all it has is a node containing a jointmesh with jointindex, origvertex, orignormal, vertex, normal, and index data, and a jointcontroller like this:

       <jointcontroller speed="1.0" fps="24.0" numJoints="1" rptype="1" >
      <joint index="0" parentindex="-1" localrot="0.0 0.0 0.0 1.0" localvec="0.0 0.0 0.0" >
          <keyframe time="0.04" rot="0.0 0.0 0.0 1.0" trans="0.0 0.0 0.0" >
          <keyframe time="0.08" rot="0.551937 0.0 0.0 0.83388585" trans="0.0 0.0 0.0" >

note that i manually changed the localrot property to be a quaternion rather than a matrix.

Cep is going to have to answer this one… if he isn’t available soon I’ll start digging around too.

Thank you very much. Don’t worry, though, I’ll focus on other things meahwhile. Of course, in the long term, it would be great to have some pointers how to get on from here…

Email me the trimmed XML file. cep221 at gmail d0t com