Exporting multiple animations

Hi everyone. First of all, I’d like to say thanks for taking the time to help.

I exported a model with multiple animations. After converting the xml file to .j3o, I get a model, AnimControl, and SkeletonControl in my SceneExplorer Window. I get an animation called my_animation and it plays the animation that was attached to the model in Blender.

Is there a way for me to export multiple animations at once from Blender? Or are all the animations already exported and I need code to switch the animations?

1 Like

Yes, in the NLA editor you want to add them all to one track, then you can just set animation by the name they have in the track.

You can see an example at 2:40

In the NLA editor in blender, you click Add>Add Action Strip

Yes, they are kinda a pain up the ass.

1 Like

Hello, I’m actually doing the same thing as you right now :smile: You’re going to want to convert your keyframed animations to NLA strips, as that’s what Ogre uses when it exports.

To do this, you’re going to want to keyframe you’re animations as actions in Blender’s actionEditor setup, than push them as strips onto the NLA. All strips get exported as animations

*Oh, and the system I’ve found to be a little buggy, so deleting all the animations from the strip and pushing them down again every so often is a good Idea. Also, clicking the F to the right of the action saves it so it won’t get deleted.

Hehe sorry for the long winded response, but this is the pipeline I’ve found to work for me :yum:

2 Likes

I don’t suppose you know of any easy way to add all at once do you? I have about 50 animations I have to add 1 by 1

Hmm, not that I know of, exporting is kind of a pain in general :confused:

haha, I just tried converting the blend file over and let Jmonkey turn it into a j3o, and forgot that IK hasn’t been implemented yet. :stuck_out_tongue_closed_eyes:

I suppose you could bake the constraints in Blender and than convert the file in Jmonkey. I think there’s a script in the plugins that does it automatically… let me check

@JESTERRRRRR yup, here’s a link to the script download, it should be in the plugins in user preferences though :smiley:

http://wiki.blender.org/uploads/5/54/Bake_Constraints.zip

I figured it out! Finally! Ran into some problems because the animations wouldn’t play in jmonkeyengine. I fixed it by making sure the sound icon is checked in the NLA editor.

Thanks everybody who responded

I always hat them on one NLA track, but for me it also works with one track per animation.