TestColladaLoading not working


the TestColladaLoading seems to be broken (latest from SVN). Can someone check it ?

23-mar-2009 9.42.45 class jmetest.renderer.loader.TestColladaLoading start()

GRAVE: Exception in game loop

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

at java.util.ArrayList.RangeCheck(ArrayList.java:546)

at java.util.ArrayList.get(ArrayList.java:321)

at jmetest.renderer.loader.TestColladaLoading.simpleInitGame(TestColladaLoading.java:104)



I fixed this example's animation by disabling the interpolation setting in ColladaImporter.java.  ColladaImporter was setting interpolation to true regardless of the loaded model.  It should set interpolation based on the model it loads.  I enhanced BoneAnimation in rev 4117 to actually honor the setting-- hence the problem.  I do not have time to properly fix ColladaImporter and distinguish whether the loaded model should really interpolate or not, but I will compare example executions from pre-rev-4117 to HEAD for all of our examples that use Collada, to verify that nothing is broken and that this temporary fix doesn't disable good Collada animation interpolation that was working before.  (Presumably, if a target model really does support interpolation, ColladaImporter would now disable it).

It could be that the interpolation setting is loaded correctly by the parser but just got clobbered by the assignment that I disabled-- if so, then all is well now.  It would be great if somebody had time to look into that (i.e., if the interpolation setting is loaded from the model file, and if not, how should it be).

There were  some recent changes.

Maybe blaine can look into it.


thats the first error which pops up:

WARNUNG: Error processing animation information
java.lang.IllegalStateException: Can't call setInterpolate() before the keyframeTimes are set
   at com.jme.animation.BoneAnimation.setInterpolate(BoneAnimation.java:775)
   at com.jmex.model.collada.ColladaImporter.processAnimation(ColladaImporter.java:1224)
   at com.jmex.model.collada.ColladaImporter.processAnimationLibrary(ColladaImporter.java:1192)
   at com.jmex.model.collada.ColladaImporter.processCollada(ColladaImporter.java:563)
   at com.jmex.model.collada.ColladaImporter.load(ColladaImporter.java:285)
   at com.jmex.model.collada.ColladaImporter.load(ColladaImporter.java:265)
   at jmetest.renderer.loader.TestColladaLoading.simpleInitGame(TestColladaLoading.java:95)
   at com.jme.app.BaseSimpleGame.initGame(BaseSimpleGame.java:544)
   at com.jme.app.BaseGame.start(BaseGame.java:74)
   at jmetest.renderer.loader.TestColladaLoading.main(TestColladaLoading.java:39)

Will take care of.  Thanks.