Hi everybody,
JME version 1.0pre works nice. The XML-stuff is canceled. Time to switch to collada-stuff. And… Error…
I try to load a collada-model exported from blender and the latest exporter given by illusoft.
The code is the same as in TestColladaLoading:
ResourceLocatorTool.addResourceLocator(
ResourceLocatorTool.TYPE_TEXTURE,
new SimpleResourceLocator(TestObjectLoading.class
.getClassLoader().getResource(
"models/")));
InputStream mobboss = getClass().getClassLoader()
.getResourceAsStream("models/bonecube.dae");
ColladaImporter.load(mobboss, "newModel");
SkinNode sn = ColladaImporter.getSkinNode(ColladaImporter.getSkinNodeNames().get(0));
Bone skel = ColladaImporter.getSkeleton(ColladaImporter.getSkeletonNames().get(0));
rootNode.attachChild(sn);
rootNode.attachChild(skel);
and it throws a NullPointerException in line SkinNode sn = ColladaImporter.getSkinNo....
Log:
27.08.2007 14:40:41 com.jmex.model.collada.ColladaImporter load
INFO: Version: 1.4.0
27.08.2007 14:40:41 com.jme.scene.Node <init>
INFO: Node created.
27.08.2007 14:40:41 com.jme.scene.Node <init>
INFO: Node created.
27.08.2007 14:40:41 com.jmex.model.collada.ColladaImporter processNode
WARNUNG: Bone CubeBone is not attached to any vertices.
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (CubeBone) attached to this node (Scene)
27.08.2007 14:40:41 com.jme.scene.Node <init>
INFO: Node created.
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (Cube) attached to this node (Scene)
27.08.2007 14:40:41 com.jme.scene.SharedMesh reconstruct
INFO: SharedMesh will ignore reconstruct.
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (Cube-Geometry) attached to this node (Cube)
27.08.2007 14:40:41 com.jme.scene.Node detachChildAt
INFO: Child removed.
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (CubeBone) attached to this node (Scene)
27.08.2007 14:40:41 com.jme.scene.Node detachChildAt
INFO: Child removed.
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (CubeBone) attached to this node (Scene)
27.08.2007 14:40:41 com.jme.scene.Node attachChild
INFO: Child (Scene) attached to this node (newModel)
27.08.2007 14:40:41 com.jme.util.geom.GeometryTool minimizeVerts
INFO: batch: Cube-Geometry: Batch 0 old: 36 new: 24
java.lang.NullPointerException
at de.mistudios.test.TestObjectLoading.createObjects(TestObjectLoading.java:117)
at de.mistudios.test.TestObjectLoading.simpleInitGame(TestObjectLoading.java:73)
at com.jme.app.BaseSimpleGame.initGame(Unknown Source)
at com.jme.app.SimplePassGame.initGame(Unknown Source)
at com.jme.app.BaseGame.start(Unknown Source)
at de.mistudios.test.TestObjectLoading.main(TestObjectLoading.java:35)
27.08.2007 14:40:43 com.jme.app.BaseSimpleGame cleanup
The object is a simple textured cube with a bone and no animations.
File + texture:
http://mi-studios.de/index.php?option=com_docman&task=cat_view&gid=20&Itemid=34