You are reading the
(unstable) version of this documentation, which may document features not available
or compatible with Godot 3.x.
Checking the stable version of the documentation...
Work in progress
Godot documentation is being updated to reflect the latest changes in version
4.0. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
The contents of this page are up to date. If you can still find outdated information, please open an issue.
Inherits: Resource < RefCounted < Object
Container for Animation resources.
An animation library stores a set of animations accessible through StringName keys, for use with AnimationPlayer nodes.
add_animation ( StringName name, Animation animation )
get_animation ( StringName name ) const
get_animation_list ( ) const
has_animation ( StringName name ) const
remove_animation ( StringName name )
rename_animation ( StringName name, StringName newname )
animation_added ( StringName name )
Emitted when an Animation is added, under the key
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.
animation_renamed ( StringName name, StringName to_name )
Emitted when the key for an Animation is changed, from
Dictionary _data =
There is currently no description for this property. Please help us by contributing one!
Error add_animation ( StringName name, Animation animation )
animation to the library, accessible by the key
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.
bool has_animation ( StringName name ) const
true if the library stores an Animation with
name as the key.
void remove_animation ( StringName name )
Removes the Animation with the key
void rename_animation ( StringName name, StringName newname )
Changes the key of the Animation associated with the key