AnimPreloadTable
from panda3d.core import AnimPreloadTable
- class AnimPreloadTable
Bases:
Bases:
CopyOnWriteObject
This table records data about a list of animations for a particular model, such as number of frames and frame rate. It’s used for implementating asynchronous binding.
This table is normally built by an offline tool, such as egg-optchar.
Inheritance diagram
- __init__()
- add_anim(basename: str, base_frame_rate: float, num_frames: int)
Adds a new animation record to the table. If there is already a record of this name, no operation is performed (the original record is unchanged). See
find_anim()
. This will invalidate existing index numbers.
- add_anims_from(other: AnimPreloadTable)
Copies the animation records from the other table into this one. If a given record name exists in both tables, the record in this one supercedes.
- clear_anims()
Removes all animation records from the table.
- find_anim(basename: str) int
Returns the index number in the table of the animation record with the indicated name, or -1 if the name is not present. By convention, the basename is the filename of the egg or bam file, without the directory part and without the extension. That is, it is
Filename.get_basename_wo_extension()
.
- get_basename(n: int) str
Returns the basename stored for the nth animation record. See
find_anim()
.
- static get_class_type() TypeHandle