|
@@ -67,12 +67,12 @@ Properties
|
|
|
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
| :ref:`AnimationProcessCallback<enum_AnimationPlayer_AnimationProcessCallback>` | :ref:`playback_process_mode<class_AnimationPlayer_property_playback_process_mode>` | ``1`` |
|
|
|
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`playback_speed<class_AnimationPlayer_property_playback_speed>` | ``1.0`` |
|
|
|
- +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
| :ref:`bool<class_bool>` | :ref:`reset_on_save<class_AnimationPlayer_property_reset_on_save>` | ``true`` |
|
|
|
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
| :ref:`NodePath<class_NodePath>` | :ref:`root_node<class_AnimationPlayer_property_root_node>` | ``NodePath("..")`` |
|
|
|
+--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`speed_scale<class_AnimationPlayer_property_speed_scale>` | ``1.0`` |
|
|
|
+ +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+--------------------+
|
|
|
|
|
|
.. rst-class:: classref-reftable-group
|
|
|
|
|
@@ -82,59 +82,63 @@ Methods
|
|
|
.. table::
|
|
|
:widths: auto
|
|
|
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_animation_library<class_AnimationPlayer_method_add_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`advance<class_AnimationPlayer_method_advance>` **(** :ref:`float<class_float>` delta **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`StringName<class_StringName>` | :ref:`animation_get_next<class_AnimationPlayer_method_animation_get_next>` **(** :ref:`StringName<class_StringName>` anim_from **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`animation_set_next<class_AnimationPlayer_method_animation_set_next>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`clear_caches<class_AnimationPlayer_method_clear_caches>` **(** **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`clear_queue<class_AnimationPlayer_method_clear_queue>` **(** **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`StringName<class_StringName>` | :ref:`find_animation<class_AnimationPlayer_method_find_animation>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`StringName<class_StringName>` | :ref:`find_animation_library<class_AnimationPlayer_method_find_animation_library>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`Animation<class_Animation>` | :ref:`get_animation<class_AnimationPlayer_method_get_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`AnimationLibrary<class_AnimationLibrary>` | :ref:`get_animation_library<class_AnimationPlayer_method_get_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`StringName[]<class_StringName>` | :ref:`get_animation_library_list<class_AnimationPlayer_method_get_animation_library_list>` **(** **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_list<class_AnimationPlayer_method_get_animation_list>` **(** **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`get_blend_time<class_AnimationPlayer_method_get_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`float<class_float>` | :ref:`get_playing_speed<class_AnimationPlayer_method_get_playing_speed>` **(** **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_queue<class_AnimationPlayer_method_get_queue>` **(** **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationPlayer_method_has_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`has_animation_library<class_AnimationPlayer_method_has_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationPlayer_method_is_playing>` **(** **)** |const| |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`play<class_AnimationPlayer_method_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 **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1 **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`queue<class_AnimationPlayer_method_queue>` **(** :ref:`StringName<class_StringName>` name **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`remove_animation_library<class_AnimationPlayer_method_remove_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`rename_animation_library<class_AnimationPlayer_method_rename_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`seek<class_AnimationPlayer_method_seek>` **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`set_blend_time<class_AnimationPlayer_method_set_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to, :ref:`float<class_float>` sec **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
- | void | :ref:`stop<class_AnimationPlayer_method_stop>` **(** :ref:`bool<class_bool>` reset=true **)** |
|
|
|
- +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Variant<class_Variant>` | :ref:`_post_process_key_value<class_AnimationPlayer_method__post_process_key_value>` **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`add_animation_library<class_AnimationPlayer_method_add_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`AnimationLibrary<class_AnimationLibrary>` library **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`advance<class_AnimationPlayer_method_advance>` **(** :ref:`float<class_float>` delta **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`StringName<class_StringName>` | :ref:`animation_get_next<class_AnimationPlayer_method_animation_get_next>` **(** :ref:`StringName<class_StringName>` anim_from **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`animation_set_next<class_AnimationPlayer_method_animation_set_next>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`clear_caches<class_AnimationPlayer_method_clear_caches>` **(** **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`clear_queue<class_AnimationPlayer_method_clear_queue>` **(** **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`StringName<class_StringName>` | :ref:`find_animation<class_AnimationPlayer_method_find_animation>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`StringName<class_StringName>` | :ref:`find_animation_library<class_AnimationPlayer_method_find_animation_library>` **(** :ref:`Animation<class_Animation>` animation **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`Animation<class_Animation>` | :ref:`get_animation<class_AnimationPlayer_method_get_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`AnimationLibrary<class_AnimationLibrary>` | :ref:`get_animation_library<class_AnimationPlayer_method_get_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`StringName[]<class_StringName>` | :ref:`get_animation_library_list<class_AnimationPlayer_method_get_animation_library_list>` **(** **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_animation_list<class_AnimationPlayer_method_get_animation_list>` **(** **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`get_blend_time<class_AnimationPlayer_method_get_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`float<class_float>` | :ref:`get_playing_speed<class_AnimationPlayer_method_get_playing_speed>` **(** **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_queue<class_AnimationPlayer_method_get_queue>` **(** **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`has_animation<class_AnimationPlayer_method_has_animation>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`has_animation_library<class_AnimationPlayer_method_has_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | :ref:`bool<class_bool>` | :ref:`is_playing<class_AnimationPlayer_method_is_playing>` **(** **)** |const| |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`pause<class_AnimationPlayer_method_pause>` **(** **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`play<class_AnimationPlayer_method_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 **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` **(** :ref:`StringName<class_StringName>` name="", :ref:`float<class_float>` custom_blend=-1 **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`queue<class_AnimationPlayer_method_queue>` **(** :ref:`StringName<class_StringName>` name **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`remove_animation_library<class_AnimationPlayer_method_remove_animation_library>` **(** :ref:`StringName<class_StringName>` name **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`rename_animation_library<class_AnimationPlayer_method_rename_animation_library>` **(** :ref:`StringName<class_StringName>` name, :ref:`StringName<class_StringName>` newname **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`seek<class_AnimationPlayer_method_seek>` **(** :ref:`float<class_float>` seconds, :ref:`bool<class_bool>` update=false **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`set_blend_time<class_AnimationPlayer_method_set_blend_time>` **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to, :ref:`float<class_float>` sec **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
+ | void | :ref:`stop<class_AnimationPlayer_method_stop>` **(** :ref:`bool<class_bool>` keep_state=false **)** |
|
|
|
+ +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
|
@@ -463,23 +467,6 @@ The process notification in which to update animations.
|
|
|
|
|
|
----
|
|
|
|
|
|
-.. _class_AnimationPlayer_property_playback_speed:
|
|
|
-
|
|
|
-.. rst-class:: classref-property
|
|
|
-
|
|
|
-:ref:`float<class_float>` **playback_speed** = ``1.0``
|
|
|
-
|
|
|
-.. rst-class:: classref-property-setget
|
|
|
-
|
|
|
-- void **set_speed_scale** **(** :ref:`float<class_float>` value **)**
|
|
|
-- :ref:`float<class_float>` **get_speed_scale** **(** **)**
|
|
|
-
|
|
|
-The speed scaling ratio. For example, if this value is 1, then the animation plays at normal speed. If it's 0.5, then it plays at half speed. If it's 2, then it plays at double speed.
|
|
|
-
|
|
|
-.. rst-class:: classref-item-separator
|
|
|
-
|
|
|
-----
|
|
|
-
|
|
|
.. _class_AnimationPlayer_property_reset_on_save:
|
|
|
|
|
|
.. rst-class:: classref-property
|
|
@@ -512,6 +499,25 @@ This makes it more convenient to preview and edit animations in the editor, as c
|
|
|
|
|
|
The node from which node path references will travel.
|
|
|
|
|
|
+.. rst-class:: classref-item-separator
|
|
|
+
|
|
|
+----
|
|
|
+
|
|
|
+.. _class_AnimationPlayer_property_speed_scale:
|
|
|
+
|
|
|
+.. rst-class:: classref-property
|
|
|
+
|
|
|
+:ref:`float<class_float>` **speed_scale** = ``1.0``
|
|
|
+
|
|
|
+.. rst-class:: classref-property-setget
|
|
|
+
|
|
|
+- void **set_speed_scale** **(** :ref:`float<class_float>` value **)**
|
|
|
+- :ref:`float<class_float>` **get_speed_scale** **(** **)**
|
|
|
+
|
|
|
+The speed scaling ratio. For example, if this value is ``1``, then the animation plays at normal speed. If it's ``0.5``, then it plays at half speed. If it's ``2``, then it plays at double speed.
|
|
|
+
|
|
|
+If set to a negative value, the animation is played in reverse. If set to ``0``, the animation will not advance.
|
|
|
+
|
|
|
.. rst-class:: classref-section-separator
|
|
|
|
|
|
----
|
|
@@ -521,6 +527,18 @@ The node from which node path references will travel.
|
|
|
Method Descriptions
|
|
|
-------------------
|
|
|
|
|
|
+.. _class_AnimationPlayer_method__post_process_key_value:
|
|
|
+
|
|
|
+.. rst-class:: classref-method
|
|
|
+
|
|
|
+:ref:`Variant<class_Variant>` **_post_process_key_value** **(** :ref:`Animation<class_Animation>` animation, :ref:`int<class_int>` track, :ref:`Variant<class_Variant>` value, :ref:`Object<class_Object>` object, :ref:`int<class_int>` object_idx **)** |virtual| |const|
|
|
|
+
|
|
|
+A virtual function for processing after key getting during playback.
|
|
|
+
|
|
|
+.. rst-class:: classref-item-separator
|
|
|
+
|
|
|
+----
|
|
|
+
|
|
|
.. _class_AnimationPlayer_method_add_animation_library:
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
@@ -671,7 +689,7 @@ Returns the list of stored animation keys.
|
|
|
|
|
|
:ref:`float<class_float>` **get_blend_time** **(** :ref:`StringName<class_StringName>` anim_from, :ref:`StringName<class_StringName>` anim_to **)** |const|
|
|
|
|
|
|
-Gets the blend time (in seconds) between two animations, referenced by their keys.
|
|
|
+Returns the blend time (in seconds) between two animations, referenced by their keys.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -683,7 +701,9 @@ Gets the blend time (in seconds) between two animations, referenced by their key
|
|
|
|
|
|
:ref:`float<class_float>` **get_playing_speed** **(** **)** |const|
|
|
|
|
|
|
-Gets the actual playing speed of current animation or 0 if not playing. This speed is the :ref:`playback_speed<class_AnimationPlayer_property_playback_speed>` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play<class_AnimationPlayer_method_play>` method.
|
|
|
+Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale<class_AnimationPlayer_property_speed_scale>` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play<class_AnimationPlayer_method_play>` method.
|
|
|
+
|
|
|
+Returns a negative value if the current animation is playing backwards.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -731,7 +751,21 @@ Returns ``true`` if the **AnimationPlayer** stores an :ref:`AnimationLibrary<cla
|
|
|
|
|
|
:ref:`bool<class_bool>` **is_playing** **(** **)** |const|
|
|
|
|
|
|
-Returns ``true`` if playing an animation.
|
|
|
+Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale<class_AnimationPlayer_property_speed_scale>` and/or ``custom_speed`` are ``0``).
|
|
|
+
|
|
|
+.. rst-class:: classref-item-separator
|
|
|
+
|
|
|
+----
|
|
|
+
|
|
|
+.. _class_AnimationPlayer_method_pause:
|
|
|
+
|
|
|
+.. rst-class:: classref-method
|
|
|
+
|
|
|
+void **pause** **(** **)**
|
|
|
+
|
|
|
+Pauses the currently playing animation. The :ref:`current_animation_position<class_AnimationPlayer_property_current_animation_position>` will be kept and calling :ref:`play<class_AnimationPlayer_method_play>` or :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` without arguments or with the same animation name as :ref:`assigned_animation<class_AnimationPlayer_property_assigned_animation>` will resume the animation.
|
|
|
+
|
|
|
+See also :ref:`stop<class_AnimationPlayer_method_stop>`.
|
|
|
|
|
|
.. rst-class:: classref-item-separator
|
|
|
|
|
@@ -745,7 +779,7 @@ void **play** **(** :ref:`StringName<class_StringName>` name="", :ref:`float<cla
|
|
|
|
|
|
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>`).
|
|
|
|
|
|
-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, or restart if it was stopped (see :ref:`stop<class_AnimationPlayer_method_stop>` for both pause and stop). If the animation was already playing, it will keep playing.
|
|
|
+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.
|
|
|
|
|
|
\ **Note:** The animation will be updated the next time the **AnimationPlayer** is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call ``advance(0)``.
|
|
|
|
|
@@ -835,11 +869,13 @@ Specifies a blend time (in seconds) between two animations, referenced by their
|
|
|
|
|
|
.. rst-class:: classref-method
|
|
|
|
|
|
-void **stop** **(** :ref:`bool<class_bool>` reset=true **)**
|
|
|
+void **stop** **(** :ref:`bool<class_bool>` keep_state=false **)**
|
|
|
+
|
|
|
+Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause<class_AnimationPlayer_method_pause>`.
|
|
|
|
|
|
-Stops or pauses the currently playing animation. If ``reset`` is ``true``, the animation position is reset to ``0`` and the playback speed is reset to ``1.0``.
|
|
|
+If ``keep_state`` is ``true``, the animation state is not updated visually.
|
|
|
|
|
|
-If ``reset`` is ``false``, the :ref:`current_animation_position<class_AnimationPlayer_property_current_animation_position>` will be kept and calling :ref:`play<class_AnimationPlayer_method_play>` or :ref:`play_backwards<class_AnimationPlayer_method_play_backwards>` without arguments or with the same animation name as :ref:`assigned_animation<class_AnimationPlayer_property_assigned_animation>` will resume the animation.
|
|
|
+\ **Note:** The method / audio / animation playback tracks will not be processed by this method.
|
|
|
|
|
|
.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
|
|
|
.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
|