panda3d.core.AnimControlCollection

class AnimControlCollection

This is a named collection of :class:`~AnimControl` pointers. An :class:`~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 diagram

Inheritance diagram of AnimControlCollection

__init__() → None

Returns the AnimControl associated with the given name, or NULL if no such control has been associated.

__init__(param0: AnimControlCollection) → None
clearAnims() → None

Disassociates all anims from this collection.

findAnim(name: str) → AnimControl

Returns the AnimControl associated with the given name, or NULL if no such control has been associated.

Return type

AnimControl

getAnim(n: int) → AnimControl

Returns the nth AnimControl associated with this collection.

Return type

AnimControl

getAnimName(n: int) → str

Returns the name of the nth AnimControl associated with this collection.

getAnimNames() → list
getAnims() → list
getFrame() → int

Returns the current frame in the last-started animation.

getFrame(anim_name: str) → int

Returns the current frame in the named animation, or 0 if the animation is not found.

getNumAnims() → int

Returns the number of AnimControls associated with this collection.

getNumFrames() → int

Returns the total number of frames in the last-started animation.

getNumFrames(anim_name: str) → int

Returns the total number of frames in the named animation, or 0 if the animation is not found.

isPlaying() → bool

Returns true if the last-started animation is currently playing, false otherwise.

isPlaying(anim_name: str) → bool

Returns true if the named animation is currently playing, false otherwise.

loop(anim_name: str, restart: bool) → bool

Starts the named animation looping.

loop(anim_name: str, restart: bool, from: float, to: float) → bool

Starts the named animation looping.

loopAll(restart: bool) → None

Starts all animations looping.

loopAll(restart: bool, from: float, to: float) → None

Starts all animations looping.

output(out: ostream) → None
play(anim_name: str) → bool

Starts the named animation playing.

play(anim_name: str, from: float, to: float) → bool

Starts the named animation playing.

playAll() → None

These functions operate on all anims at once.

playAll(from: float, to: float) → None

Starts all animations playing.

pose(anim_name: str, frame: float) → bool

Sets to a particular frame in the named animation.

poseAll(frame: float) → None

Sets all animations to the indicated frame.

stop(anim_name: str) → bool

Stops the named animation.

stopAll() → bool

Stops all currently playing animations. Returns true if any animations were stopped, false if none were playing.

storeAnim(control: AnimControl, name: str) → None

Associates the given AnimControl with this collection under the given name. The :class:`~AnimControl` will remain associated until a new :class:`~AnimControl` is associated with the same name later, or until unbindAnim() is called with this name.

unbindAnim(name: str) → bool

Removes the AnimControl associated with the given name, if any. Returns true if an :class:`~AnimControl` was removed, false if there was no :class:`~AnimControl` with the indicated name.

whichAnimPlaying() → str

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(out: ostream) → None