I’m testing my models from Blender (models having been constructed and exported with/without animation). They’ve been exported to egg, bam and x.
I used the Roaming Ralph sample code and trimmed it down to the environment and actor loading codes and an animation loop.
Loading just the model, everything looks fine. Once I add the animation directory and the animation loop, I get this KeyError: ‘modelRoot’
self.sg = Actor("Models/ActorSG-fire.bam", {"walk":"Models/ActorSG-fire.bam"})
self.sg.setScale(0.5,0.5,0.5)
self.sg.setPos(0,5,0)
self.sg.reparentTo(render)
self.sg.loop("walk")
Without the last line, it loads and shows the model, but no animation. With the last line, I get the error.
Just some background on the models: It’s a LEGO figurine, made up of multiple parts. A armature is included with some parts attached to the bones of the armature. Animations have been done with the armature and exported.
I don’t know what’s causing this problem. I even tried exporting the models into egg, bam and x to see if it’s a format problem.
My thinking is either there’s a problem with Blender and Chicken R66 or there’s something wrong with my code.
Again, I copied the Roaming-Ralph code and just trimmed it down to the load model codes. I didn’t touch the import section.
Any help would be appreciate.