# AnimControlCollection

from pandac.PandaModules import AnimControlCollection

Class : AnimControlCollection
Description : This is a named collection of AnimControl pointers. An AnimControl may be added to the collection by name. While an AnimControl is associated, its reference count is maintained; associating a new AnimControl with the same name will decrement the previous control's reference count (and possibly delete it, unbinding its animation).

## Inheritance:

AnimControlCollection:

## Methods of AnimControlCollection:

clearAnims
findAnim
getAnim
getAnimName
getFrame
getNumAnims
getNumFrames
isPlaying
loop
loopAll
output
play
playAll
pose
poseAll
stop
stopAll
storeAnim
unbindAnim
whichAnimPlaying
write

clearAnims void AnimControlCollection::clear_anims(void); Description: Disassociates all anims from this collection.

findAnim AnimControl *AnimControlCollection::find_anim(string const &name) const; Description: Returns the AnimControl associated with the given name, or NULL if no such control has been associated.

getAnim AnimControl *AnimControlCollection::get_anim(int n) const; Description: Returns the nth AnimControl associated with this collection.

getAnimName string AnimControlCollection::get_anim_name(int n) const; Description: Returns the name of the nth AnimControl associated with this collection.

getFrame int AnimControlCollection::get_frame(string const &anim_name) const; Description: Returns the current frame in the named animation, or 0 if the animation is not found. Description: Returns the current frame in the last-started animation.

getNumAnims int AnimControlCollection::get_num_anims(void) const; Description: Returns the number of AnimControls associated with this collection.

getNumFrames int AnimControlCollection::get_num_frames(string const &anim_name) const; Description: Returns the total number of frames in the named animation, or 0 if the animation is not found. Description: Returns the total number of frames in the last-started animation.

isPlaying bool AnimControlCollection::is_playing(string const &anim_name) const; Description: Returns true if the named animation is currently playing, false otherwise. Description: Returns true if the last-started animation is currently playing, false otherwise.

loop bool AnimControlCollection::loop(string const &anim_name, bool restart); Description: Starts the named animation looping.

loopAll void AnimControlCollection::loop_all(bool restart); Description: Starts all animations looping.

output void AnimControlCollection::output(ostream &out) const; Description:

play bool AnimControlCollection::play(string const &anim_name); The following functions are convenience functions that vector directly into the AnimControl's functionality by anim name. Filename: animControlCollection.I Created by: drose (22Feb00) PANDA 3D SOFTWARE Copyright (c) 2001 - 2004, Disney Enterprises, Inc. All rights reserved All use of this software is subject to the terms of the Panda 3d Software license. You should have received a copy of this license along with this source code; you will also find a current copy of the license at http://etc.cmu.edu/panda3d/docs/license/ . To contact the maintainers of this program write to panda3d-general@lists.sourceforge.net . Description: Starts the named animation playing.

playAll void AnimControlCollection::play_all(void); These functions operate on all anims at once. Description: Starts all animations playing.

pose bool AnimControlCollection::pose(string const &anim_name, int frame); Description: Sets to a particular frame in the named animation.

poseAll void AnimControlCollection::pose_all(int frame); Description: Sets all animations to the indicated frame.

stop bool AnimControlCollection::stop(string const &anim_name); Description: Stops the named animation.

stopAll bool AnimControlCollection::stop_all(void); Description: Stops all currently playing animations. Returns true if any animations were stopped, false if none were playing.

storeAnim void AnimControlCollection::store_anim(AnimControl *control, string const &name); Description: Associates the given AnimControl with this collection under the given name. The AnimControl will remain associated until a new AnimControl is associated with the same name later, or until unbind_anim() is called with this name.

unbindAnim bool AnimControlCollection::unbind_anim(string const &name); Description: Removes the AnimControl associated with the given name, if any. Returns true if an AnimControl was removed, false if there was no AnimControl with the indicated name.

whichAnimPlaying string AnimControlCollection::which_anim_playing(void) const; Description: Returns the name of the bound AnimControl currently playing, if any. If more than one AnimControl is currently playing, returns all of the names separated by spaces.

write void AnimControlCollection::write(ostream &out) const; Description: