Ralph's animation can't be binded

Hi all,

I’m almost done letting Ralph Roam with C++ code.
I’m just having 1 more thing with the animations:
For some reason, auto_bind refuses to bind Ralph’s animations. The odd thing is, I tried the same code with the panda-model+panda-walk4, which work perfectly fine. Anyway, this is my code:

AnimControlCollection _ralph_anims;
//...
  LPoint3f ralph_start_pos (environ.find("**/start_point").get_pos());
  ralph = win_ptr->load_model(framework_ptr->get_models(),"models/ralph.egg.pz");
  ralph.set_scale(0.2);
  ralph.set_pos(ralph_start_pos);
  ralph.reparent_to(win_ptr->get_render());

  // Load Ralph's animations

  win_ptr->load_model(ralph,"models/ralph-run.egg.pz");
  auto_bind(ralph.node(), _ralph_anims, 0);
  _ralph_anims.loop_all(true);

Am I doing something wrong? Any help would be appreciated.
I tried it using the good old win_ptr->loop_animations, but that won’t work either.

By default, auto_bind() will attempt to match up models and animations by character name. The idea is that when you create the egg files, you give the same character name to the model and to the animations intended to be played on that model. This serves to help protect against accidentally mismatched animations, and also allows auto_bind() to be given a hierarchy that includes an entire collection of several different models and their various animation files, and auto_bind() can sort out which one belongs where and bind them up properly.

But often, models are not converted properly. It’s likely that the character name on ralph’s model doesn’t match the character name on his animations. In this case, you need to specify HMF_ok_wrong_root_name as the third parameter to auto_bind(), so that it will ignore the character name and bind the animations anyway.

David

Nope, no result.
This is my code now:

  win_ptr->load_model(ralph,"models/ralph-run.egg.pz");
  auto_bind(ralph.node(), _ralph_anims, PartGroup::HMF_ok_wrong_root_name);
  _ralph_anims.loop_all(true);

EDIT: OK, I already fixed it. I took a look at pview again and saw that it also included the HMF_ok_part_extra and HMF_ok_anim_extra flags. I added those to my code and it worked great!
This is the working code now:

  win_ptr->load_model(ralph,"models/ralph-run.egg.pz");
  auto_bind(ralph.node(), _ralph_anims, PartGroup::HMF_ok_part_extra | PartGroup::HMF_ok_anim_extra | PartGroup::HMF_ok_wrong_root_name);
  _ralph_anims.loop_all(true);

Thanks again for your continued assistance!