class_skeletonmodificationstack2d.rst 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253
  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/SkeletonModificationStack2D.xml.
  6. .. _class_SkeletonModificationStack2D:
  7. SkeletonModificationStack2D
  8. ===========================
  9. **Experimental:** This class may be changed or removed in future versions.
  10. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  11. A resource that holds a stack of :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. This resource is used by the Skeleton and holds a stack of :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s.
  16. This controls the order of the modifications and how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine *before* the arms on a humanoid skeleton.
  17. This resource also controls how strongly all of the modifications are applied to the :ref:`Skeleton2D<class_Skeleton2D>`.
  18. .. rst-class:: classref-reftable-group
  19. Properties
  20. ----------
  21. .. table::
  22. :widths: auto
  23. +---------------------------+------------------------------------------------------------------------------------------+-----------+
  24. | :ref:`bool<class_bool>` | :ref:`enabled<class_SkeletonModificationStack2D_property_enabled>` | ``false`` |
  25. +---------------------------+------------------------------------------------------------------------------------------+-----------+
  26. | :ref:`int<class_int>` | :ref:`modification_count<class_SkeletonModificationStack2D_property_modification_count>` | ``0`` |
  27. +---------------------------+------------------------------------------------------------------------------------------+-----------+
  28. | :ref:`float<class_float>` | :ref:`strength<class_SkeletonModificationStack2D_property_strength>` | ``1.0`` |
  29. +---------------------------+------------------------------------------------------------------------------------------+-----------+
  30. .. rst-class:: classref-reftable-group
  31. Methods
  32. -------
  33. .. table::
  34. :widths: auto
  35. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | |void| | :ref:`add_modification<class_SkeletonModificationStack2D_method_add_modification>`\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) |
  37. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | |void| | :ref:`delete_modification<class_SkeletonModificationStack2D_method_delete_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) |
  39. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | |void| | :ref:`enable_all_modifications<class_SkeletonModificationStack2D_method_enable_all_modifications>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |
  41. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | |void| | :ref:`execute<class_SkeletonModificationStack2D_method_execute>`\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) |
  43. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`bool<class_bool>` | :ref:`get_is_setup<class_SkeletonModificationStack2D_method_get_is_setup>`\ (\ ) |const| |
  45. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`SkeletonModification2D<class_SkeletonModification2D>` | :ref:`get_modification<class_SkeletonModificationStack2D_method_get_modification>`\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| |
  47. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`Skeleton2D<class_Skeleton2D>` | :ref:`get_skeleton<class_SkeletonModificationStack2D_method_get_skeleton>`\ (\ ) |const| |
  49. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | |void| | :ref:`set_modification<class_SkeletonModificationStack2D_method_set_modification>`\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) |
  51. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | |void| | :ref:`setup<class_SkeletonModificationStack2D_method_setup>`\ (\ ) |
  53. +-------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. .. rst-class:: classref-section-separator
  55. ----
  56. .. rst-class:: classref-descriptions-group
  57. Property Descriptions
  58. ---------------------
  59. .. _class_SkeletonModificationStack2D_property_enabled:
  60. .. rst-class:: classref-property
  61. :ref:`bool<class_bool>` **enabled** = ``false`` :ref:`🔗<class_SkeletonModificationStack2D_property_enabled>`
  62. .. rst-class:: classref-property-setget
  63. - |void| **set_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
  64. - :ref:`bool<class_bool>` **get_enabled**\ (\ )
  65. If ``true``, the modification's in the stack will be called. This is handled automatically through the :ref:`Skeleton2D<class_Skeleton2D>` node.
  66. .. rst-class:: classref-item-separator
  67. ----
  68. .. _class_SkeletonModificationStack2D_property_modification_count:
  69. .. rst-class:: classref-property
  70. :ref:`int<class_int>` **modification_count** = ``0`` :ref:`🔗<class_SkeletonModificationStack2D_property_modification_count>`
  71. .. rst-class:: classref-property-setget
  72. - |void| **set_modification_count**\ (\ value\: :ref:`int<class_int>`\ )
  73. - :ref:`int<class_int>` **get_modification_count**\ (\ )
  74. The number of modifications in the stack.
  75. .. rst-class:: classref-item-separator
  76. ----
  77. .. _class_SkeletonModificationStack2D_property_strength:
  78. .. rst-class:: classref-property
  79. :ref:`float<class_float>` **strength** = ``1.0`` :ref:`🔗<class_SkeletonModificationStack2D_property_strength>`
  80. .. rst-class:: classref-property-setget
  81. - |void| **set_strength**\ (\ value\: :ref:`float<class_float>`\ )
  82. - :ref:`float<class_float>` **get_strength**\ (\ )
  83. The interpolation strength of the modifications in stack. A value of ``0`` will make it where the modifications are not applied, a strength of ``0.5`` will be half applied, and a strength of ``1`` will allow the modifications to be fully applied and override the :ref:`Skeleton2D<class_Skeleton2D>` :ref:`Bone2D<class_Bone2D>` poses.
  84. .. rst-class:: classref-section-separator
  85. ----
  86. .. rst-class:: classref-descriptions-group
  87. Method Descriptions
  88. -------------------
  89. .. _class_SkeletonModificationStack2D_method_add_modification:
  90. .. rst-class:: classref-method
  91. |void| **add_modification**\ (\ modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_add_modification>`
  92. Adds the passed-in :ref:`SkeletonModification2D<class_SkeletonModification2D>` to the stack.
  93. .. rst-class:: classref-item-separator
  94. ----
  95. .. _class_SkeletonModificationStack2D_method_delete_modification:
  96. .. rst-class:: classref-method
  97. |void| **delete_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_delete_modification>`
  98. Deletes the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the index position ``mod_idx``, if it exists.
  99. .. rst-class:: classref-item-separator
  100. ----
  101. .. _class_SkeletonModificationStack2D_method_enable_all_modifications:
  102. .. rst-class:: classref-method
  103. |void| **enable_all_modifications**\ (\ enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_enable_all_modifications>`
  104. Enables all :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s in the stack.
  105. .. rst-class:: classref-item-separator
  106. ----
  107. .. _class_SkeletonModificationStack2D_method_execute:
  108. .. rst-class:: classref-method
  109. |void| **execute**\ (\ delta\: :ref:`float<class_float>`, execution_mode\: :ref:`int<class_int>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_execute>`
  110. Executes all of the :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ s in the stack that use the same execution mode as the passed-in ``execution_mode``, starting from index ``0`` to :ref:`modification_count<class_SkeletonModificationStack2D_property_modification_count>`.
  111. \ **Note:** The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results.
  112. .. rst-class:: classref-item-separator
  113. ----
  114. .. _class_SkeletonModificationStack2D_method_get_is_setup:
  115. .. rst-class:: classref-method
  116. :ref:`bool<class_bool>` **get_is_setup**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_is_setup>`
  117. Returns a boolean that indicates whether the modification stack is setup and can execute.
  118. .. rst-class:: classref-item-separator
  119. ----
  120. .. _class_SkeletonModificationStack2D_method_get_modification:
  121. .. rst-class:: classref-method
  122. :ref:`SkeletonModification2D<class_SkeletonModification2D>` **get_modification**\ (\ mod_idx\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_modification>`
  123. Returns the :ref:`SkeletonModification2D<class_SkeletonModification2D>` at the passed-in index, ``mod_idx``.
  124. .. rst-class:: classref-item-separator
  125. ----
  126. .. _class_SkeletonModificationStack2D_method_get_skeleton:
  127. .. rst-class:: classref-method
  128. :ref:`Skeleton2D<class_Skeleton2D>` **get_skeleton**\ (\ ) |const| :ref:`🔗<class_SkeletonModificationStack2D_method_get_skeleton>`
  129. Returns the :ref:`Skeleton2D<class_Skeleton2D>` node that the SkeletonModificationStack2D is bound to.
  130. .. rst-class:: classref-item-separator
  131. ----
  132. .. _class_SkeletonModificationStack2D_method_set_modification:
  133. .. rst-class:: classref-method
  134. |void| **set_modification**\ (\ mod_idx\: :ref:`int<class_int>`, modification\: :ref:`SkeletonModification2D<class_SkeletonModification2D>`\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_set_modification>`
  135. Sets the modification at ``mod_idx`` to the passed-in modification, ``modification``.
  136. .. rst-class:: classref-item-separator
  137. ----
  138. .. _class_SkeletonModificationStack2D_method_setup:
  139. .. rst-class:: classref-method
  140. |void| **setup**\ (\ ) :ref:`🔗<class_SkeletonModificationStack2D_method_setup>`
  141. Sets up the modification stack so it can execute. This function should be called by :ref:`Skeleton2D<class_Skeleton2D>` and shouldn't be manually called unless you know what you are doing.
  142. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  143. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  144. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  145. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  146. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  147. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  148. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  149. .. |void| replace:: :abbr:`void (No return value.)`