Skeleton.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Skeleton" inherits="Spatial" category="Core" version="3.0.alpha.custom_build">
  3. <brief_description>
  4. Skeleton for characters and animated objects.
  5. </brief_description>
  6. <description>
  7. Skeleton provides a hierarchical interface for managing bones, including pose, rest and animation (see [Animation]). Skeleton will support rag doll dynamics in the future.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="add_bone">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="name" type="String">
  18. </argument>
  19. <description>
  20. Add a bone, with name "name". [method get_bone_count] will become the bone index.
  21. </description>
  22. </method>
  23. <method name="bind_child_node_to_bone">
  24. <return type="void">
  25. </return>
  26. <argument index="0" name="bone_idx" type="int">
  27. </argument>
  28. <argument index="1" name="node" type="Node">
  29. </argument>
  30. <description>
  31. Deprecated soon.
  32. </description>
  33. </method>
  34. <method name="clear_bones">
  35. <return type="void">
  36. </return>
  37. <description>
  38. Clear all the bones in this skeleton.
  39. </description>
  40. </method>
  41. <method name="find_bone" qualifiers="const">
  42. <return type="int">
  43. </return>
  44. <argument index="0" name="name" type="String">
  45. </argument>
  46. <description>
  47. Return the bone index that matches "name" as its name.
  48. </description>
  49. </method>
  50. <method name="get_bone_count" qualifiers="const">
  51. <return type="int">
  52. </return>
  53. <description>
  54. Return the amount of bones in the skeleton.
  55. </description>
  56. </method>
  57. <method name="get_bone_custom_pose" qualifiers="const">
  58. <return type="Transform">
  59. </return>
  60. <argument index="0" name="bone_idx" type="int">
  61. </argument>
  62. <description>
  63. </description>
  64. </method>
  65. <method name="get_bone_global_pose" qualifiers="const">
  66. <return type="Transform">
  67. </return>
  68. <argument index="0" name="bone_idx" type="int">
  69. </argument>
  70. <description>
  71. </description>
  72. </method>
  73. <method name="get_bone_name" qualifiers="const">
  74. <return type="String">
  75. </return>
  76. <argument index="0" name="bone_idx" type="int">
  77. </argument>
  78. <description>
  79. Return the name of the bone at index "index"
  80. </description>
  81. </method>
  82. <method name="get_bone_parent" qualifiers="const">
  83. <return type="int">
  84. </return>
  85. <argument index="0" name="bone_idx" type="int">
  86. </argument>
  87. <description>
  88. Return the bone index which is the parent of the bone at "bone_idx". If -1, then bone has no parent. Note that the parent bone returned will always be less than "bone_idx".
  89. </description>
  90. </method>
  91. <method name="get_bone_pose" qualifiers="const">
  92. <return type="Transform">
  93. </return>
  94. <argument index="0" name="bone_idx" type="int">
  95. </argument>
  96. <description>
  97. Return the pose transform for bone "bone_idx".
  98. </description>
  99. </method>
  100. <method name="get_bone_rest" qualifiers="const">
  101. <return type="Transform">
  102. </return>
  103. <argument index="0" name="bone_idx" type="int">
  104. </argument>
  105. <description>
  106. Return the rest transform for a bone "bone_idx".
  107. </description>
  108. </method>
  109. <method name="get_bone_transform" qualifiers="const">
  110. <return type="Transform">
  111. </return>
  112. <argument index="0" name="bone_idx" type="int">
  113. </argument>
  114. <description>
  115. </description>
  116. </method>
  117. <method name="get_bound_child_nodes_to_bone" qualifiers="const">
  118. <return type="Array">
  119. </return>
  120. <argument index="0" name="bone_idx" type="int">
  121. </argument>
  122. <description>
  123. Deprecated soon.
  124. </description>
  125. </method>
  126. <method name="is_bone_rest_disabled" qualifiers="const">
  127. <return type="bool">
  128. </return>
  129. <argument index="0" name="bone_idx" type="int">
  130. </argument>
  131. <description>
  132. </description>
  133. </method>
  134. <method name="set_bone_custom_pose">
  135. <return type="void">
  136. </return>
  137. <argument index="0" name="bone_idx" type="int">
  138. </argument>
  139. <argument index="1" name="custom_pose" type="Transform">
  140. </argument>
  141. <description>
  142. </description>
  143. </method>
  144. <method name="set_bone_disable_rest">
  145. <return type="void">
  146. </return>
  147. <argument index="0" name="bone_idx" type="int">
  148. </argument>
  149. <argument index="1" name="disable" type="bool">
  150. </argument>
  151. <description>
  152. </description>
  153. </method>
  154. <method name="set_bone_global_pose">
  155. <return type="void">
  156. </return>
  157. <argument index="0" name="bone_idx" type="int">
  158. </argument>
  159. <argument index="1" name="pose" type="Transform">
  160. </argument>
  161. <description>
  162. </description>
  163. </method>
  164. <method name="set_bone_parent">
  165. <return type="void">
  166. </return>
  167. <argument index="0" name="bone_idx" type="int">
  168. </argument>
  169. <argument index="1" name="parent_idx" type="int">
  170. </argument>
  171. <description>
  172. Set the bone index "parent_idx" as the parent of the bone at "bone_idx". If -1, then bone has no parent. Note: "parent_idx" must be less than "bone_idx".
  173. </description>
  174. </method>
  175. <method name="set_bone_pose">
  176. <return type="void">
  177. </return>
  178. <argument index="0" name="bone_idx" type="int">
  179. </argument>
  180. <argument index="1" name="pose" type="Transform">
  181. </argument>
  182. <description>
  183. Return the pose transform for bone "bone_idx".
  184. </description>
  185. </method>
  186. <method name="set_bone_rest">
  187. <return type="void">
  188. </return>
  189. <argument index="0" name="bone_idx" type="int">
  190. </argument>
  191. <argument index="1" name="rest" type="Transform">
  192. </argument>
  193. <description>
  194. Set the rest transform for bone "bone_idx"
  195. </description>
  196. </method>
  197. <method name="unbind_child_node_from_bone">
  198. <return type="void">
  199. </return>
  200. <argument index="0" name="bone_idx" type="int">
  201. </argument>
  202. <argument index="1" name="node" type="Node">
  203. </argument>
  204. <description>
  205. Deprecated soon.
  206. </description>
  207. </method>
  208. <method name="unparent_bone_and_rest">
  209. <return type="void">
  210. </return>
  211. <argument index="0" name="bone_idx" type="int">
  212. </argument>
  213. <description>
  214. </description>
  215. </method>
  216. </methods>
  217. <constants>
  218. <constant name="NOTIFICATION_UPDATE_SKELETON" value="50" enum="">
  219. </constant>
  220. </constants>
  221. </class>