Skip to content

Commit

Permalink
Sync classref with current source
Browse files Browse the repository at this point in the history
  • Loading branch information
akien-mga committed Jan 23, 2020
1 parent 2e4df1e commit acb2260
Show file tree
Hide file tree
Showing 125 changed files with 1,868 additions and 2,258 deletions.
4 changes: 2 additions & 2 deletions classes/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -1671,10 +1671,10 @@ Since :ref:`OK<class_@GlobalScope_constant_OK>` has value 0, and all other failu
::

var err = method_that_returns_error()
if (err != OK):
if err != OK:
print("Failure!)
# Or, equivalent:
if (err):
if err:
print("Still failing!)

- **FAILED** = **1** --- Generic error.
Expand Down
19 changes: 11 additions & 8 deletions classes/class_animationnode.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ Base resource for :ref:`AnimationTree<class_AnimationTree>` nodes. In general, i

Inherit this when creating nodes mainly for use in :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`, otherwise :ref:`AnimationRootNode<class_AnimationRootNode>` should be used instead.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down Expand Up @@ -132,23 +137,23 @@ Method Descriptions

- void **add_input** **(** :ref:`String<class_String>` name **)**

Adds an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`
Adds an input to the node. This is only useful for nodes created for use in an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`.

----

.. _class_AnimationNode_method_blend_animation:

- void **blend_animation** **(** :ref:`String<class_String>` animation, :ref:`float<class_float>` time, :ref:`float<class_float>` delta, :ref:`bool<class_bool>` seeked, :ref:`float<class_float>` blend **)**

Blend an animation by "blend" amount (name must be valid in the linked :ref:`AnimationPlayer<class_AnimationPlayer>`). A time and delta mas be passed, as well as whether seek happened.
Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer<class_AnimationPlayer>`). A ``time`` and ``delta`` may be passed, as well as whether ``seek`` happened.

----

.. _class_AnimationNode_method_blend_input:

- :ref:`float<class_float>` **blend_input** **(** :ref:`int<class_int>` input_index, :ref:`float<class_float>` time, :ref:`bool<class_bool>` seek, :ref:`float<class_float>` blend, :ref:`FilterAction<enum_AnimationNode_FilterAction>` filter=0, :ref:`bool<class_bool>` optimize=true **)**

Blend an input. This is only useful for nodes created for an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Time is a delta, unless "seek" is ``true``, in which case it is absolute. A filter mode may be optionally passed.
Blend an input. This is only useful for nodes created for an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction<enum_AnimationNode_FilterAction>` for options).

----

Expand Down Expand Up @@ -244,13 +249,11 @@ Returns ``true`` whether a given path is filtered.

- void **process** **(** :ref:`float<class_float>` time, :ref:`bool<class_bool>` seek **)** virtual

Called when a custom node is processed. The argument "time" is relative, unless "seek" is ``true`` (in which case it is absolute).

Here, call the :ref:`blend_input<class_AnimationNode_method_blend_input>`, :ref:`blend_node<class_AnimationNode_method_blend_node>` or :ref:`blend_animation<class_AnimationNode_method_blend_animation>` functions.
User-defined callback called when a custom node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute.

You can also use :ref:`get_parameter<class_AnimationNode_method_get_parameter>` and :ref:`set_parameter<class_AnimationNode_method_set_parameter>` to modify local memory.
Here, call the :ref:`blend_input<class_AnimationNode_method_blend_input>`, :ref:`blend_node<class_AnimationNode_method_blend_node>` or :ref:`blend_animation<class_AnimationNode_method_blend_animation>` functions. You can also use :ref:`get_parameter<class_AnimationNode_method_get_parameter>` and :ref:`set_parameter<class_AnimationNode_method_set_parameter>` to modify local memory.

This function returns the time left for the current animation to finish (if unsure, just pass the value from the main blend being called).
This function should return the time left for the current animation to finish (if unsure, pass the value from the main blend being called).

----

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeadd2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Description

A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Blends two animations additively based on an amount value in the ``[0.0, 1.0]`` range.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeadd3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ This node has three inputs:

- A +add animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeanimation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Description

A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Only features one output set using the :ref:`animation<class_AnimationNodeAnimation_property_animation>` property. Use it as an input for :ref:`AnimationNode<class_AnimationNode>` that blend animations together.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeblend2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ Description

A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTree>`. Blends two animations linearly based on an amount value in the ``[0.0, 1.0]`` range.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeblend3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ This node has three inputs:

- A +blend animation to blend with when the blend amount is in the ``[0.0, 1.0]`` range

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
13 changes: 9 additions & 4 deletions classes/class_animationnodeblendspace1d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,15 @@ A resource to add to an :ref:`AnimationNodeBlendTree<class_AnimationNodeBlendTre

This is a virtual axis on which you can add any type of :ref:`AnimationNode<class_AnimationNode>` using :ref:`add_blend_point<class_AnimationNodeBlendSpace1D_method_add_blend_point>`.

Outputs the linear blend of the two ``AnimationNode`` closest to the node's current ``value``.
Outputs the linear blend of the two :ref:`AnimationNode<class_AnimationNode>`\ s closest to the node's current value.

You can set the extents of the axis using the :ref:`min_space<class_AnimationNodeBlendSpace1D_property_min_space>` and :ref:`max_space<class_AnimationNodeBlendSpace1D_property_max_space>`.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down Expand Up @@ -128,7 +133,7 @@ Method Descriptions

- void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`float<class_float>` pos, :ref:`int<class_int>` at_index=-1 **)**

Adds a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array.
Adds a new point that represents a ``node`` on the virtual axis at a given position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array.

----

Expand All @@ -144,7 +149,7 @@ Returns the number of points on the blend axis.

- :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** const

Returns the ``AnimationNode`` referenced by the point at index ``point``.
Returns the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.

----

Expand All @@ -168,7 +173,7 @@ Removes the point at index ``point`` from the blend axis.

- void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**

Changes the AnimationNode referenced by the point at index ``point``.
Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.

----

Expand Down
15 changes: 10 additions & 5 deletions classes/class_animationnodeblendspace2d.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AnimationNodeBlendSpace2D

**Inherits:** :ref:`AnimationRootNode<class_AnimationRootNode>` **<** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`

Blends linearly between three :ref:`AnimationNode<class_AnimationNode>` of any type placed in a 2d space.
Blends linearly between three :ref:`AnimationNode<class_AnimationNode>` of any type placed in a 2D space.

Description
-----------
Expand All @@ -22,6 +22,11 @@ This node allows you to blend linearly between three animations using a :ref:`Ve

You can add vertices to the blend space with :ref:`add_blend_point<class_AnimationNodeBlendSpace2D_method_add_blend_point>` and automatically triangulate it by setting :ref:`auto_triangles<class_AnimationNodeBlendSpace2D_property_auto_triangles>` to ``true``. Otherwise, use :ref:`add_triangle<class_AnimationNodeBlendSpace2D_method_add_triangle>` and :ref:`remove_triangle<class_AnimationNodeBlendSpace2D_method_remove_triangle>` to create up the blend space by hand.

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down Expand Up @@ -216,15 +221,15 @@ Method Descriptions

- void **add_blend_point** **(** :ref:`AnimationRootNode<class_AnimationRootNode>` node, :ref:`Vector2<class_Vector2>` pos, :ref:`int<class_int>` at_index=-1 **)**

Adds a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array.
Adds a new point that represents a ``node`` at the position set by ``pos``. You can insert it at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array.

----

.. _class_AnimationNodeBlendSpace2D_method_add_triangle:

- void **add_triangle** **(** :ref:`int<class_int>` x, :ref:`int<class_int>` y, :ref:`int<class_int>` z, :ref:`int<class_int>` at_index=-1 **)**

Creates a new triangle using three points ``x``, ``y``, and ``z``. Triangles can overlap. You can insert the triangle at a specific index using the ``at_index`` argument. If you use the default value for ``at_index`` , the point is inserted at the end of the blend points array.
Creates a new triangle using three points ``x``, ``y``, and ``z``. Triangles can overlap. You can insert the triangle at a specific index using the ``at_index`` argument. If you use the default value for ``at_index``, the point is inserted at the end of the blend points array.

----

Expand All @@ -240,7 +245,7 @@ Returns the number of points in the blend space.

- :ref:`AnimationRootNode<class_AnimationRootNode>` **get_blend_point_node** **(** :ref:`int<class_int>` point **)** const

Returns the ``AnimationRootNode`` referenced by the point at index ``point``.
Returns the :ref:`AnimationRootNode<class_AnimationRootNode>` referenced by the point at index ``point``.

----

Expand Down Expand Up @@ -288,7 +293,7 @@ Removes the triangle at index ``triangle`` from the blend space.

- void **set_blend_point_node** **(** :ref:`int<class_int>` point, :ref:`AnimationRootNode<class_AnimationRootNode>` node **)**

Changes the AnimationNode referenced by the point at index ``point``.
Changes the :ref:`AnimationNode<class_AnimationNode>` referenced by the point at index ``point``.

----

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeblendtree.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ AnimationNodeBlendTree



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeoneshot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ AnimationNodeOneShot



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodeoutput.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ AnimationNodeOutput



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

11 changes: 8 additions & 3 deletions classes/class_animationnodestatemachine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ State machine for control of animations.
Description
-----------

Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the AnimationNodeStateMachinePlayback object from the :ref:`AnimationTree<class_AnimationTree>` node to control it programmatically.
Contains multiple nodes representing animation states, connected in a graph. Node transitions can be configured to happen automatically or via code, using a shortest-path algorithm. Retrieve the :ref:`AnimationNodeStateMachinePlayback<class_AnimationNodeStateMachinePlayback>` object from the :ref:`AnimationTree<class_AnimationTree>` node to control it programmatically.

**Example:**

Expand All @@ -25,6 +25,11 @@ Contains multiple nodes representing animation states, connected in a graph. Nod
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Methods
-------

Expand Down Expand Up @@ -201,15 +206,15 @@ Deletes the given node from the graph.

- void **remove_transition** **(** :ref:`String<class_String>` from, :ref:`String<class_String>` to **)**

Deletes the given transition.
Deletes the transition between the two specified nodes.

----

.. _class_AnimationNodeStateMachine_method_remove_transition_by_index:

- void **remove_transition_by_index** **(** :ref:`int<class_int>` idx **)**

Deletes the given transition.
Deletes the given transition by index.

----

Expand Down
9 changes: 8 additions & 1 deletion classes/class_animationnodestatemachineplayback.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ AnimationNodeStateMachinePlayback

**Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`

Playback control for AnimationNodeStateMachine.
Playback control for :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>`.

Description
-----------
Expand All @@ -25,6 +25,11 @@ Allows control of :ref:`AnimationTree<class_AnimationTree>` state machines creat
var state_machine = $AnimationTree.get("parameters/playback")
state_machine.travel("some_state")

Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand Down Expand Up @@ -64,6 +69,8 @@ Returns the currently playing animation state.

- :ref:`PoolStringArray<class_PoolStringArray>` **get_travel_path** **(** **)** const

Returns the current travel path as computed internally by the A\* algorithm.

----

.. _class_AnimationNodeStateMachinePlayback_method_is_playing:
Expand Down
11 changes: 9 additions & 2 deletions classes/class_animationnodestatemachinetransition.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ AnimationNodeStateMachineTransition



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Properties
----------

Expand All @@ -37,6 +42,8 @@ Signals

- **advance_condition_changed** **(** **)**

Emitted when :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` is changed.

Enumerations
------------

Expand Down Expand Up @@ -71,11 +78,11 @@ Property Descriptions
| *Getter* | get_advance_condition() |
+-----------+------------------------------+

Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree<class_AnimationTree>` that can be controlled from code (see `https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code <https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code>`_). For example, if :ref:`AnimationTree.tree_root<class_AnimationTree_property_tree_root>` is an :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` and :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` is set to "idle":
Turn on auto advance when this condition is set. The provided name will become a boolean parameter on the :ref:`AnimationTree<class_AnimationTree>` that can be controlled from code (see `https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code <https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#controlling-from-code>`_). For example, if :ref:`AnimationTree.tree_root<class_AnimationTree_property_tree_root>` is an :ref:`AnimationNodeStateMachine<class_AnimationNodeStateMachine>` and :ref:`advance_condition<class_AnimationNodeStateMachineTransition_property_advance_condition>` is set to ``"idle"``:

::

$animation_tree["parameters/conditions/idle"] = is_on_floor and linear_velocity.x == 0
$animation_tree["parameters/conditions/idle"] = is_on_floor and (linear_velocity.x == 0)

----

Expand Down
5 changes: 5 additions & 0 deletions classes/class_animationnodetimescale.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ AnimationNodeTimeScale



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

5 changes: 5 additions & 0 deletions classes/class_animationnodetimeseek.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ AnimationNodeTimeSeek



Tutorials
---------

- :doc:`../tutorials/animation/animation_tree`

Loading

0 comments on commit acb2260

Please sign in to comment.