Loading animations directly from .blend file

Hi
I was very happy to see the jme3 supports loading .blend files directly, which is great for prototyping. However I can’t seem to find any guides about how to use the animations which were part of the blender model.
I can from
https://wiki.jmonkeyengine.org/legacy/doku.php/sdk:blender

that
“Bone animations and object animations are supported.” and I’ve only have a simple rotation animation
also
“If you define animations in your BlenderKey the animations will as well be imported and attached to the model.”
but i don’t know how to use tho BlenderKey class?

and
AnimControl control = teapot.getControl(AnimControl.class); give me null

any help would be greatly appreciated

the control does not necessarly need to be on the top level, do a recursive search in the model if one exists(or multiple!)

ahh ha… i se thanks
however now

[java]
Spatial motor = ((Node)teapot).getChild(“Cylinder”);
AnimControl control = motor.getControl(AnimControl.class);
AnimChannel channel = control.createChannel();
channel.setAnim(“CylinderAction”, 0.50f);
channel.setLoopMode(LoopMode.Cycle);
channel.setSpeed(1f);
[/java]

makes the motor spatial disappear… does that mean in using an unsupported animation?
I just extruded parts of a cylinder and made it spin
should i use an armature?

thanks for your help!

ok I’ve found that the spatial does not disappear its moved… However if just render the model everything looks great but as soon as i start the animation the part go the model that moving moves out. should i be doing something different when I’m creating the model in blender?
i have read
http://hub.jmonkeyengine.org/forum/topic/running-a-blender-animation-in-jmonkeyengine/
but i don’t think any one has answered the question

thanks

ok after some random messing around i got it to work.

I opened the file selected the mesh with the animation and set the rotation, location all to 0 and the scale to 1. Which makes the model look wrong in blender but thought i d give it ago anyway. but now when i open it jme3 it all looks good. I must say i don’t understand it. I probably will need to before move on to more complex models and animations, but oh well…

https://wiki.jmonkeyengine.org/legacy/doku.php/jme3:external:blender