Skip to content
0.2.0-dev Download ZIP
91 lines ·3.5 KB Raw
1<?xml version="1.0" encoding="UTF-8" ?>
2<class name="AnimationLibrary" inherits="Resource" api_type="core" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
3 <brief_description>
4 Container for [Animation] resources.
5 </brief_description>
6 <description>
7 An animation library stores a set of animations accessible through [StringName] keys, for use with [AnimationPlayer] nodes.
8 </description>
9 <tutorials>
10 <link title="Animation tutorial index">$DOCS_URL/tutorials/animation/index.html</link>
11 </tutorials>
12 <methods>
13 <method name="add_animation">
14 <return type="int" enum="Error" />
15 <param index="0" name="name" type="StringName" />
16 <param index="1" name="animation" type="Animation" />
17 <description>
18 Adds the [param animation] to the library, accessible by the key [param name].
19 </description>
20 </method>
21 <method name="get_animation" qualifiers="const">
22 <return type="Animation" />
23 <param index="0" name="name" type="StringName" />
24 <description>
25 Returns the [Animation] with the key [param name]. If the animation does not exist, [code]null[/code] is returned and an error is logged.
26 </description>
27 </method>
28 <method name="get_animation_list" qualifiers="const">
29 <return type="StringName[]" />
30 <description>
31 Returns the keys for the [Animation]s stored in the library.
32 </description>
33 </method>
34 <method name="get_animation_list_size" qualifiers="const">
35 <return type="int" />
36 <description>
37 Returns the key count for the [Animation]s stored in the library.
38 </description>
39 </method>
40 <method name="has_animation" qualifiers="const">
41 <return type="bool" />
42 <param index="0" name="name" type="StringName" />
43 <description>
44 Returns [code]true[/code] if the library stores an [Animation] with [param name] as the key.
45 </description>
46 </method>
47 <method name="remove_animation">
48 <return type="void" />
49 <param index="0" name="name" type="StringName" />
50 <description>
51 Removes the [Animation] with the key [param name].
52 </description>
53 </method>
54 <method name="rename_animation">
55 <return type="void" />
56 <param index="0" name="name" type="StringName" />
57 <param index="1" name="newname" type="StringName" />
58 <description>
59 Changes the key of the [Animation] associated with the key [param name] to [param newname].
60 </description>
61 </method>
62 </methods>
63 <signals>
64 <signal name="animation_added">
65 <param index="0" name="anim_name" type="StringName" />
66 <description>
67 Emitted when an [Animation] is added, under the key [param anim_name].
68 </description>
69 </signal>
70 <signal name="animation_changed">
71 <param index="0" name="anim_name" type="StringName" />
72 <description>
73 Emitted when there's a change in one of the animations, e.g. tracks are added, moved or have changed paths. [param anim_name] is the key of the animation that was changed.
74 See also [signal Resource.changed], which this acts as a relay for.
75 </description>
76 </signal>
77 <signal name="animation_removed">
78 <param index="0" name="anim_name" type="StringName" />
79 <description>
80 Emitted when an [Animation] stored with the key [param anim_name] is removed.
81 </description>
82 </signal>
83 <signal name="animation_renamed">
84 <param index="0" name="old_name" type="StringName" />
85 <param index="1" name="new_name" type="StringName" />
86 <description>
87 Emitted when the key for an [Animation] is changed, from [param old_name] to [param new_name].
88 </description>
89 </signal>
90 </signals>
91</class>