Class reference

AnimationLibrary

Inherits Resource

Container for Animation resources.

Description

An animation library stores a set of animations accessible through StringName keys, for use with AnimationPlayer nodes.

Methods

int add_animation(StringName name, Animation animation)

Adds the animation to the library, accessible by the key name.

Animation get_animation(StringName name) const

Returns the Animation with the key name. If the animation does not exist, null is returned and an error is logged.

StringName[] get_animation_list() const

Returns the keys for the Animations stored in the library.

int get_animation_list_size() const

Returns the key count for the Animations stored in the library.

Signals

animation_changed(StringName name)

Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. name is the key of the animation that was changed. See also Resource.changed, which this acts as a relay for.

animation_removed(StringName name)

Emitted when an Animation stored with the key name is removed.

Tutorials

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.