Panda3D Manual: Loading Actors and Animations
Actor Basics
The
Required Includes#include "auto_bind.h" Load the Actor ModelNodePath Actor = window->load_model(windo->get_render(), "panda-model"); Load the Animationwindow->load_model(Actor, "panda-walk"); Bind the Model and the Animation// don't use PT or CPT with AnimControlCollection Control the Animations// the name of an animation is preceded in the .egg file with <Bundle>:
for(int n = 0; n < anim_controls.get_num_anims(); ++n) If you add more animations to some node after calling: Note that it is possible to store the animations and the model in the same file. Although this is a rarely-used technique, it is possible to assemble a character model out of several separate pieces (separate models). This is further explained in the section Multi-Part Actors. Panda3D supports both skeletal animation and morph animations. It is also possible to load animations asynchronously, if your build of Panda has Threading enabled (which is the case in version 1.6.1 and above). Panda Filename SyntaxThe filenames used in the Actor constructor must follow Panda's filename conventions. See Loading Models for more information. Loading actors and animations utilizes the panda model path, the same as for static models. © Carnegie Mellon University 2010 |