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

Inheritance diagram of AnimPreloadTable

__init__()
addAnim(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 findAnim(). This will invalidate existing index numbers.

addAnimsFrom(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.

clearAnims()

Removes all animation records from the table.

findAnim(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.getBasenameWoExtension().

getBaseFrameRate(n: int) float

Returns the frame rate stored for the nth animation record.

getBasename(n: int) str

Returns the basename stored for the nth animation record. See findAnim().

static getClassType() TypeHandle
getNumAnims() int

Returns the number of animation records in the table.

getNumFrames(n: int) int

Returns the number of frames stored for the nth animation record.

output(out: ostream)
removeAnim(n: int)

Removes the nth animation records from the table. This renumbers indexes for following animations.

write(out: ostream, indent_level: int)