How To Export Blender Animations To jMonkey?

Hi,
Thanks to the community, I was able to export my character (character.mesh, character.mesh.xml, character.skeleton, character.skeleton.xml, character.material) to jMonkey. My question is, how do I export my animations? I made them in Blender’s action editor.
I have tried using the code from “Hello animation” and I have my animations called Walk, and stand. (Case sensitive).
The code blows up in my face, with a throw exception.
It will not let me add a listener to an AnimControl.
The line

control = player.getControl(AnimControl.class);

Works, however it will not let me execute

control.addListener(this);

Please note that player is a node, and control is an AnimControl.

I don’t know what i’m doing wrong.
Also, should I convert my .mesh.xml files to .j3o?
And must the skeleton be imported? It did not need to be in the example, so I assumed it wouldn’t need to be.

1 Like

Have a look at this example: http://dl.dropbox.com/u/26887202/123/jme_blender/characterOgre26.zip
There is documentarion on JME: https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:advanced:ogrecompatibility

Beware, for the actions to be exported, they must be used in the blender timeline.

Thanks.
Could you elaborate on that?
They must be used in the timeline?
I have them in the action editor. Where would I find the timeline? I’m a novice to animation, sorry :confused:

Okay, I finally managed to get it into jMonkey however once it was in, the ‘stand’ animation I’d made for it just had it morph itself into a monster. So it exported just…not correctly…?

Like… I am almost 10000% sure somebody already posted the blender model creation and import tutorial to you and if you can’t rightfully say “no, nobody did” I really, really feel like hitting you in the face. Anyway I shall post it (again) here.
https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender

Thanks normen, it looks like it may fix my problem!
And I apologise for being such an annoyance, as I’m only 16.
Me and my friends are programming our first 3D game, which is an RPG with multiplayer. I am the 3D guy on the project right now, not lead coder, but I am also a coder, so that is why I am having troubles. 3D is not my strong suit :confused:

1 Like

So you just have to learn about patience, and docs reading ;-).
Not that easy when under pressure, but the only way to go…

Welcome to JME’s world!

1 Like

I am still having the same issue.
When I run the animation, the character stretches itself abnormally.
So, 2 things

What is the export for jMonkey, the axis? XYZ, XZY, etc?

It looks like the mesh is being rotated, but not the armature. It is then being animated. This is what appears to happen in jMonkey.

Any ideas?

Fixed it. I applied the rotation, scale, etc AFTER making the animation so I was under the influence that it wasn’t the fix.
Want to thank you guys, especially normen, as that fixed it!
So, you’ll probably be seeing more posts from me, but luckily they shouldn’t be too hard to answer.

I want to attach a mesh to the body I just loaded. Like, a sword to the hand bone.
Any tips on how to do that? No, I’ve not looked that up at all, just saving time :stuck_out_tongue:
I see many forum posts about it though, shouldn’t be too hard.