class_animation.rst 87 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Animation.xml.
  6. .. _class_Animation:
  7. Animation
  8. =========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Holds data that can be used to animate anything in the engine.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This resource holds data that can be used to animate anything in the engine. Animations are divided into tracks and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track.
  15. .. tabs::
  16. .. code-tab:: gdscript
  17. # This creates an animation that makes the node "Enemy" move to the right by
  18. # 100 pixels in 0.5 seconds.
  19. var animation = Animation.new()
  20. var track_index = animation.add_track(Animation.TYPE_VALUE)
  21. animation.track_set_path(track_index, "Enemy:position:x")
  22. animation.track_insert_key(track_index, 0.0, 0)
  23. animation.track_insert_key(track_index, 0.5, 100)
  24. .. code-tab:: csharp
  25. // This creates an animation that makes the node "Enemy" move to the right by
  26. // 100 pixels in 0.5 seconds.
  27. var animation = new Animation();
  28. int trackIndex = animation.AddTrack(Animation.TrackType.Value);
  29. animation.TrackSetPath(trackIndex, "Enemy:position:x");
  30. animation.TrackInsertKey(trackIndex, 0.0f, 0);
  31. animation.TrackInsertKey(trackIndex, 0.5f, 100);
  32. Animations are just data containers, and must be added to nodes such as an :ref:`AnimationPlayer<class_AnimationPlayer>` to be played back. Animation tracks have different types, each with its own set of dedicated methods. Check :ref:`TrackType<enum_Animation_TrackType>` to see available types.
  33. \ **Note:** For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` and :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` track types instead of :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>` is recommended for performance reasons.
  34. .. rst-class:: classref-introduction-group
  35. Tutorials
  36. ---------
  37. - :doc:`Animation documentation index <../tutorials/animation/index>`
  38. .. rst-class:: classref-reftable-group
  39. Properties
  40. ----------
  41. .. table::
  42. :widths: auto
  43. +------------------------------------------+------------------------------------------------------+---------+
  44. | :ref:`float<class_float>` | :ref:`length<class_Animation_property_length>` | ``1.0`` |
  45. +------------------------------------------+------------------------------------------------------+---------+
  46. | :ref:`LoopMode<enum_Animation_LoopMode>` | :ref:`loop_mode<class_Animation_property_loop_mode>` | ``0`` |
  47. +------------------------------------------+------------------------------------------------------+---------+
  48. | :ref:`float<class_float>` | :ref:`step<class_Animation_property_step>` | ``0.1`` |
  49. +------------------------------------------+------------------------------------------------------+---------+
  50. .. rst-class:: classref-reftable-group
  51. Methods
  52. -------
  53. .. table::
  54. :widths: auto
  55. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`int<class_int>` | :ref:`add_track<class_Animation_method_add_track>` **(** :ref:`TrackType<enum_Animation_TrackType>` type, :ref:`int<class_int>` at_position=-1 **)** |
  57. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`StringName<class_StringName>` | :ref:`animation_track_get_key_animation<class_Animation_method_animation_track_get_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  59. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`int<class_int>` | :ref:`animation_track_insert_key<class_Animation_method_animation_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`StringName<class_StringName>` animation **)** |
  61. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | void | :ref:`animation_track_set_key_animation<class_Animation_method_animation_track_set_key_animation>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`StringName<class_StringName>` animation **)** |
  63. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`float<class_float>` | :ref:`audio_track_get_key_end_offset<class_Animation_method_audio_track_get_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  65. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`float<class_float>` | :ref:`audio_track_get_key_start_offset<class_Animation_method_audio_track_get_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  67. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Resource<class_Resource>` | :ref:`audio_track_get_key_stream<class_Animation_method_audio_track_get_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  69. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`int<class_int>` | :ref:`audio_track_insert_key<class_Animation_method_audio_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Resource<class_Resource>` stream, :ref:`float<class_float>` start_offset=0, :ref:`float<class_float>` end_offset=0 **)** |
  71. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | :ref:`bool<class_bool>` | :ref:`audio_track_is_use_blend<class_Animation_method_audio_track_is_use_blend>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  73. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`audio_track_set_key_end_offset<class_Animation_method_audio_track_set_key_end_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
  75. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`audio_track_set_key_start_offset<class_Animation_method_audio_track_set_key_start_offset>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)** |
  77. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`audio_track_set_key_stream<class_Animation_method_audio_track_set_key_stream>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)** |
  79. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`audio_track_set_use_blend<class_Animation_method_audio_track_set_use_blend>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enable **)** |
  81. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_in_handle<class_Animation_method_bezier_track_get_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  83. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | :ref:`Vector2<class_Vector2>` | :ref:`bezier_track_get_key_out_handle<class_Animation_method_bezier_track_get_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  85. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | :ref:`float<class_float>` | :ref:`bezier_track_get_key_value<class_Animation_method_bezier_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  87. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | :ref:`int<class_int>` | :ref:`bezier_track_insert_key<class_Animation_method_bezier_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2(0, 0), :ref:`Vector2<class_Vector2>` out_handle=Vector2(0, 0) **)** |
  89. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | :ref:`float<class_float>` | :ref:`bezier_track_interpolate<class_Animation_method_bezier_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |const| |
  91. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`bezier_track_set_key_in_handle<class_Animation_method_bezier_track_set_key_in_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` in_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)** |
  93. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`bezier_track_set_key_out_handle<class_Animation_method_bezier_track_set_key_out_handle>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` out_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)** |
  95. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`bezier_track_set_key_value<class_Animation_method_bezier_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` value **)** |
  97. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | :ref:`int<class_int>` | :ref:`blend_shape_track_insert_key<class_Animation_method_blend_shape_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` amount **)** |
  99. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | :ref:`float<class_float>` | :ref:`blend_shape_track_interpolate<class_Animation_method_blend_shape_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  101. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`clear<class_Animation_method_clear>` **(** **)** |
  103. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`compress<class_Animation_method_compress>` **(** :ref:`int<class_int>` page_size=8192, :ref:`int<class_int>` fps=120, :ref:`float<class_float>` split_tolerance=4.0 **)** |
  105. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`copy_track<class_Animation_method_copy_track>` **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)** |
  107. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`int<class_int>` | :ref:`find_track<class_Animation_method_find_track>` **(** :ref:`NodePath<class_NodePath>` path, :ref:`TrackType<enum_Animation_TrackType>` type **)** |const| |
  109. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`int<class_int>` | :ref:`get_track_count<class_Animation_method_get_track_count>` **(** **)** |const| |
  111. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`StringName<class_StringName>` | :ref:`method_track_get_name<class_Animation_method_method_track_get_name>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  113. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | :ref:`Array<class_Array>` | :ref:`method_track_get_params<class_Animation_method_method_track_get_params>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  115. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | :ref:`int<class_int>` | :ref:`position_track_insert_key<class_Animation_method_position_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` position **)** |
  117. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | :ref:`Vector3<class_Vector3>` | :ref:`position_track_interpolate<class_Animation_method_position_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  119. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | void | :ref:`remove_track<class_Animation_method_remove_track>` **(** :ref:`int<class_int>` track_idx **)** |
  121. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | :ref:`int<class_int>` | :ref:`rotation_track_insert_key<class_Animation_method_rotation_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Quaternion<class_Quaternion>` rotation **)** |
  123. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | :ref:`Quaternion<class_Quaternion>` | :ref:`rotation_track_interpolate<class_Animation_method_rotation_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  125. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | :ref:`int<class_int>` | :ref:`scale_track_insert_key<class_Animation_method_scale_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` scale **)** |
  127. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | :ref:`Vector3<class_Vector3>` | :ref:`scale_track_interpolate<class_Animation_method_scale_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  129. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | :ref:`int<class_int>` | :ref:`track_find_key<class_Animation_method_track_find_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`FindMode<enum_Animation_FindMode>` find_mode=0 **)** |const| |
  131. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | :ref:`bool<class_bool>` | :ref:`track_get_interpolation_loop_wrap<class_Animation_method_track_get_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  133. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | :ref:`InterpolationType<enum_Animation_InterpolationType>` | :ref:`track_get_interpolation_type<class_Animation_method_track_get_interpolation_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  135. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | :ref:`int<class_int>` | :ref:`track_get_key_count<class_Animation_method_track_get_key_count>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  137. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | :ref:`float<class_float>` | :ref:`track_get_key_time<class_Animation_method_track_get_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  139. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | :ref:`float<class_float>` | :ref:`track_get_key_transition<class_Animation_method_track_get_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  141. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | :ref:`Variant<class_Variant>` | :ref:`track_get_key_value<class_Animation_method_track_get_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const| |
  143. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | :ref:`NodePath<class_NodePath>` | :ref:`track_get_path<class_Animation_method_track_get_path>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  145. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | :ref:`TrackType<enum_Animation_TrackType>` | :ref:`track_get_type<class_Animation_method_track_get_type>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  147. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | :ref:`int<class_int>` | :ref:`track_insert_key<class_Animation_method_track_insert_key>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Variant<class_Variant>` key, :ref:`float<class_float>` transition=1 **)** |
  149. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | :ref:`bool<class_bool>` | :ref:`track_is_compressed<class_Animation_method_track_is_compressed>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  151. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | :ref:`bool<class_bool>` | :ref:`track_is_enabled<class_Animation_method_track_is_enabled>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  153. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | :ref:`bool<class_bool>` | :ref:`track_is_imported<class_Animation_method_track_is_imported>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  155. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | void | :ref:`track_move_down<class_Animation_method_track_move_down>` **(** :ref:`int<class_int>` track_idx **)** |
  157. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. | void | :ref:`track_move_to<class_Animation_method_track_move_to>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)** |
  159. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  160. | void | :ref:`track_move_up<class_Animation_method_track_move_up>` **(** :ref:`int<class_int>` track_idx **)** |
  161. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  162. | void | :ref:`track_remove_key<class_Animation_method_track_remove_key>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |
  163. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  164. | void | :ref:`track_remove_key_at_time<class_Animation_method_track_remove_key_at_time>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |
  165. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  166. | void | :ref:`track_set_enabled<class_Animation_method_track_set_enabled>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)** |
  167. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  168. | void | :ref:`track_set_imported<class_Animation_method_track_set_imported>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)** |
  169. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  170. | void | :ref:`track_set_interpolation_loop_wrap<class_Animation_method_track_set_interpolation_loop_wrap>` **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` interpolation **)** |
  171. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  172. | void | :ref:`track_set_interpolation_type<class_Animation_method_track_set_interpolation_type>` **(** :ref:`int<class_int>` track_idx, :ref:`InterpolationType<enum_Animation_InterpolationType>` interpolation **)** |
  173. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  174. | void | :ref:`track_set_key_time<class_Animation_method_track_set_key_time>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` time **)** |
  175. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  176. | void | :ref:`track_set_key_transition<class_Animation_method_track_set_key_transition>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)** |
  177. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  178. | void | :ref:`track_set_key_value<class_Animation_method_track_set_key_value>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key, :ref:`Variant<class_Variant>` value **)** |
  179. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  180. | void | :ref:`track_set_path<class_Animation_method_track_set_path>` **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)** |
  181. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  182. | void | :ref:`track_swap<class_Animation_method_track_swap>` **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)** |
  183. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  184. | :ref:`UpdateMode<enum_Animation_UpdateMode>` | :ref:`value_track_get_update_mode<class_Animation_method_value_track_get_update_mode>` **(** :ref:`int<class_int>` track_idx **)** |const| |
  185. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  186. | :ref:`Variant<class_Variant>` | :ref:`value_track_interpolate<class_Animation_method_value_track_interpolate>` **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const| |
  187. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  188. | void | :ref:`value_track_set_update_mode<class_Animation_method_value_track_set_update_mode>` **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)** |
  189. +------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  190. .. rst-class:: classref-section-separator
  191. ----
  192. .. rst-class:: classref-descriptions-group
  193. Enumerations
  194. ------------
  195. .. _enum_Animation_TrackType:
  196. .. rst-class:: classref-enumeration
  197. enum **TrackType**:
  198. .. _class_Animation_constant_TYPE_VALUE:
  199. .. rst-class:: classref-enumeration-constant
  200. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_VALUE** = ``0``
  201. Value tracks set values in node properties, but only those which can be interpolated. For 3D position/rotation/scale, using the dedicated :ref:`TYPE_POSITION_3D<class_Animation_constant_TYPE_POSITION_3D>`, :ref:`TYPE_ROTATION_3D<class_Animation_constant_TYPE_ROTATION_3D>` and :ref:`TYPE_SCALE_3D<class_Animation_constant_TYPE_SCALE_3D>` track types instead of :ref:`TYPE_VALUE<class_Animation_constant_TYPE_VALUE>` is recommended for performance reasons.
  202. .. _class_Animation_constant_TYPE_POSITION_3D:
  203. .. rst-class:: classref-enumeration-constant
  204. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_POSITION_3D** = ``1``
  205. 3D position track (values are stored in :ref:`Vector3<class_Vector3>`\ s).
  206. .. _class_Animation_constant_TYPE_ROTATION_3D:
  207. .. rst-class:: classref-enumeration-constant
  208. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_ROTATION_3D** = ``2``
  209. 3D rotation track (values are stored in :ref:`Quaternion<class_Quaternion>`\ s).
  210. .. _class_Animation_constant_TYPE_SCALE_3D:
  211. .. rst-class:: classref-enumeration-constant
  212. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_SCALE_3D** = ``3``
  213. 3D scale track (values are stored in :ref:`Vector3<class_Vector3>`\ s).
  214. .. _class_Animation_constant_TYPE_BLEND_SHAPE:
  215. .. rst-class:: classref-enumeration-constant
  216. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_BLEND_SHAPE** = ``4``
  217. Blend shape track.
  218. .. _class_Animation_constant_TYPE_METHOD:
  219. .. rst-class:: classref-enumeration-constant
  220. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_METHOD** = ``5``
  221. Method tracks call functions with given arguments per key.
  222. .. _class_Animation_constant_TYPE_BEZIER:
  223. .. rst-class:: classref-enumeration-constant
  224. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_BEZIER** = ``6``
  225. Bezier tracks are used to interpolate a value using custom curves. They can also be used to animate sub-properties of vectors and colors (e.g. alpha value of a :ref:`Color<class_Color>`).
  226. .. _class_Animation_constant_TYPE_AUDIO:
  227. .. rst-class:: classref-enumeration-constant
  228. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_AUDIO** = ``7``
  229. Audio tracks are used to play an audio stream with either type of :ref:`AudioStreamPlayer<class_AudioStreamPlayer>`. The stream can be trimmed and previewed in the animation.
  230. .. _class_Animation_constant_TYPE_ANIMATION:
  231. .. rst-class:: classref-enumeration-constant
  232. :ref:`TrackType<enum_Animation_TrackType>` **TYPE_ANIMATION** = ``8``
  233. Animation tracks play animations in other :ref:`AnimationPlayer<class_AnimationPlayer>` nodes.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _enum_Animation_InterpolationType:
  237. .. rst-class:: classref-enumeration
  238. enum **InterpolationType**:
  239. .. _class_Animation_constant_INTERPOLATION_NEAREST:
  240. .. rst-class:: classref-enumeration-constant
  241. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_NEAREST** = ``0``
  242. No interpolation (nearest value).
  243. .. _class_Animation_constant_INTERPOLATION_LINEAR:
  244. .. rst-class:: classref-enumeration-constant
  245. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR** = ``1``
  246. Linear interpolation.
  247. .. _class_Animation_constant_INTERPOLATION_CUBIC:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC** = ``2``
  250. Cubic interpolation. This looks smoother than linear interpolation, but is more expensive to interpolate. Stick to :ref:`INTERPOLATION_LINEAR<class_Animation_constant_INTERPOLATION_LINEAR>` for complex 3D animations imported from external software, even if it requires using a higher animation framerate in return.
  251. .. _class_Animation_constant_INTERPOLATION_LINEAR_ANGLE:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_LINEAR_ANGLE** = ``3``
  254. Linear interpolation with shortest path rotation.
  255. \ **Note:** The result value is always normalized and may not match the key value.
  256. .. _class_Animation_constant_INTERPOLATION_CUBIC_ANGLE:
  257. .. rst-class:: classref-enumeration-constant
  258. :ref:`InterpolationType<enum_Animation_InterpolationType>` **INTERPOLATION_CUBIC_ANGLE** = ``4``
  259. Cubic interpolation with shortest path rotation.
  260. \ **Note:** The result value is always normalized and may not match the key value.
  261. .. rst-class:: classref-item-separator
  262. ----
  263. .. _enum_Animation_UpdateMode:
  264. .. rst-class:: classref-enumeration
  265. enum **UpdateMode**:
  266. .. _class_Animation_constant_UPDATE_CONTINUOUS:
  267. .. rst-class:: classref-enumeration-constant
  268. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CONTINUOUS** = ``0``
  269. Update between keyframes and hold the value.
  270. .. _class_Animation_constant_UPDATE_DISCRETE:
  271. .. rst-class:: classref-enumeration-constant
  272. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_DISCRETE** = ``1``
  273. Update at the keyframes.
  274. .. _class_Animation_constant_UPDATE_CAPTURE:
  275. .. rst-class:: classref-enumeration-constant
  276. :ref:`UpdateMode<enum_Animation_UpdateMode>` **UPDATE_CAPTURE** = ``2``
  277. Same as linear interpolation, but also interpolates from the current value (i.e. dynamically at runtime) if the first key isn't at 0 seconds.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _enum_Animation_LoopMode:
  281. .. rst-class:: classref-enumeration
  282. enum **LoopMode**:
  283. .. _class_Animation_constant_LOOP_NONE:
  284. .. rst-class:: classref-enumeration-constant
  285. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_NONE** = ``0``
  286. At both ends of the animation, the animation will stop playing.
  287. .. _class_Animation_constant_LOOP_LINEAR:
  288. .. rst-class:: classref-enumeration-constant
  289. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_LINEAR** = ``1``
  290. At both ends of the animation, the animation will be repeated without changing the playback direction.
  291. .. _class_Animation_constant_LOOP_PINGPONG:
  292. .. rst-class:: classref-enumeration-constant
  293. :ref:`LoopMode<enum_Animation_LoopMode>` **LOOP_PINGPONG** = ``2``
  294. Repeats playback and reverse playback at both ends of the animation.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _enum_Animation_LoopedFlag:
  298. .. rst-class:: classref-enumeration
  299. enum **LoopedFlag**:
  300. .. _class_Animation_constant_LOOPED_FLAG_NONE:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_NONE** = ``0``
  303. This flag indicates that the animation proceeds without any looping.
  304. .. _class_Animation_constant_LOOPED_FLAG_END:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_END** = ``1``
  307. This flag indicates that the animation has reached the end of the animation and just after loop processed.
  308. .. _class_Animation_constant_LOOPED_FLAG_START:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`LoopedFlag<enum_Animation_LoopedFlag>` **LOOPED_FLAG_START** = ``2``
  311. This flag indicates that the animation has reached the start of the animation and just after loop processed.
  312. .. rst-class:: classref-item-separator
  313. ----
  314. .. _enum_Animation_FindMode:
  315. .. rst-class:: classref-enumeration
  316. enum **FindMode**:
  317. .. _class_Animation_constant_FIND_MODE_NEAREST:
  318. .. rst-class:: classref-enumeration-constant
  319. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_NEAREST** = ``0``
  320. Finds the nearest time key.
  321. .. _class_Animation_constant_FIND_MODE_APPROX:
  322. .. rst-class:: classref-enumeration-constant
  323. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_APPROX** = ``1``
  324. Finds only the key with approximating the time.
  325. .. _class_Animation_constant_FIND_MODE_EXACT:
  326. .. rst-class:: classref-enumeration-constant
  327. :ref:`FindMode<enum_Animation_FindMode>` **FIND_MODE_EXACT** = ``2``
  328. Finds only the key with matching the time.
  329. .. rst-class:: classref-section-separator
  330. ----
  331. .. rst-class:: classref-descriptions-group
  332. Property Descriptions
  333. ---------------------
  334. .. _class_Animation_property_length:
  335. .. rst-class:: classref-property
  336. :ref:`float<class_float>` **length** = ``1.0``
  337. .. rst-class:: classref-property-setget
  338. - void **set_length** **(** :ref:`float<class_float>` value **)**
  339. - :ref:`float<class_float>` **get_length** **(** **)**
  340. The total length of the animation (in seconds).
  341. \ **Note:** Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping.
  342. .. rst-class:: classref-item-separator
  343. ----
  344. .. _class_Animation_property_loop_mode:
  345. .. rst-class:: classref-property
  346. :ref:`LoopMode<enum_Animation_LoopMode>` **loop_mode** = ``0``
  347. .. rst-class:: classref-property-setget
  348. - void **set_loop_mode** **(** :ref:`LoopMode<enum_Animation_LoopMode>` value **)**
  349. - :ref:`LoopMode<enum_Animation_LoopMode>` **get_loop_mode** **(** **)**
  350. Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation.
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_Animation_property_step:
  354. .. rst-class:: classref-property
  355. :ref:`float<class_float>` **step** = ``0.1``
  356. .. rst-class:: classref-property-setget
  357. - void **set_step** **(** :ref:`float<class_float>` value **)**
  358. - :ref:`float<class_float>` **get_step** **(** **)**
  359. The animation step value.
  360. .. rst-class:: classref-section-separator
  361. ----
  362. .. rst-class:: classref-descriptions-group
  363. Method Descriptions
  364. -------------------
  365. .. _class_Animation_method_add_track:
  366. .. rst-class:: classref-method
  367. :ref:`int<class_int>` **add_track** **(** :ref:`TrackType<enum_Animation_TrackType>` type, :ref:`int<class_int>` at_position=-1 **)**
  368. Adds a track to the Animation.
  369. .. rst-class:: classref-item-separator
  370. ----
  371. .. _class_Animation_method_animation_track_get_key_animation:
  372. .. rst-class:: classref-method
  373. :ref:`StringName<class_StringName>` **animation_track_get_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  374. Returns the animation name at the key identified by ``key_idx``. The ``track_idx`` must be the index of an Animation Track.
  375. .. rst-class:: classref-item-separator
  376. ----
  377. .. _class_Animation_method_animation_track_insert_key:
  378. .. rst-class:: classref-method
  379. :ref:`int<class_int>` **animation_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`StringName<class_StringName>` animation **)**
  380. Inserts a key with value ``animation`` at the given ``time`` (in seconds). The ``track_idx`` must be the index of an Animation Track.
  381. .. rst-class:: classref-item-separator
  382. ----
  383. .. _class_Animation_method_animation_track_set_key_animation:
  384. .. rst-class:: classref-method
  385. void **animation_track_set_key_animation** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`StringName<class_StringName>` animation **)**
  386. Sets the key identified by ``key_idx`` to value ``animation``. The ``track_idx`` must be the index of an Animation Track.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_Animation_method_audio_track_get_key_end_offset:
  390. .. rst-class:: classref-method
  391. :ref:`float<class_float>` **audio_track_get_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  392. Returns the end offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  393. End offset is the number of seconds cut off at the ending of the audio stream.
  394. .. rst-class:: classref-item-separator
  395. ----
  396. .. _class_Animation_method_audio_track_get_key_start_offset:
  397. .. rst-class:: classref-method
  398. :ref:`float<class_float>` **audio_track_get_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  399. Returns the start offset of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  400. Start offset is the number of seconds cut off at the beginning of the audio stream.
  401. .. rst-class:: classref-item-separator
  402. ----
  403. .. _class_Animation_method_audio_track_get_key_stream:
  404. .. rst-class:: classref-method
  405. :ref:`Resource<class_Resource>` **audio_track_get_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  406. Returns the audio stream of the key identified by ``key_idx``. The ``track_idx`` must be the index of an Audio Track.
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_Animation_method_audio_track_insert_key:
  410. .. rst-class:: classref-method
  411. :ref:`int<class_int>` **audio_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Resource<class_Resource>` stream, :ref:`float<class_float>` start_offset=0, :ref:`float<class_float>` end_offset=0 **)**
  412. Inserts an Audio Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of an Audio Track.
  413. \ ``stream`` is the :ref:`AudioStream<class_AudioStream>` resource to play. ``start_offset`` is the number of seconds cut off at the beginning of the audio stream, while ``end_offset`` is at the ending.
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _class_Animation_method_audio_track_is_use_blend:
  417. .. rst-class:: classref-method
  418. :ref:`bool<class_bool>` **audio_track_is_use_blend** **(** :ref:`int<class_int>` track_idx **)** |const|
  419. Returns ``true`` if the track at ``track_idx`` will be blended with other animations.
  420. .. rst-class:: classref-item-separator
  421. ----
  422. .. _class_Animation_method_audio_track_set_key_end_offset:
  423. .. rst-class:: classref-method
  424. void **audio_track_set_key_end_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)**
  425. Sets the end offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track.
  426. .. rst-class:: classref-item-separator
  427. ----
  428. .. _class_Animation_method_audio_track_set_key_start_offset:
  429. .. rst-class:: classref-method
  430. void **audio_track_set_key_start_offset** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` offset **)**
  431. Sets the start offset of the key identified by ``key_idx`` to value ``offset``. The ``track_idx`` must be the index of an Audio Track.
  432. .. rst-class:: classref-item-separator
  433. ----
  434. .. _class_Animation_method_audio_track_set_key_stream:
  435. .. rst-class:: classref-method
  436. void **audio_track_set_key_stream** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Resource<class_Resource>` stream **)**
  437. Sets the stream of the key identified by ``key_idx`` to value ``stream``. The ``track_idx`` must be the index of an Audio Track.
  438. .. rst-class:: classref-item-separator
  439. ----
  440. .. _class_Animation_method_audio_track_set_use_blend:
  441. .. rst-class:: classref-method
  442. void **audio_track_set_use_blend** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enable **)**
  443. Sets whether the track will be blended with other animations. If ``true``, the audio playback volume changes depending on the blend value.
  444. .. rst-class:: classref-item-separator
  445. ----
  446. .. _class_Animation_method_bezier_track_get_key_in_handle:
  447. .. rst-class:: classref-method
  448. :ref:`Vector2<class_Vector2>` **bezier_track_get_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  449. Returns the in handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  450. .. rst-class:: classref-item-separator
  451. ----
  452. .. _class_Animation_method_bezier_track_get_key_out_handle:
  453. .. rst-class:: classref-method
  454. :ref:`Vector2<class_Vector2>` **bezier_track_get_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  455. Returns the out handle of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  456. .. rst-class:: classref-item-separator
  457. ----
  458. .. _class_Animation_method_bezier_track_get_key_value:
  459. .. rst-class:: classref-method
  460. :ref:`float<class_float>` **bezier_track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  461. Returns the value of the key identified by ``key_idx``. The ``track_idx`` must be the index of a Bezier Track.
  462. .. rst-class:: classref-item-separator
  463. ----
  464. .. _class_Animation_method_bezier_track_insert_key:
  465. .. rst-class:: classref-method
  466. :ref:`int<class_int>` **bezier_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` value, :ref:`Vector2<class_Vector2>` in_handle=Vector2(0, 0), :ref:`Vector2<class_Vector2>` out_handle=Vector2(0, 0) **)**
  467. Inserts a Bezier Track key at the given ``time`` in seconds. The ``track_idx`` must be the index of a Bezier Track.
  468. \ ``in_handle`` is the left-side weight of the added Bezier curve point, ``out_handle`` is the right-side one, while ``value`` is the actual value at this point.
  469. .. rst-class:: classref-item-separator
  470. ----
  471. .. _class_Animation_method_bezier_track_interpolate:
  472. .. rst-class:: classref-method
  473. :ref:`float<class_float>` **bezier_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)** |const|
  474. Returns the interpolated value at the given ``time`` (in seconds). The ``track_idx`` must be the index of a Bezier Track.
  475. .. rst-class:: classref-item-separator
  476. ----
  477. .. _class_Animation_method_bezier_track_set_key_in_handle:
  478. .. rst-class:: classref-method
  479. void **bezier_track_set_key_in_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` in_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)**
  480. Sets the in handle of the key identified by ``key_idx`` to value ``in_handle``. The ``track_idx`` must be the index of a Bezier Track.
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_Animation_method_bezier_track_set_key_out_handle:
  484. .. rst-class:: classref-method
  485. void **bezier_track_set_key_out_handle** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`Vector2<class_Vector2>` out_handle, :ref:`float<class_float>` balanced_value_time_ratio=1.0 **)**
  486. Sets the out handle of the key identified by ``key_idx`` to value ``out_handle``. The ``track_idx`` must be the index of a Bezier Track.
  487. .. rst-class:: classref-item-separator
  488. ----
  489. .. _class_Animation_method_bezier_track_set_key_value:
  490. .. rst-class:: classref-method
  491. void **bezier_track_set_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` value **)**
  492. Sets the value of the key identified by ``key_idx`` to the given value. The ``track_idx`` must be the index of a Bezier Track.
  493. .. rst-class:: classref-item-separator
  494. ----
  495. .. _class_Animation_method_blend_shape_track_insert_key:
  496. .. rst-class:: classref-method
  497. :ref:`int<class_int>` **blend_shape_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`float<class_float>` amount **)**
  498. Inserts a key in a given blend shape track. Returns the key index.
  499. .. rst-class:: classref-item-separator
  500. ----
  501. .. _class_Animation_method_blend_shape_track_interpolate:
  502. .. rst-class:: classref-method
  503. :ref:`float<class_float>` **blend_shape_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  504. Returns the interpolated blend shape value at the given time (in seconds). The ``track_idx`` must be the index of a blend shape track.
  505. .. rst-class:: classref-item-separator
  506. ----
  507. .. _class_Animation_method_clear:
  508. .. rst-class:: classref-method
  509. void **clear** **(** **)**
  510. Clear the animation (clear all tracks and reset all).
  511. .. rst-class:: classref-item-separator
  512. ----
  513. .. _class_Animation_method_compress:
  514. .. rst-class:: classref-method
  515. void **compress** **(** :ref:`int<class_int>` page_size=8192, :ref:`int<class_int>` fps=120, :ref:`float<class_float>` split_tolerance=4.0 **)**
  516. Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed<class_Animation_method_track_is_compressed>` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions.
  517. \ **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them.
  518. .. rst-class:: classref-item-separator
  519. ----
  520. .. _class_Animation_method_copy_track:
  521. .. rst-class:: classref-method
  522. void **copy_track** **(** :ref:`int<class_int>` track_idx, :ref:`Animation<class_Animation>` to_animation **)**
  523. Adds a new track to ``to_animation`` that is a copy of the given track from this animation.
  524. .. rst-class:: classref-item-separator
  525. ----
  526. .. _class_Animation_method_find_track:
  527. .. rst-class:: classref-method
  528. :ref:`int<class_int>` **find_track** **(** :ref:`NodePath<class_NodePath>` path, :ref:`TrackType<enum_Animation_TrackType>` type **)** |const|
  529. Returns the index of the specified track. If the track is not found, return -1.
  530. .. rst-class:: classref-item-separator
  531. ----
  532. .. _class_Animation_method_get_track_count:
  533. .. rst-class:: classref-method
  534. :ref:`int<class_int>` **get_track_count** **(** **)** |const|
  535. Returns the amount of tracks in the animation.
  536. .. rst-class:: classref-item-separator
  537. ----
  538. .. _class_Animation_method_method_track_get_name:
  539. .. rst-class:: classref-method
  540. :ref:`StringName<class_StringName>` **method_track_get_name** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  541. Returns the method name of a method track.
  542. .. rst-class:: classref-item-separator
  543. ----
  544. .. _class_Animation_method_method_track_get_params:
  545. .. rst-class:: classref-method
  546. :ref:`Array<class_Array>` **method_track_get_params** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  547. Returns the arguments values to be called on a method track for a given key in a given track.
  548. .. rst-class:: classref-item-separator
  549. ----
  550. .. _class_Animation_method_position_track_insert_key:
  551. .. rst-class:: classref-method
  552. :ref:`int<class_int>` **position_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` position **)**
  553. Inserts a key in a given 3D position track. Returns the key index.
  554. .. rst-class:: classref-item-separator
  555. ----
  556. .. _class_Animation_method_position_track_interpolate:
  557. .. rst-class:: classref-method
  558. :ref:`Vector3<class_Vector3>` **position_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  559. Returns the interpolated position value at the given time (in seconds). The ``track_idx`` must be the index of a 3D position track.
  560. .. rst-class:: classref-item-separator
  561. ----
  562. .. _class_Animation_method_remove_track:
  563. .. rst-class:: classref-method
  564. void **remove_track** **(** :ref:`int<class_int>` track_idx **)**
  565. Removes a track by specifying the track index.
  566. .. rst-class:: classref-item-separator
  567. ----
  568. .. _class_Animation_method_rotation_track_insert_key:
  569. .. rst-class:: classref-method
  570. :ref:`int<class_int>` **rotation_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Quaternion<class_Quaternion>` rotation **)**
  571. Inserts a key in a given 3D rotation track. Returns the key index.
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_Animation_method_rotation_track_interpolate:
  575. .. rst-class:: classref-method
  576. :ref:`Quaternion<class_Quaternion>` **rotation_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  577. Returns the interpolated rotation value at the given time (in seconds). The ``track_idx`` must be the index of a 3D rotation track.
  578. .. rst-class:: classref-item-separator
  579. ----
  580. .. _class_Animation_method_scale_track_insert_key:
  581. .. rst-class:: classref-method
  582. :ref:`int<class_int>` **scale_track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Vector3<class_Vector3>` scale **)**
  583. Inserts a key in a given 3D scale track. Returns the key index.
  584. .. rst-class:: classref-item-separator
  585. ----
  586. .. _class_Animation_method_scale_track_interpolate:
  587. .. rst-class:: classref-method
  588. :ref:`Vector3<class_Vector3>` **scale_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  589. Returns the interpolated scale value at the given time (in seconds). The ``track_idx`` must be the index of a 3D scale track.
  590. .. rst-class:: classref-item-separator
  591. ----
  592. .. _class_Animation_method_track_find_key:
  593. .. rst-class:: classref-method
  594. :ref:`int<class_int>` **track_find_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`FindMode<enum_Animation_FindMode>` find_mode=0 **)** |const|
  595. Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _class_Animation_method_track_get_interpolation_loop_wrap:
  599. .. rst-class:: classref-method
  600. :ref:`bool<class_bool>` **track_get_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx **)** |const|
  601. Returns ``true`` if the track at ``track_idx`` wraps the interpolation loop. New tracks wrap the interpolation loop by default.
  602. .. rst-class:: classref-item-separator
  603. ----
  604. .. _class_Animation_method_track_get_interpolation_type:
  605. .. rst-class:: classref-method
  606. :ref:`InterpolationType<enum_Animation_InterpolationType>` **track_get_interpolation_type** **(** :ref:`int<class_int>` track_idx **)** |const|
  607. Returns the interpolation type of a given track.
  608. .. rst-class:: classref-item-separator
  609. ----
  610. .. _class_Animation_method_track_get_key_count:
  611. .. rst-class:: classref-method
  612. :ref:`int<class_int>` **track_get_key_count** **(** :ref:`int<class_int>` track_idx **)** |const|
  613. Returns the number of keys in a given track.
  614. .. rst-class:: classref-item-separator
  615. ----
  616. .. _class_Animation_method_track_get_key_time:
  617. .. rst-class:: classref-method
  618. :ref:`float<class_float>` **track_get_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  619. Returns the time at which the key is located.
  620. .. rst-class:: classref-item-separator
  621. ----
  622. .. _class_Animation_method_track_get_key_transition:
  623. .. rst-class:: classref-method
  624. :ref:`float<class_float>` **track_get_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  625. Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
  626. .. rst-class:: classref-item-separator
  627. ----
  628. .. _class_Animation_method_track_get_key_value:
  629. .. rst-class:: classref-method
  630. :ref:`Variant<class_Variant>` **track_get_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)** |const|
  631. Returns the value of a given key in a given track.
  632. .. rst-class:: classref-item-separator
  633. ----
  634. .. _class_Animation_method_track_get_path:
  635. .. rst-class:: classref-method
  636. :ref:`NodePath<class_NodePath>` **track_get_path** **(** :ref:`int<class_int>` track_idx **)** |const|
  637. Gets the path of a track. For more information on the path format, see :ref:`track_set_path<class_Animation_method_track_set_path>`.
  638. .. rst-class:: classref-item-separator
  639. ----
  640. .. _class_Animation_method_track_get_type:
  641. .. rst-class:: classref-method
  642. :ref:`TrackType<enum_Animation_TrackType>` **track_get_type** **(** :ref:`int<class_int>` track_idx **)** |const|
  643. Gets the type of a track.
  644. .. rst-class:: classref-item-separator
  645. ----
  646. .. _class_Animation_method_track_insert_key:
  647. .. rst-class:: classref-method
  648. :ref:`int<class_int>` **track_insert_key** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time, :ref:`Variant<class_Variant>` key, :ref:`float<class_float>` transition=1 **)**
  649. Inserts a generic key in a given track. Returns the key index.
  650. .. rst-class:: classref-item-separator
  651. ----
  652. .. _class_Animation_method_track_is_compressed:
  653. .. rst-class:: classref-method
  654. :ref:`bool<class_bool>` **track_is_compressed** **(** :ref:`int<class_int>` track_idx **)** |const|
  655. Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress<class_Animation_method_compress>`.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_Animation_method_track_is_enabled:
  659. .. rst-class:: classref-method
  660. :ref:`bool<class_bool>` **track_is_enabled** **(** :ref:`int<class_int>` track_idx **)** |const|
  661. Returns ``true`` if the track at index ``track_idx`` is enabled.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_Animation_method_track_is_imported:
  665. .. rst-class:: classref-method
  666. :ref:`bool<class_bool>` **track_is_imported** **(** :ref:`int<class_int>` track_idx **)** |const|
  667. Returns ``true`` if the given track is imported. Else, return ``false``.
  668. .. rst-class:: classref-item-separator
  669. ----
  670. .. _class_Animation_method_track_move_down:
  671. .. rst-class:: classref-method
  672. void **track_move_down** **(** :ref:`int<class_int>` track_idx **)**
  673. Moves a track down.
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_Animation_method_track_move_to:
  677. .. rst-class:: classref-method
  678. void **track_move_to** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` to_idx **)**
  679. Changes the index position of track ``track_idx`` to the one defined in ``to_idx``.
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _class_Animation_method_track_move_up:
  683. .. rst-class:: classref-method
  684. void **track_move_up** **(** :ref:`int<class_int>` track_idx **)**
  685. Moves a track up.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_Animation_method_track_remove_key:
  689. .. rst-class:: classref-method
  690. void **track_remove_key** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx **)**
  691. Removes a key by index in a given track.
  692. .. rst-class:: classref-item-separator
  693. ----
  694. .. _class_Animation_method_track_remove_key_at_time:
  695. .. rst-class:: classref-method
  696. void **track_remove_key_at_time** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time **)**
  697. Removes a key at ``time`` in a given track.
  698. .. rst-class:: classref-item-separator
  699. ----
  700. .. _class_Animation_method_track_set_enabled:
  701. .. rst-class:: classref-method
  702. void **track_set_enabled** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` enabled **)**
  703. Enables/disables the given track. Tracks are enabled by default.
  704. .. rst-class:: classref-item-separator
  705. ----
  706. .. _class_Animation_method_track_set_imported:
  707. .. rst-class:: classref-method
  708. void **track_set_imported** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` imported **)**
  709. Sets the given track as imported or not.
  710. .. rst-class:: classref-item-separator
  711. ----
  712. .. _class_Animation_method_track_set_interpolation_loop_wrap:
  713. .. rst-class:: classref-method
  714. void **track_set_interpolation_loop_wrap** **(** :ref:`int<class_int>` track_idx, :ref:`bool<class_bool>` interpolation **)**
  715. If ``true``, the track at ``track_idx`` wraps the interpolation loop.
  716. .. rst-class:: classref-item-separator
  717. ----
  718. .. _class_Animation_method_track_set_interpolation_type:
  719. .. rst-class:: classref-method
  720. void **track_set_interpolation_type** **(** :ref:`int<class_int>` track_idx, :ref:`InterpolationType<enum_Animation_InterpolationType>` interpolation **)**
  721. Sets the interpolation type of a given track.
  722. .. rst-class:: classref-item-separator
  723. ----
  724. .. _class_Animation_method_track_set_key_time:
  725. .. rst-class:: classref-method
  726. void **track_set_key_time** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` time **)**
  727. Sets the time of an existing key.
  728. .. rst-class:: classref-item-separator
  729. ----
  730. .. _class_Animation_method_track_set_key_transition:
  731. .. rst-class:: classref-method
  732. void **track_set_key_transition** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key_idx, :ref:`float<class_float>` transition **)**
  733. Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease<class_@GlobalScope_method_ease>`).
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_Animation_method_track_set_key_value:
  737. .. rst-class:: classref-method
  738. void **track_set_key_value** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` key, :ref:`Variant<class_Variant>` value **)**
  739. Sets the value of an existing key.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_Animation_method_track_set_path:
  743. .. rst-class:: classref-method
  744. void **track_set_path** **(** :ref:`int<class_int>` track_idx, :ref:`NodePath<class_NodePath>` path **)**
  745. Sets the path of a track. 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. Tracks that control properties or bones must append their name after the path, separated by ``":"``.
  746. For example, ``"character/skeleton:ankle"`` or ``"character/mesh:transform/local"``.
  747. .. rst-class:: classref-item-separator
  748. ----
  749. .. _class_Animation_method_track_swap:
  750. .. rst-class:: classref-method
  751. void **track_swap** **(** :ref:`int<class_int>` track_idx, :ref:`int<class_int>` with_idx **)**
  752. Swaps the track ``track_idx``'s index position with the track ``with_idx``.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_Animation_method_value_track_get_update_mode:
  756. .. rst-class:: classref-method
  757. :ref:`UpdateMode<enum_Animation_UpdateMode>` **value_track_get_update_mode** **(** :ref:`int<class_int>` track_idx **)** |const|
  758. Returns the update mode of a value track.
  759. .. rst-class:: classref-item-separator
  760. ----
  761. .. _class_Animation_method_value_track_interpolate:
  762. .. rst-class:: classref-method
  763. :ref:`Variant<class_Variant>` **value_track_interpolate** **(** :ref:`int<class_int>` track_idx, :ref:`float<class_float>` time_sec **)** |const|
  764. Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track.
  765. .. rst-class:: classref-item-separator
  766. ----
  767. .. _class_Animation_method_value_track_set_update_mode:
  768. .. rst-class:: classref-method
  769. void **value_track_set_update_mode** **(** :ref:`int<class_int>` track_idx, :ref:`UpdateMode<enum_Animation_UpdateMode>` mode **)**
  770. Sets the update mode (see :ref:`UpdateMode<enum_Animation_UpdateMode>`) of a value track.
  771. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  772. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  773. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  774. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  775. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  776. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  777. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`