AnimationTree.xml 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationTree" inherits="Node" version="3.3">
  3. <brief_description>
  4. A node to be used for advanced animation transitions in an [AnimationPlayer].
  5. </brief_description>
  6. <description>
  7. Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations.
  8. </description>
  9. <tutorials>
  10. <link title="AnimationTree">https://docs.godotengine.org/en/3.3/tutorials/animation/animation_tree.html</link>
  11. <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
  12. </tutorials>
  13. <methods>
  14. <method name="advance">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="delta" type="float">
  18. </argument>
  19. <description>
  20. Manually advance the animations by the specified time (in seconds).
  21. </description>
  22. </method>
  23. <method name="get_root_motion_transform" qualifiers="const">
  24. <return type="Transform">
  25. </return>
  26. <description>
  27. Retrieve the motion of the [member root_motion_track] as a [Transform] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM], returns an identity transformation.
  28. </description>
  29. </method>
  30. <method name="rename_parameter">
  31. <return type="void">
  32. </return>
  33. <argument index="0" name="old_name" type="String">
  34. </argument>
  35. <argument index="1" name="new_name" type="String">
  36. </argument>
  37. <description>
  38. </description>
  39. </method>
  40. </methods>
  41. <members>
  42. <member name="active" type="bool" setter="set_active" getter="is_active" default="false">
  43. If [code]true[/code], the [AnimationTree] will be processing.
  44. </member>
  45. <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
  46. The path to the [AnimationPlayer] used for animating.
  47. </member>
  48. <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
  49. The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
  50. </member>
  51. <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
  52. The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code].
  53. If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place.
  54. </member>
  55. <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
  56. The root animation node of this [AnimationTree]. See [AnimationNode].
  57. </member>
  58. </members>
  59. <constants>
  60. <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
  61. The animations will progress during the physics frame (i.e. [method Node._physics_process]).
  62. </constant>
  63. <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
  64. The animations will progress during the idle frame (i.e. [method Node._process]).
  65. </constant>
  66. <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
  67. The animations will only progress manually (see [method advance]).
  68. </constant>
  69. </constants>
  70. </class>