[DOCS] AnimationTreePlayer props/members/methods

This commit is contained in:
Will Nations 2017-12-05 21:25:37 -06:00
parent faaa012b84
commit c80d6ed439
2 changed files with 42 additions and 8 deletions

View file

@ -4,7 +4,7 @@
Animation Player that uses a node graph for the blending.
</brief_description>
<description>
Animation Player that uses a node graph for the blending. This kind of player is very useful when animating character or other skeleton based rigs, because it can combine several animations to form a desired pose.
A node graph tool for blending multiple animations bound to an [AnimationPlayer]. Especially useful for animating characters or other skeleton-based rigs. It can combine several animations to form a desired pose.
</description>
<tutorials>
</tutorials>
@ -19,7 +19,7 @@
<argument index="1" name="id" type="String">
</argument>
<description>
Add a node of a given type in the graph with given id.
Adds a [code]type[/code] node to the graph with name [code]id[/code].
</description>
</method>
<method name="advance">
@ -28,6 +28,7 @@
<argument index="0" name="delta" type="float">
</argument>
<description>
Shifts position in the animation timeline. Delta is the time in seconds to shift.
</description>
</method>
<method name="animation_node_get_animation" qualifiers="const">
@ -36,7 +37,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns an animation given its name.
Returns the [AnimationPlayer]'s animation bound to the [code]AnimationTreePlayer[/code]'s animation node with name [code]id[/code].
</description>
</method>
<method name="animation_node_get_master_animation" qualifiers="const">
@ -45,6 +46,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns the name of the [member master_player]'s animation bound to this animation node.
</description>
</method>
<method name="animation_node_set_animation">
@ -55,7 +57,7 @@
<argument index="1" name="animation" type="Animation">
</argument>
<description>
Set the animation for an animation node.
Binds a new animation from the [member master_player] to the [code]AnimationTreePlayer[/code]'s animation node with name [code]id[/code].
</description>
</method>
<method name="animation_node_set_filter_path">
@ -68,6 +70,7 @@
<argument index="2" name="enable" type="bool">
</argument>
<description>
If [code]enable[/code] is [code]true[/code], the animation node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="animation_node_set_master_animation">
@ -78,6 +81,7 @@
<argument index="1" name="source" type="String">
</argument>
<description>
Binds the animation named [code]source[/code] from [member master_player] to the animation node [code]id[/code]. Recalculates caches.
</description>
</method>
<method name="are_nodes_connected" qualifiers="const">
@ -123,6 +127,7 @@
<argument index="2" name="enable" type="bool">
</argument>
<description>
If [code]enable[/code] is [code]true[/code], the blend2 node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="blend3_node_get_amount" qualifiers="const">
@ -199,6 +204,7 @@
<return type="NodePath">
</return>
<description>
Returns the path to the [AnimationPlayer] from which this [code]AnimationTreePlayer[/code] binds animations to animation nodes.
</description>
</method>
<method name="get_node_list">
@ -423,6 +429,7 @@
<argument index="2" name="enable" type="bool">
</argument>
<description>
If [code]enable[/code] is [code]true[/code], the oneshot node with ID [code]id[/code] turns off the track modifying the property at [code]path[/code]. The modified node's children continue to animate.
</description>
</method>
<method name="oneshot_node_start">
@ -440,13 +447,14 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Stops a OneShot node given its name.
Stops the OneShot node with name [code]id[/code].
</description>
</method>
<method name="recompute_caches">
<return type="void">
</return>
<description>
Manually recalculates the cache of track information generated from animation nodes. Needed when external sources modify the animation nodes' state.
</description>
</method>
<method name="remove_node">
@ -455,6 +463,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Removes the animation node with name [code]id[/code].
</description>
</method>
<method name="reset">
@ -496,7 +505,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns time scale value of a TimeScale node given its name.
Returns time scale value of the TimeScale node with name [code]id[/code].
</description>
</method>
<method name="timescale_node_set_scale">
@ -507,7 +516,7 @@
<argument index="1" name="scale" type="float">
</argument>
<description>
Sets time scale value of a TimeScale node given its name and value.
Sets the time scale of the TimeScale node with name [code]id[/code] to [code]scale[/code].
</description>
</method>
<method name="timeseek_node_seek">
@ -518,7 +527,7 @@
<argument index="1" name="seconds" type="float">
</argument>
<description>
Sets time seek value of a TimeSeek node given its name and value.
Sets the time seek value of the TimeSeek node with name [code]id[/code] to [code]seconds[/code]
</description>
</method>
<method name="transition_node_delete_input">
@ -529,6 +538,7 @@
<argument index="1" name="input_idx" type="int">
</argument>
<description>
Deletes the input at [code]input_idx[/code] for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_get_current" qualifiers="const">
@ -537,6 +547,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns the index of the currently evaluated input for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_get_input_count" qualifiers="const">
@ -545,6 +556,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns the number of inputs for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_get_xfade_time" qualifiers="const">
@ -553,6 +565,7 @@
<argument index="0" name="id" type="String">
</argument>
<description>
Returns the cross fade time for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_has_input_auto_advance" qualifiers="const">
@ -563,6 +576,7 @@
<argument index="1" name="input_idx" type="int">
</argument>
<description>
Returns [code]true[/code] if the input at [code]input_idx[/code] on transition node with name [code]id[/code] is set to automatically advance to the next input upon completion.
</description>
</method>
<method name="transition_node_set_current">
@ -573,6 +587,7 @@
<argument index="1" name="input_idx" type="int">
</argument>
<description>
The transition node with name [code]id[/code] sets its current input at [code]input_idx[/code].
</description>
</method>
<method name="transition_node_set_input_auto_advance">
@ -585,6 +600,7 @@
<argument index="2" name="enable" type="bool">
</argument>
<description>
The transition node with name [code]id[/code] advances to its next input automatically when the input at [code]input_idx[/code] completes.
</description>
</method>
<method name="transition_node_set_input_count">
@ -595,6 +611,7 @@
<argument index="1" name="count" type="int">
</argument>
<description>
Resizes the number of inputs available for the transition node with name [code]id[/code].
</description>
</method>
<method name="transition_node_set_xfade_time">
@ -605,11 +622,22 @@
<argument index="1" name="time_sec" type="float">
</argument>
<description>
The transition node with name [code]id[/code] sets its cross fade time to [code]time_sec[/code].
</description>
</method>
</methods>
<members>
<member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationTreePlayer.AnimationProcessMode">
The thread in which to update animations. Default value: [enum ANIMATION_PROCESS_IDLE].
</member>
<member name="master_player" type="NodePath" setter="set_master_player" getter="get_master_player">
The path to the [AnimationPlayer] from which this [code]AnimationTreePlayer[/code] binds animations to animation nodes.
</member>
<member name="base_path" type="NodePath" setter="set_base_path" getter="get_base_path">
The node from which to relatively access other nodes. Default value: [code]".."[/code].
</member>
<member name="active" type="bool" setter="set_active" getter="is_active">
If [code]true[/code] the [code]AnimationTreePlayer[/code] is able to play animations. Default value: [code]false[/code].
</member>
</members>
<constants>
@ -644,8 +672,10 @@
Transition node.
</constant>
<constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
Process animation during the physics process. This is especially useful when animating physics bodies.
</constant>
<constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
Process animation during the idle process.
</constant>
</constants>
</class>

View file

@ -1796,6 +1796,10 @@ void AnimationTreePlayer::_bind_methods() {
ADD_GROUP("Playback", "playback_");
ADD_PROPERTY(PropertyInfo(Variant::INT, "playback_process_mode", PROPERTY_HINT_ENUM, "Physics,Idle"), "set_animation_process_mode", "get_animation_process_mode");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "master_player"), "set_master_player", "get_master_player");
ADD_PROPERTY(PropertyInfo(Variant::NODE_PATH, "base_path"), "set_base_path", "get_base_path");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "active"), "set_active", "is_active");
BIND_ENUM_CONSTANT(NODE_OUTPUT);
BIND_ENUM_CONSTANT(NODE_ANIMATION);
BIND_ENUM_CONSTANT(NODE_ONESHOT);