Skip to content
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
8 changes: 4 additions & 4 deletions classes/class_@globalscope.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2823,15 +2823,15 @@ Enum value which doesn't correspond to any MIDI message. This is used to initial

:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_OFF** = ``8``

MIDI note OFF message. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON>` with zero velocity instead. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.

.. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON:

.. rst-class:: classref-enumeration-constant

:ref:`MIDIMessage<enum_@GlobalScope_MIDIMessage>` **MIDI_MESSAGE_NOTE_ON** = ``9``

MIDI note ON message. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.
MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF<class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_OFF>`, but implementations vary. See the documentation of :ref:`InputEventMIDI<class_InputEventMIDI>` for information of how to use MIDI inputs.

.. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH:

Expand Down Expand Up @@ -3982,15 +3982,15 @@ An export preset property with this flag contains confidential information and i

:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_DEFAULT** = ``6``

Default usage (storage, editor and network).
Default usage (storage and editor).

.. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR:

.. rst-class:: classref-enumeration-constant

:ref:`PropertyUsageFlags<enum_@GlobalScope_PropertyUsageFlags>` **PROPERTY_USAGE_NO_EDITOR** = ``2``

Default usage but without showing the property in the editor (storage, network).
Default usage but without showing the property in the editor (storage).

.. rst-class:: classref-item-separator

Expand Down
68 changes: 65 additions & 3 deletions classes/class_animationnodeoneshot.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,20 @@ After setting the request and changing the animation playback, the one-shot node
# Alternative syntax (same result as above).
animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT

# Abort child animation with fading out connected to "shot" port.
animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT)
# Alternative syntax (same result as above).
animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT

# Get current state (read-only).
animation_tree.get("parameters/OneShot/active"))
animation_tree.get("parameters/OneShot/active")
# Alternative syntax (same result as above).
animation_tree["parameters/OneShot/active"]

# Get current internal state (read-only).
animation_tree.get("parameters/OneShot/internal_active")
# Alternative syntax (same result as above).
animation_tree["parameters/OneShot/internal_active"]

.. code-tab:: csharp

Expand All @@ -51,8 +61,14 @@ After setting the request and changing the animation playback, the one-shot node
// Abort child animation connected to "shot" port.
animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT);

// Abort child animation with fading out connected to "shot" port.
animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT);

// Get current state (read-only).
animationTree.Get("parameters/OneShot/active");

// Get current internal state (read-only).
animationTree.Get("parameters/OneShot/internal_active");



Expand Down Expand Up @@ -80,8 +96,12 @@ Properties
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`autorestart_random_delay<class_AnimationNodeOneShot_property_autorestart_random_delay>` | ``0.0`` |
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`Curve<class_Curve>` | :ref:`fadein_curve<class_AnimationNodeOneShot_property_fadein_curve>` | |
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`fadein_time<class_AnimationNodeOneShot_property_fadein_time>` | ``0.0`` |
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`Curve<class_Curve>` | :ref:`fadeout_curve<class_AnimationNodeOneShot_property_fadeout_curve>` | |
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`float<class_float>` | :ref:`fadeout_time<class_AnimationNodeOneShot_property_fadeout_time>` | ``0.0`` |
+---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+
| :ref:`MixMode<enum_AnimationNodeOneShot_MixMode>` | :ref:`mix_mode<class_AnimationNodeOneShot_property_mix_mode>` | ``0`` |
Expand Down Expand Up @@ -126,6 +146,14 @@ The request to play the animation connected to "shot" port.

The request to stop the animation connected to "shot" port.

.. _class_AnimationNodeOneShot_constant_ONE_SHOT_REQUEST_FADE_OUT:

.. rst-class:: classref-enumeration-constant

:ref:`OneShotRequest<enum_AnimationNodeOneShot_OneShotRequest>` **ONE_SHOT_REQUEST_FADE_OUT** = ``3``

The request to fade out the animation connected to "shot" port.

.. rst-class:: classref-item-separator

----
Expand Down Expand Up @@ -214,6 +242,23 @@ If :ref:`autorestart<class_AnimationNodeOneShot_property_autorestart>` is ``true

----

.. _class_AnimationNodeOneShot_property_fadein_curve:

.. rst-class:: classref-property

:ref:`Curve<class_Curve>` **fadein_curve**

.. rst-class:: classref-property-setget

- void **set_fadein_curve** **(** :ref:`Curve<class_Curve>` value **)**
- :ref:`Curve<class_Curve>` **get_fadein_curve** **(** **)**

Determines how cross-fading between animations is eased. If empty, the transition will be linear.

.. rst-class:: classref-item-separator

----

.. _class_AnimationNodeOneShot_property_fadein_time:

.. rst-class:: classref-property
Expand All @@ -225,7 +270,24 @@ If :ref:`autorestart<class_AnimationNodeOneShot_property_autorestart>` is ``true
- void **set_fadein_time** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_fadein_time** **(** **)**

The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 0 second and ends at 1 second during the animation.
The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation.

.. rst-class:: classref-item-separator

----

.. _class_AnimationNodeOneShot_property_fadeout_curve:

.. rst-class:: classref-property

:ref:`Curve<class_Curve>` **fadeout_curve**

.. rst-class:: classref-property-setget

- void **set_fadeout_curve** **(** :ref:`Curve<class_Curve>` value **)**
- :ref:`Curve<class_Curve>` **get_fadeout_curve** **(** **)**

Determines how cross-fading between animations is eased. If empty, the transition will be linear.

.. rst-class:: classref-item-separator

Expand All @@ -242,7 +304,7 @@ The fade-in duration. For example, setting this to ``1.0`` for a 5 second length
- void **set_fadeout_time** **(** :ref:`float<class_float>` value **)**
- :ref:`float<class_float>` **get_fadeout_time** **(** **)**

The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 4 second and ends at 5 second during the animation.
The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation.

.. rst-class:: classref-item-separator

Expand Down
4 changes: 3 additions & 1 deletion classes/class_animationplayer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,9 @@ See also :ref:`stop<class_AnimationPlayer_method_stop>`.

void **play** **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1, :ref:`float<class_float>` custom_speed=1.0, :ref:`bool<class_bool>` from_end=false **)**

Plays the animation with key ``name``. Custom blend times and speed can be set. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>`).
Plays the animation with key ``name``. Custom blend times and speed can be set.

The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>`).

The **AnimationPlayer** keeps track of its current or last played animation with :ref:`assigned_animation<class_AnimationPlayer_property_assigned_animation>`. If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused.

Expand Down
Loading