summaryrefslogtreecommitdiff
path: root/doc/classes
diff options
context:
space:
mode:
authorreduz <reduzio@gmail.com>2022-04-07 13:49:28 +0200
committerreduz <reduzio@gmail.com>2022-04-11 12:51:54 +0200
commit6f401439f849c0c99d8455c607fdef28750ee889 (patch)
tree3d491feed810e8be2483bce0df2d86626767e7d0 /doc/classes
parentb80a6abaeb8437b75d987952bb829af425f6614e (diff)
Implement Animation Libraries
* Instead of containing single animations, AnimationPlayer now contains libraries. * Libraries, in turn, contain the animations. This paves the way for implementing the possibility of importing scenes as animation libraries, finally allowing to import animations separate from the 3D models. Missing (will be done on separate PRs): * Make it possible to import scenes (dae/fbx/gltf) as animation libraries. * Make it possible for AnimationTree to import animation libraries on its own, so it does not rely on AnimationPlayer for everything.
Diffstat (limited to 'doc/classes')
-rw-r--r--doc/classes/AnimationLibrary.xml70
-rw-r--r--doc/classes/AnimationPlayer.xml34
-rw-r--r--doc/classes/OptionButton.xml20
-rw-r--r--doc/classes/Tree.xml3
4 files changed, 118 insertions, 9 deletions
diff --git a/doc/classes/AnimationLibrary.xml b/doc/classes/AnimationLibrary.xml
new file mode 100644
index 0000000000..0a731edadd
--- /dev/null
+++ b/doc/classes/AnimationLibrary.xml
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<class name="AnimationLibrary" inherits="Resource" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
+ <brief_description>
+ </brief_description>
+ <description>
+ </description>
+ <tutorials>
+ </tutorials>
+ <methods>
+ <method name="add_animation">
+ <return type="int" enum="Error" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="animation" type="Animation" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation" qualifiers="const">
+ <return type="Animation" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_list" qualifiers="const">
+ <return type="StringName[]" />
+ <description>
+ </description>
+ </method>
+ <method name="has_animation" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="remove_animation">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="rename_animation">
+ <return type="void" />
+ <argument index="0" name="name" type="StringName" />
+ <argument index="1" name="newname" type="StringName" />
+ <description>
+ </description>
+ </method>
+ </methods>
+ <members>
+ <member name="_data" type="Dictionary" setter="_set_data" getter="_get_data" default="{}">
+ </member>
+ </members>
+ <signals>
+ <signal name="animation_added">
+ <argument index="0" name="name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ <signal name="animation_removed">
+ <argument index="0" name="name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ <signal name="animation_renamed">
+ <argument index="0" name="name" type="Animation" />
+ <argument index="1" name="to_name" type="Animation" />
+ <description>
+ </description>
+ </signal>
+ </signals>
+</class>
diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml
index b1d04ce1f2..625cf3c47c 100644
--- a/doc/classes/AnimationPlayer.xml
+++ b/doc/classes/AnimationPlayer.xml
@@ -14,12 +14,11 @@
<link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
</tutorials>
<methods>
- <method name="add_animation">
+ <method name="add_animation_library">
<return type="int" enum="Error" />
<argument index="0" name="name" type="StringName" />
- <argument index="1" name="animation" type="Animation" />
+ <argument index="1" name="library" type="AnimationLibrary" />
<description>
- Adds [code]animation[/code] to the player accessible with the key [code]name[/code].
</description>
</method>
<method name="advance">
@@ -63,6 +62,12 @@
Returns the name of [code]animation[/code] or an empty string if not found.
</description>
</method>
+ <method name="find_animation_library" qualifiers="const">
+ <return type="StringName" />
+ <argument index="0" name="animation" type="Animation" />
+ <description>
+ </description>
+ </method>
<method name="get_animation" qualifiers="const">
<return type="Animation" />
<argument index="0" name="name" type="StringName" />
@@ -70,6 +75,17 @@
Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found.
</description>
</method>
+ <method name="get_animation_library" qualifiers="const">
+ <return type="AnimationLibrary" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
+ <method name="get_animation_library_list" qualifiers="const">
+ <return type="StringName[]" />
+ <description>
+ </description>
+ </method>
<method name="get_animation_list" qualifiers="const">
<return type="PackedStringArray" />
<description>
@@ -103,6 +119,12 @@
Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code].
</description>
</method>
+ <method name="has_animation_library" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="name" type="StringName" />
+ <description>
+ </description>
+ </method>
<method name="is_playing" qualifiers="const">
<return type="bool" />
<description>
@@ -138,19 +160,17 @@
[b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow.
</description>
</method>
- <method name="remove_animation">
+ <method name="remove_animation_library">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<description>
- Removes the animation with key [code]name[/code].
</description>
</method>
- <method name="rename_animation">
+ <method name="rename_animation_library">
<return type="void" />
<argument index="0" name="name" type="StringName" />
<argument index="1" name="newname" type="StringName" />
<description>
- Renames an existing animation with key [code]name[/code] to [code]newname[/code].
</description>
</method>
<method name="seek">
diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml
index 25e41116a2..b7145ab923 100644
--- a/doc/classes/OptionButton.xml
+++ b/doc/classes/OptionButton.xml
@@ -30,8 +30,9 @@
</method>
<method name="add_separator">
<return type="void" />
+ <argument index="0" name="text" type="String" default="&quot;&quot;" />
<description>
- Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end.
+ Adds a separator to the list of items. Separators help to group items, and can optionally be given a [code]text[/code] header. A separator also gets an index assigned, and is appended at the end of the item list.
</description>
</method>
<method name="clear">
@@ -89,6 +90,12 @@
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member Window.visible] property.
</description>
</method>
+ <method name="get_selectable_item" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="from_last" type="bool" default="false" />
+ <description>
+ </description>
+ </method>
<method name="get_selected_id" qualifiers="const">
<return type="int" />
<description>
@@ -101,6 +108,11 @@
Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata].
</description>
</method>
+ <method name="has_selectable_items" qualifiers="const">
+ <return type="bool" />
+ <description>
+ </description>
+ </method>
<method name="is_item_disabled" qualifiers="const">
<return type="bool" />
<argument index="0" name="idx" type="int" />
@@ -108,6 +120,12 @@
Returns [code]true[/code] if the item at index [code]idx[/code] is disabled.
</description>
</method>
+ <method name="is_item_separator" qualifiers="const">
+ <return type="bool" />
+ <argument index="0" name="idx" type="int" />
+ <description>
+ </description>
+ </method>
<method name="remove_item">
<return type="void" />
<argument index="0" name="idx" type="int" />
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index b8c39bee49..5abec4b437 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -179,8 +179,9 @@
<return type="Rect2" />
<argument index="0" name="item" type="TreeItem" />
<argument index="1" name="column" type="int" default="-1" />
+ <argument index="2" name="button_index" type="int" default="-1" />
<description>
- Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns.
+ Returns the rectangle area for the specified [TreeItem]. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. If a button index is specified, the rectangle of that button will be returned.
</description>
</method>
<method name="get_item_at_position" qualifiers="const">