AnimationNodeTimeSeek.xml 1.3 KB

12345678910111213141516171819202122232425262728
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="AnimationNodeTimeSeek" inherits="AnimationNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  3. <brief_description>
  4. A time-seeking animation node to be used with [AnimationTree].
  5. </brief_description>
  6. <description>
  7. This node can be used to cause a seek command to happen to any sub-children of the animation graph. Use this node type to play an [Animation] from the start or a certain playback position inside the [AnimationNodeBlendTree]. After setting the time and changing the animation playback, the seek node automatically goes into sleep mode on the next process frame by setting its [code]seek_position[/code] value to [code]-1.0[/code].
  8. [codeblock]
  9. # Play child animation from the start.
  10. animation_tree.set("parameters/Seek/seek_position", 0.0)
  11. # Alternative syntax (same result as above).
  12. animation_tree["parameters/Seek/seek_position"] = 0.0
  13. # Play child animation from 12 second timestamp.
  14. animation_tree.set("parameters/Seek/seek_position", 12.0)
  15. # Alternative syntax (same result as above).
  16. animation_tree["parameters/Seek/seek_position"] = 12.0
  17. [/codeblock]
  18. </description>
  19. <tutorials>
  20. <link>$DOCS_URL/tutorials/animation/animation_tree.html</link>
  21. </tutorials>
  22. <methods>
  23. </methods>
  24. <constants>
  25. </constants>
  26. </class>