class_animationtree.rst 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. :github_url: hide
  2. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  3. .. DO NOT EDIT THIS FILE, but the AnimationTree.xml source instead.
  4. .. The source is found in doc/classes or modules/<name>/doc_classes.
  5. .. _class_AnimationTree:
  6. AnimationTree
  7. =============
  8. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  9. A node to be used for advanced animation transitions in an :ref:`AnimationPlayer<class_AnimationPlayer>`.
  10. Tutorials
  11. ---------
  12. - :doc:`../tutorials/animation/animation_tree`
  13. - `https://github.com/godotengine/tps-demo <https://github.com/godotengine/tps-demo>`_
  14. Properties
  15. ----------
  16. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  17. | :ref:`bool<class_bool>` | :ref:`active<class_AnimationTree_property_active>` | ``false`` |
  18. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  19. | :ref:`NodePath<class_NodePath>` | :ref:`anim_player<class_AnimationTree_property_anim_player>` | ``NodePath("")`` |
  20. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  21. | :ref:`AnimationProcessMode<enum_AnimationTree_AnimationProcessMode>` | :ref:`process_mode<class_AnimationTree_property_process_mode>` | ``1`` |
  22. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  23. | :ref:`NodePath<class_NodePath>` | :ref:`root_motion_track<class_AnimationTree_property_root_motion_track>` | ``NodePath("")`` |
  24. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  25. | :ref:`AnimationNode<class_AnimationNode>` | :ref:`tree_root<class_AnimationTree_property_tree_root>` | |
  26. +----------------------------------------------------------------------+--------------------------------------------------------------------------+------------------+
  27. Methods
  28. -------
  29. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`advance<class_AnimationTree_method_advance>` **(** :ref:`float<class_float>` delta **)** |
  31. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`Transform<class_Transform>` | :ref:`get_root_motion_transform<class_AnimationTree_method_get_root_motion_transform>` **(** **)** const |
  33. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`rename_parameter<class_AnimationTree_method_rename_parameter>` **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` new_name **)** |
  35. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. Enumerations
  37. ------------
  38. .. _enum_AnimationTree_AnimationProcessMode:
  39. .. _class_AnimationTree_constant_ANIMATION_PROCESS_PHYSICS:
  40. .. _class_AnimationTree_constant_ANIMATION_PROCESS_IDLE:
  41. .. _class_AnimationTree_constant_ANIMATION_PROCESS_MANUAL:
  42. enum **AnimationProcessMode**:
  43. - **ANIMATION_PROCESS_PHYSICS** = **0** --- The animations will progress during the physics frame (i.e. :ref:`Node._physics_process<class_Node_method__physics_process>`).
  44. - **ANIMATION_PROCESS_IDLE** = **1** --- The animations will progress during the idle frame (i.e. :ref:`Node._process<class_Node_method__process>`).
  45. - **ANIMATION_PROCESS_MANUAL** = **2** --- The animations will only progress manually (see :ref:`advance<class_AnimationTree_method_advance>`).
  46. Property Descriptions
  47. ---------------------
  48. .. _class_AnimationTree_property_active:
  49. - :ref:`bool<class_bool>` **active**
  50. +-----------+-------------------+
  51. | *Default* | ``false`` |
  52. +-----------+-------------------+
  53. | *Setter* | set_active(value) |
  54. +-----------+-------------------+
  55. | *Getter* | is_active() |
  56. +-----------+-------------------+
  57. If ``true``, the ``AnimationTree`` will be processing.
  58. ----
  59. .. _class_AnimationTree_property_anim_player:
  60. - :ref:`NodePath<class_NodePath>` **anim_player**
  61. +-----------+-----------------------------+
  62. | *Default* | ``NodePath("")`` |
  63. +-----------+-----------------------------+
  64. | *Setter* | set_animation_player(value) |
  65. +-----------+-----------------------------+
  66. | *Getter* | get_animation_player() |
  67. +-----------+-----------------------------+
  68. The path to the :ref:`AnimationPlayer<class_AnimationPlayer>` used for animating.
  69. ----
  70. .. _class_AnimationTree_property_process_mode:
  71. - :ref:`AnimationProcessMode<enum_AnimationTree_AnimationProcessMode>` **process_mode**
  72. +-----------+-------------------------+
  73. | *Default* | ``1`` |
  74. +-----------+-------------------------+
  75. | *Setter* | set_process_mode(value) |
  76. +-----------+-------------------------+
  77. | *Getter* | get_process_mode() |
  78. +-----------+-------------------------+
  79. The process mode of this ``AnimationTree``. See :ref:`AnimationProcessMode<enum_AnimationTree_AnimationProcessMode>` for available modes.
  80. ----
  81. .. _class_AnimationTree_property_root_motion_track:
  82. - :ref:`NodePath<class_NodePath>` **root_motion_track**
  83. +-----------+------------------------------+
  84. | *Default* | ``NodePath("")`` |
  85. +-----------+------------------------------+
  86. | *Setter* | set_root_motion_track(value) |
  87. +-----------+------------------------------+
  88. | *Getter* | get_root_motion_track() |
  89. +-----------+------------------------------+
  90. ----
  91. .. _class_AnimationTree_property_tree_root:
  92. - :ref:`AnimationNode<class_AnimationNode>` **tree_root**
  93. +----------+----------------------+
  94. | *Setter* | set_tree_root(value) |
  95. +----------+----------------------+
  96. | *Getter* | get_tree_root() |
  97. +----------+----------------------+
  98. The root animation node of this ``AnimationTree``. See :ref:`AnimationNode<class_AnimationNode>`.
  99. Method Descriptions
  100. -------------------
  101. .. _class_AnimationTree_method_advance:
  102. - void **advance** **(** :ref:`float<class_float>` delta **)**
  103. Manually advance the animations by the specified time (in seconds).
  104. ----
  105. .. _class_AnimationTree_method_get_root_motion_transform:
  106. - :ref:`Transform<class_Transform>` **get_root_motion_transform** **(** **)** const
  107. ----
  108. .. _class_AnimationTree_method_rename_parameter:
  109. - void **rename_parameter** **(** :ref:`String<class_String>` old_name, :ref:`String<class_String>` new_name **)**