class_animationnodeextension.rst 6.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AnimationNodeExtension.xml.
  6. .. _class_AnimationNodeExtension:
  7. AnimationNodeExtension
  8. ======================
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`AnimationNode<class_AnimationNode>` **<** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  11. Base class for extending :ref:`AnimationRootNode<class_AnimationRootNode>`\ s from GDScript, C#, or C++.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. **AnimationNodeExtension** exposes the APIs of :ref:`AnimationRootNode<class_AnimationRootNode>` to allow users to extend it from GDScript, C#, or C++. This class is not meant to be used directly, but to be extended by other classes. It is used to create custom nodes for the :ref:`AnimationTree<class_AnimationTree>` system.
  16. .. rst-class:: classref-reftable-group
  17. Methods
  18. -------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`PackedFloat32Array<class_PackedFloat32Array>` | :ref:`_process_animation_node<class_AnimationNodeExtension_private_method__process_animation_node>`\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| |
  23. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`float<class_float>` | :ref:`get_remaining_time<class_AnimationNodeExtension_method_get_remaining_time>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, break_loop\: :ref:`bool<class_bool>`\ ) |static| |
  25. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`bool<class_bool>` | :ref:`is_looping<class_AnimationNodeExtension_method_is_looping>`\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |static| |
  27. +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. .. rst-class:: classref-section-separator
  29. ----
  30. .. rst-class:: classref-descriptions-group
  31. Method Descriptions
  32. -------------------
  33. .. _class_AnimationNodeExtension_private_method__process_animation_node:
  34. .. rst-class:: classref-method
  35. :ref:`PackedFloat32Array<class_PackedFloat32Array>` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array<class_PackedFloat64Array>`, test_only\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_AnimationNodeExtension_private_method__process_animation_node>`
  36. A version of the :ref:`AnimationNode._process()<class_AnimationNode_private_method__process>` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array<class_PackedFloat32Array>` with the processed animation data.
  37. The :ref:`PackedFloat64Array<class_PackedFloat64Array>` parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than ``0``), whether the seek request was externally requested (encoded as a float greater than ``0``), the current :ref:`LoopedFlag<enum_Animation_LoopedFlag>` (encoded as a float), and the current blend weight.
  38. The function must return a :ref:`PackedFloat32Array<class_PackedFloat32Array>` of the node's time info, containing the following values (in order): animation length, time position, delta, :ref:`LoopMode<enum_Animation_LoopMode>` (encoded as a float), whether the animation is about to end (encoded as a float greater than ``0``) and whether the animation is infinite (encoded as a float greater than ``0``). All values must be included in the returned array.
  39. .. rst-class:: classref-item-separator
  40. ----
  41. .. _class_AnimationNodeExtension_method_get_remaining_time:
  42. .. rst-class:: classref-method
  43. :ref:`float<class_float>` **get_remaining_time**\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`, break_loop\: :ref:`bool<class_bool>`\ ) |static| :ref:`🔗<class_AnimationNodeExtension_method_get_remaining_time>`
  44. Returns the animation's remaining time for the given node info. For looping animations, it will only return the remaining time if ``break_loop`` is ``true``, a large integer value will be returned otherwise.
  45. .. rst-class:: classref-item-separator
  46. ----
  47. .. _class_AnimationNodeExtension_method_is_looping:
  48. .. rst-class:: classref-method
  49. :ref:`bool<class_bool>` **is_looping**\ (\ node_info\: :ref:`PackedFloat32Array<class_PackedFloat32Array>`\ ) |static| :ref:`🔗<class_AnimationNodeExtension_method_is_looping>`
  50. Returns ``true`` if the animation for the given ``node_info`` is looping.
  51. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  52. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  53. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  54. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  55. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  56. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  57. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  58. .. |void| replace:: :abbr:`void (No return value.)`