AnimControlCollection
from panda3d.core import AnimControlCollection
- class AnimControlCollection
Bases:
This is a named collection of
AnimControl
pointers. AnAnimControl
may be added to the collection by name. While anAnimControl
is associated, its reference count is maintained; associating a newAnimControl
with the same name will decrement the previous control’s reference count (and possibly delete it, unbinding its animation).Inheritance diagram
- __init__()
Returns the
AnimControl
associated with the given name, or NULL if no such control has been associated.
- __init__(param0: AnimControlCollection)
- clear_anims()
Disassociates all anims from this collection.
- find_anim(name: str) AnimControl
Returns the
AnimControl
associated with the given name, or NULL if no such control has been associated.
- get_anim(n: int) AnimControl
Returns the nth
AnimControl
associated with this collection.
- get_anim_name(n: int) str
Returns the name of the nth
AnimControl
associated with this collection.
- get_frame(anim_name: str) int
Returns the current frame in the named animation, or 0 if the animation is not found.
- get_num_anims() int
Returns the number of
AnimControls
associated with this collection.
- get_num_frames(anim_name: str) int
Returns the total number of frames in the named animation, or 0 if the animation is not found.
- is_playing() bool
Returns true if the last-started animation is currently playing, false otherwise.
- is_playing(anim_name: str) bool
Returns true if the named animation is currently playing, false otherwise.
- loop(anim_name: str, restart: bool, from: float, to: float) bool
Starts the named animation looping.
- loop_all(restart: bool, from: float, to: float)
Starts all animations looping.
- play(anim_name: str, from: float, to: float) bool
Starts the named animation playing.
- play_all()
These functions operate on all anims at once.
- play_all(from: float, to: float)
Starts all animations playing.
- stop_all() bool
Stops all currently playing animations. Returns true if any animations were stopped, false if none were playing.
- store_anim(control: AnimControl, name: str)
Associates the given
AnimControl
with this collection under the given name. TheAnimControl
will remain associated until a newAnimControl
is associated with the same name later, or untilunbind_anim()
is called with this name.
- unbind_anim(name: str) bool
Removes the
AnimControl
associated with the given name, if any. Returns true if anAnimControl
was removed, false if there was noAnimControl
with the indicated name.
- which_anim_playing() str
Returns the name of the bound
AnimControl
currently playing, if any. If more than oneAnimControl
is currently playing, returns all of the names separated by spaces.