Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LOTS of missing docs #36773

Merged
merged 1 commit into from
Mar 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions doc/classes/AnimatedSprite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@
If [code]true[/code], the [member animation] is currently playing.
</member>
<member name="shininess" type="float" setter="set_shininess" getter="get_shininess" default="1.0">
Strength of the specular light effect of this [AnimatedSprite].
</member>
<member name="specular_color" type="Color" setter="set_specular_color" getter="get_specular_color" default="Color( 1, 1, 1, 1 )">
The color of the specular light effect.
</member>
<member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0">
The animation speed is multiplied by this value.
Expand Down
29 changes: 28 additions & 1 deletion doc/classes/Animation.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
animation.track_insert_key(track_index, 0.0, 0)
animation.track_insert_key(track_index, 0.5, 100)
[/codeblock]
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back.
Animations are just data containers, and must be added to nodes such as an [AnimationPlayer] to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check [enum TrackType] to see available types.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/index.html</link>
Expand All @@ -39,6 +39,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_insert_key">
Expand All @@ -51,6 +52,7 @@
<argument index="2" name="animation" type="StringName">
</argument>
<description>
Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="animation_track_set_key_animation">
Expand All @@ -63,6 +65,7 @@
<argument index="2" name="animation" type="StringName">
</argument>
<description>
Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track.
</description>
</method>
<method name="audio_track_get_key_end_offset" qualifiers="const">
Expand All @@ -73,6 +76,8 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
End offset is the number of seconds cut off at the ending of the audio stream.
</description>
</method>
<method name="audio_track_get_key_start_offset" qualifiers="const">
Expand All @@ -83,6 +88,8 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
Start offset is the number of seconds cut off at the beginning of the audio stream.
</description>
</method>
<method name="audio_track_get_key_stream" qualifiers="const">
Expand All @@ -93,6 +100,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_insert_key">
Expand All @@ -109,6 +117,8 @@
<argument index="4" name="end_offset" type="float" default="0">
</argument>
<description>
Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track.
[code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending.
</description>
</method>
<method name="audio_track_set_key_end_offset">
Expand All @@ -121,6 +131,7 @@
<argument index="2" name="offset" type="float">
</argument>
<description>
Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_start_offset">
Expand All @@ -133,6 +144,7 @@
<argument index="2" name="offset" type="float">
</argument>
<description>
Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="audio_track_set_key_stream">
Expand All @@ -145,6 +157,7 @@
<argument index="2" name="stream" type="Resource">
</argument>
<description>
Sets the stream of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track.
</description>
</method>
<method name="bezier_track_get_key_in_handle" qualifiers="const">
Expand All @@ -155,6 +168,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_out_handle" qualifiers="const">
Expand All @@ -165,6 +179,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_get_key_value" qualifiers="const">
Expand All @@ -175,6 +190,7 @@
<argument index="1" name="key_idx" type="int">
</argument>
<description>
Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_insert_key">
Expand All @@ -191,6 +207,8 @@
<argument index="4" name="out_handle" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track.
[code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point.
</description>
</method>
<method name="bezier_track_interpolate" qualifiers="const">
Expand All @@ -201,6 +219,7 @@
<argument index="1" name="time" type="float">
</argument>
<description>
Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_in_handle">
Expand All @@ -213,6 +232,7 @@
<argument index="2" name="in_handle" type="Vector2">
</argument>
<description>
Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_out_handle">
Expand All @@ -225,6 +245,7 @@
<argument index="2" name="out_handle" type="Vector2">
</argument>
<description>
Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="bezier_track_set_key_value">
Expand All @@ -237,6 +258,7 @@
<argument index="2" name="value" type="float">
</argument>
<description>
Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track.
</description>
</method>
<method name="clear">
Expand Down Expand Up @@ -675,6 +697,7 @@
<signals>
<signal name="tracks_changed">
<description>
Emitted when there's a change in the list of tracks, e.g. tracks are added, moved or have changed paths.
</description>
</signal>
</signals>
Expand All @@ -689,10 +712,13 @@
Method tracks call functions with given arguments per key.
</constant>
<constant name="TYPE_BEZIER" value="3" enum="TrackType">
Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a [Color]).
</constant>
<constant name="TYPE_AUDIO" value="4" enum="TrackType">
Audio tracks are used to play an audio stream with either type of [AudioStreamPlayer]. The stream can be trimmed and previewed in the animation.
</constant>
<constant name="TYPE_ANIMATION" value="5" enum="TrackType">
Animation tracks play animations in other [AnimationPlayer] nodes.
</constant>
<constant name="INTERPOLATION_NEAREST" value="0" enum="InterpolationType">
No interpolation (nearest value).
Expand All @@ -713,6 +739,7 @@
Update at the keyframes.
</constant>
<constant name="UPDATE_CAPTURE" value="3" enum="UpdateMode">
Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
</constant>
</constants>
</class>
18 changes: 18 additions & 0 deletions doc/classes/AnimationNodeBlendTree.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeBlendTree" inherits="AnimationRootNode" version="4.0">
<brief_description>
[AnimationTree] node resource that contains many blend type nodes.
</brief_description>
<description>
This node may contain a sub-tree of any other blend type nodes, such as mix, blend2, blend3, one shot, etc. This is one of the most commonly used roots.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand All @@ -18,6 +20,7 @@
<argument index="2" name="position" type="Vector2" default="Vector2( 0, 0 )">
</argument>
<description>
Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later.
</description>
</method>
<method name="connect_node">
Expand All @@ -30,6 +33,7 @@
<argument index="2" name="output_node" type="StringName">
</argument>
<description>
Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code].
</description>
</method>
<method name="disconnect_node">
Expand All @@ -40,6 +44,7 @@
<argument index="1" name="input_index" type="int">
</argument>
<description>
Disconnects the node connected to the specified input.
</description>
</method>
<method name="get_node" qualifiers="const">
Expand All @@ -48,6 +53,7 @@
<argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="get_node_position" qualifiers="const">
Expand All @@ -56,6 +62,7 @@
<argument index="0" name="name" type="StringName">
</argument>
<description>
Returns the position of the sub-node with the specified [code]name[/code].
</description>
</method>
<method name="has_node" qualifiers="const">
Expand All @@ -64,6 +71,7 @@
<argument index="0" name="name" type="StringName">
</argument>
<description>
Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists.
</description>
</method>
<method name="remove_node">
Expand All @@ -72,6 +80,7 @@
<argument index="0" name="name" type="StringName">
</argument>
<description>
Removes a sub-node.
</description>
</method>
<method name="rename_node">
Expand All @@ -82,6 +91,7 @@
<argument index="1" name="new_name" type="StringName">
</argument>
<description>
Changes the name of a sub-node.
</description>
</method>
<method name="set_node_position">
Expand All @@ -92,25 +102,33 @@
<argument index="1" name="position" type="Vector2">
</argument>
<description>
Modifies the position of a sub-node.
</description>
</method>
</methods>
<members>
<member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2( 0, 0 )">
The global offset of all sub-nodes.
</member>
</members>
<constants>
<constant name="CONNECTION_OK" value="0">
The connection was successful.
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT" value="1">
The input node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_NO_INPUT_INDEX" value="2">
The specified input port is out of range.
</constant>
<constant name="CONNECTION_ERROR_NO_OUTPUT" value="3">
The output node is [code]null[/code].
</constant>
<constant name="CONNECTION_ERROR_SAME_NODE" value="4">
Input and output nodes are the same.
</constant>
<constant name="CONNECTION_ERROR_CONNECTION_EXISTS" value="5">
The specified connection already exists.
</constant>
</constants>
</class>
5 changes: 5 additions & 0 deletions doc/classes/AnimationNodeOneShot.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOneShot" inherits="AnimationNode" version="4.0">
<brief_description>
Plays an animation once in [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. This node will execute a sub-animation and return once it finishes. Blend times for fading in and out can be customized, as well as filters.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand All @@ -25,10 +27,13 @@
</methods>
<members>
<member name="autorestart" type="bool" setter="set_autorestart" getter="has_autorestart" default="false">
If [code]true[/code], the sub-animation will restart automatically after finishing.
</member>
<member name="autorestart_delay" type="float" setter="set_autorestart_delay" getter="get_autorestart_delay" default="1.0">
The delay after which the automatic restart is triggered, in seconds.
</member>
<member name="autorestart_random_delay" type="float" setter="set_autorestart_random_delay" getter="get_autorestart_random_delay" default="0.0">
If [member autorestart] is [code]true[/code], a random additional delay (in seconds) between 0 and this value will be added to [member autorestart_delay].
</member>
<member name="fadein_time" type="float" setter="set_fadein_time" getter="get_fadein_time" default="0.1">
akien-mga marked this conversation as resolved.
Show resolved Hide resolved
</member>
Expand Down
1 change: 1 addition & 0 deletions doc/classes/AnimationNodeOutput.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeOutput" inherits="AnimationNode" version="4.0">
<brief_description>
Generic output node to be added to [AnimationNodeBlendTree].
</brief_description>
<description>
akien-mga marked this conversation as resolved.
Show resolved Hide resolved
</description>
Expand Down
2 changes: 2 additions & 0 deletions doc/classes/AnimationNodeTimeScale.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTimeScale" inherits="AnimationNode" version="4.0">
<brief_description>
A time-scaling animation node to be used with [AnimationTree].
</brief_description>
<description>
Allows scaling the speed of the animation (or reversing it) in any children nodes. Setting it to 0 will pause the animation.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand Down
2 changes: 2 additions & 0 deletions doc/classes/AnimationNodeTimeSeek.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTimeSeek" inherits="AnimationNode" version="4.0">
<brief_description>
A time-seeking animation node to be used with [AnimationTree].
</brief_description>
<description>
This node can be used to cause a seek command to happen to any sub-children of the graph. After setting the time, this value returns to -1.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand Down
4 changes: 4 additions & 0 deletions doc/classes/AnimationNodeTransition.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?>
<class name="AnimationNodeTransition" inherits="AnimationNode" version="4.0">
<brief_description>
A generic animation transition node for [AnimationTree].
</brief_description>
<description>
Simple state machine for cases which don't require a more advanced [AnimationNodeStateMachine]. Animations can be connected to the inputs and transition times can be specified.
</description>
<tutorials>
<link>https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link>
Expand Down Expand Up @@ -47,8 +49,10 @@
</methods>
<members>
<member name="input_count" type="int" setter="set_enabled_inputs" getter="get_enabled_inputs" default="0">
The number of available input ports for this node.
</member>
<member name="xfade_time" type="float" setter="set_cross_fade_time" getter="get_cross_fade_time" default="0.0">
Cross-fading time (in seconds) between each animation connected to the inputs.
</member>
</members>
<constants>
Expand Down
Loading