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.
__init__() → None¶
getNumAnims() → int¶
Returns the number of animation records in 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
getBasename(n: int) → str¶
Returns the basename stored for the nth animation record. See
getBaseFrameRate(n: int) → float¶
Returns the frame rate stored for the nth animation record.
getNumFrames(n: int) → int¶
Returns the number of frames stored for the nth animation record.
clearAnims() → None¶
Removes all animation records from the table.
removeAnim(n: int) → None¶
Removes the nth animation records from the table. This renumbers indexes for following animations.
addAnim(basename: str, base_frame_rate: float, num_frames: int) → None¶
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) → None¶
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.
output(out: ostream) → None¶
write(out: ostream, indent_level: int) → None¶