Hi,
I’ve been using the following to make a character model and animation:
MakeHuman->Import MHX to Blender->Import BVH to Blender -> BVH to MHX armature using MakeWalk -> Export to Yabee egg
When I open PView the model is ok (apart from some texture issues which I don’t care about yet), but if I press A it says no animations. However, if I look in the egg file I can see the Bundle tag with the animation I created called “jog”.
I try to run the animation like this:
window_ = Application::GetWindow();
actorModel_ = window_->load_model(framework_.get_models(), "/c/Users/zobbo/dev/player2.egg");
window_->load_model(actorModel_, "/c/Users/zobbo/dev/playeranim.egg");
actorNodePath_ = window_->get_render().attach_new_node(playerNode_);
actorModel_.reparent_to(playerNode_);
//bind the animations to the model
auto_bind(actorModel_.node(), animCollection_);
bool isLooped = animCollection_.loop("jog", true);
std::cerr << "isLooped: " << isLooped << "\n";
// play an animation once:
bool isPlayed = animCollection_.play("jog");
std::cerr << "isPlayed: " << isPlayed << "\n";
Also if I do this it returns nothing:
for(int n = 0; n < animCollection_.get_num_anims(); ++n)
std::cerr << " animation: " << animCollection_.get_anim_name(n) << endl;
This fails and returns 0 for everything, although all the files load ok. Since Pview can’t see the animation I suspect it’s an export problem, but I’ve no idea how to fix it.
Also it’s not clear to me how you load an animation that’s already in the model file in C++, do you just skip the load model bit and try and load the animation by name?
Thanks,
Cheers,