2
0

AnimationTree.xml 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationTree" inherits="Node" version="3.4">
  3. <brief_description>
  4. A node to be used for advanced animation transitions in an [AnimationPlayer].
  5. </brief_description>
  6. <description>
  7. A node to be used for advanced animation transitions in an [AnimationPlayer].
  8. [b]Note:[/b] 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.
  9. </description>
  10. <tutorials>
  11. <link title="Using AnimationTree">https://docs.godotengine.org/en/3.4/tutorials/animation/animation_tree.html</link>
  12. <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link>
  13. </tutorials>
  14. <methods>
  15. <method name="advance">
  16. <return type="void" />
  17. <argument index="0" name="delta" type="float" />
  18. <description>
  19. Manually advance the animations by the specified time (in seconds).
  20. </description>
  21. </method>
  22. <method name="get_root_motion_transform" qualifiers="const">
  23. <return type="Transform" />
  24. <description>
  25. 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].
  26. </description>
  27. </method>
  28. <method name="rename_parameter">
  29. <return type="void" />
  30. <argument index="0" name="old_name" type="String" />
  31. <argument index="1" name="new_name" type="String" />
  32. <description>
  33. </description>
  34. </method>
  35. </methods>
  36. <members>
  37. <member name="active" type="bool" setter="set_active" getter="is_active" default="false">
  38. If [code]true[/code], the [AnimationTree] will be processing.
  39. </member>
  40. <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath(&quot;&quot;)">
  41. The path to the [AnimationPlayer] used for animating.
  42. </member>
  43. <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1">
  44. The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes.
  45. </member>
  46. <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath(&quot;&quot;)">
  47. 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].
  48. 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].
  49. </member>
  50. <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root">
  51. The root animation node of this [AnimationTree]. See [AnimationNode].
  52. </member>
  53. </members>
  54. <constants>
  55. <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode">
  56. The animations will progress during the physics frame (i.e. [method Node._physics_process]).
  57. </constant>
  58. <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode">
  59. The animations will progress during the idle frame (i.e. [method Node._process]).
  60. </constant>
  61. <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode">
  62. The animations will only progress manually (see [method advance]).
  63. </constant>
  64. </constants>
  65. </class>