AnimationTree.xml 3.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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="Using 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. <argument index="0" name="delta" type="float" />
  17. <description>
  18. Manually advance the animations by the specified time (in seconds).
  19. </description>
  20. </method>
  21. <method name="get_root_motion_transform" qualifiers="const">
  22. <return type="Transform" />
  23. <description>
  24. 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. See also [member root_motion_track] and [RootMotionView].
  25. </description>
  26. </method>
  27. <method name="rename_parameter">
  28. <return type="void" />
  29. <argument index="0" name="old_name" type="String" />
  30. <argument index="1" name="new_name" type="String" />
  31. <description>
  32. </description>
  33. </method>
  34. </methods>
  35. <members>
  36. <member name="active" type="bool" setter="set_active" getter="is_active" default="false">
  37. If [code]true[/code], the [AnimationTree] will be processing.
  38. </member>
  39. <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
  40. The path to the [AnimationPlayer] used for animating.
  41. </member>
  42. <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
  43. The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
  44. </member>
  45. <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
  46. 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].
  47. If the track has type [constant Animation.TYPE_TRANSFORM], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView].
  48. </member>
  49. <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
  50. The root animation node of this [AnimationTree]. See [AnimationNode].
  51. </member>
  52. </members>
  53. <constants>
  54. <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
  55. The animations will progress during the physics frame (i.e. [method Node._physics_process]).
  56. </constant>
  57. <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
  58. The animations will progress during the idle frame (i.e. [method Node._process]).
  59. </constant>
  60. <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
  61. The animations will only progress manually (see [method advance]).
  62. </constant>
  63. </constants>
  64. </class>