I am trying to extend the tutorial with a small model created in blender. The model get loaded and rendered, but there are no animations to play. If I call pview from command line it shows no animations but if called from the chicken exporter (inside blender) plays animations nicely.
(I used the tag code on the console output as it does not change the identation)
I did the following in c++
NodePath dummy = window->load_model(framework.get_models(), "./Models/Dummy/Dummy"); dummy.reparent_to(window->get_render()); dummy.ls(std::cout, 4);
This gave the console output:
ModelRoot Dummy.egg T:(pos 0 10 0 scale 0.2) PandaNode Character Armature GeomNode (1 geoms: S:(MaterialAttrib TextureAttrib TransparencyAttrib)) AnimBundleNode Kick AnimBundleNode Punch
So I think that the animations are exported correctly, but the code continues:
AnimControlCollection dummy_anims; int ret; auto_bind(dummy.node(), dummy_anims, 0); ret=dummy_anims.get_num_anims(); std::cout << "Loaded " << ret << " animations!" << std::endl;
printing the following to stdout:
Loaded 0 animations!
and the final lines does not animate the model:
dummy_anims.loop("Punch",true); window->loop_animations(0); // Run the engine. framework.main_loop(); // Shut down the engine when done. framework.close_framework(); return (0);
I am expecting that the call to auto_bind would populate the AnimControlCollection, but found put that no animation was bind to the model. Am I doing something wrong?