class_gltfstate.rst 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826
  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/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/modules/gltf/doc_classes/GLTFState.xml.
  6. .. _class_GLTFState:
  7. GLTFState
  8. =========
  9. **Inherits:** :ref:`Resource<class_Resource>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Represents all data of a GLTF file.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **Note:** This class is only compiled in editor builds. Run-time glTF loading and saving is *not* available in exported projects. References to **GLTFState** within a script will cause an error in an exported project.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  21. | :ref:`Array<class_Array>` | :ref:`buffers<class_GLTFState_property_buffers>` | ``[ ]`` |
  22. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  23. | :ref:`bool<class_bool>` | :ref:`create_animations<class_GLTFState_property_create_animations>` | ``true`` |
  24. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  25. | :ref:`PoolByteArray<class_PoolByteArray>` | :ref:`glb_data<class_GLTFState_property_glb_data>` | ``PoolByteArray( )`` |
  26. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  27. | :ref:`Dictionary<class_Dictionary>` | :ref:`json<class_GLTFState_property_json>` | ``{}`` |
  28. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  29. | :ref:`int<class_int>` | :ref:`major_version<class_GLTFState_property_major_version>` | ``0`` |
  30. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  31. | :ref:`int<class_int>` | :ref:`minor_version<class_GLTFState_property_minor_version>` | ``0`` |
  32. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  33. | :ref:`Array<class_Array>` | :ref:`root_nodes<class_GLTFState_property_root_nodes>` | ``[ ]`` |
  34. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  35. | :ref:`String<class_String>` | :ref:`scene_name<class_GLTFState_property_scene_name>` | ``""`` |
  36. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  37. | :ref:`bool<class_bool>` | :ref:`use_named_skin_binds<class_GLTFState_property_use_named_skin_binds>` | ``false`` |
  38. +-------------------------------------------+----------------------------------------------------------------------------+-----------------------+
  39. .. rst-class:: classref-reftable-group
  40. Methods
  41. -------
  42. .. table::
  43. :widths: auto
  44. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`add_used_extension<class_GLTFState_method_add_used_extension>` **(** :ref:`String<class_String>` extension_name, :ref:`bool<class_bool>` required **)** |
  46. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`Array<class_Array>` | :ref:`get_accessors<class_GLTFState_method_get_accessors>` **(** **)** |
  48. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Variant<class_Variant>` | :ref:`get_additional_data<class_GLTFState_method_get_additional_data>` **(** :ref:`String<class_String>` extension_name **)** |
  50. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`AnimationPlayer<class_AnimationPlayer>` | :ref:`get_animation_player<class_GLTFState_method_get_animation_player>` **(** :ref:`int<class_int>` idx **)** |
  52. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`int<class_int>` | :ref:`get_animation_players_count<class_GLTFState_method_get_animation_players_count>` **(** :ref:`int<class_int>` idx **)** |
  54. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`Array<class_Array>` | :ref:`get_animations<class_GLTFState_method_get_animations>` **(** **)** |
  56. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Array<class_Array>` | :ref:`get_buffer_views<class_GLTFState_method_get_buffer_views>` **(** **)** |
  58. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`Array<class_Array>` | :ref:`get_cameras<class_GLTFState_method_get_cameras>` **(** **)** |
  60. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`Array<class_Array>` | :ref:`get_images<class_GLTFState_method_get_images>` **(** **)** |
  62. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`Array<class_Array>` | :ref:`get_lights<class_GLTFState_method_get_lights>` **(** **)** |
  64. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`Array<class_Array>` | :ref:`get_materials<class_GLTFState_method_get_materials>` **(** **)** |
  66. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`Array<class_Array>` | :ref:`get_meshes<class_GLTFState_method_get_meshes>` **(** **)** |
  68. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`Array<class_Array>` | :ref:`get_nodes<class_GLTFState_method_get_nodes>` **(** **)** |
  70. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | :ref:`Node<class_Node>` | :ref:`get_scene_node<class_GLTFState_method_get_scene_node>` **(** :ref:`int<class_int>` idx **)** |
  72. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | :ref:`Dictionary<class_Dictionary>` | :ref:`get_skeleton_to_node<class_GLTFState_method_get_skeleton_to_node>` **(** **)** |
  74. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`Array<class_Array>` | :ref:`get_skeletons<class_GLTFState_method_get_skeletons>` **(** **)** |
  76. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`Array<class_Array>` | :ref:`get_skins<class_GLTFState_method_get_skins>` **(** **)** |
  78. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | :ref:`Array<class_Array>` | :ref:`get_texture_samplers<class_GLTFState_method_get_texture_samplers>` **(** **)** |
  80. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Array<class_Array>` | :ref:`get_textures<class_GLTFState_method_get_textures>` **(** **)** |
  82. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | :ref:`Array<class_Array>` | :ref:`get_unique_animation_names<class_GLTFState_method_get_unique_animation_names>` **(** **)** |
  84. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`Array<class_Array>` | :ref:`get_unique_names<class_GLTFState_method_get_unique_names>` **(** **)** |
  86. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | void | :ref:`set_accessors<class_GLTFState_method_set_accessors>` **(** :ref:`Array<class_Array>` accessors **)** |
  88. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | void | :ref:`set_additional_data<class_GLTFState_method_set_additional_data>` **(** :ref:`String<class_String>` extension_name, :ref:`Variant<class_Variant>` additional_data **)** |
  90. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | void | :ref:`set_animations<class_GLTFState_method_set_animations>` **(** :ref:`Array<class_Array>` animations **)** |
  92. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | void | :ref:`set_buffer_views<class_GLTFState_method_set_buffer_views>` **(** :ref:`Array<class_Array>` buffer_views **)** |
  94. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | void | :ref:`set_cameras<class_GLTFState_method_set_cameras>` **(** :ref:`Array<class_Array>` cameras **)** |
  96. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | void | :ref:`set_images<class_GLTFState_method_set_images>` **(** :ref:`Array<class_Array>` images **)** |
  98. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | void | :ref:`set_lights<class_GLTFState_method_set_lights>` **(** :ref:`Array<class_Array>` lights **)** |
  100. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | void | :ref:`set_materials<class_GLTFState_method_set_materials>` **(** :ref:`Array<class_Array>` materials **)** |
  102. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | void | :ref:`set_meshes<class_GLTFState_method_set_meshes>` **(** :ref:`Array<class_Array>` meshes **)** |
  104. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | void | :ref:`set_nodes<class_GLTFState_method_set_nodes>` **(** :ref:`Array<class_Array>` nodes **)** |
  106. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | void | :ref:`set_skeleton_to_node<class_GLTFState_method_set_skeleton_to_node>` **(** :ref:`Dictionary<class_Dictionary>` skeleton_to_node **)** |
  108. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | void | :ref:`set_skeletons<class_GLTFState_method_set_skeletons>` **(** :ref:`Array<class_Array>` skeletons **)** |
  110. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | void | :ref:`set_skins<class_GLTFState_method_set_skins>` **(** :ref:`Array<class_Array>` skins **)** |
  112. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | void | :ref:`set_texture_samplers<class_GLTFState_method_set_texture_samplers>` **(** :ref:`Array<class_Array>` texture_samplers **)** |
  114. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | void | :ref:`set_textures<class_GLTFState_method_set_textures>` **(** :ref:`Array<class_Array>` textures **)** |
  116. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | void | :ref:`set_unique_animation_names<class_GLTFState_method_set_unique_animation_names>` **(** :ref:`Array<class_Array>` unique_animation_names **)** |
  118. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | void | :ref:`set_unique_names<class_GLTFState_method_set_unique_names>` **(** :ref:`Array<class_Array>` unique_names **)** |
  120. +-----------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. .. rst-class:: classref-section-separator
  122. ----
  123. .. rst-class:: classref-descriptions-group
  124. Property Descriptions
  125. ---------------------
  126. .. _class_GLTFState_property_buffers:
  127. .. rst-class:: classref-property
  128. :ref:`Array<class_Array>` **buffers** = ``[ ]``
  129. .. rst-class:: classref-property-setget
  130. - void **set_buffers** **(** :ref:`Array<class_Array>` value **)**
  131. - :ref:`Array<class_Array>` **get_buffers** **(** **)**
  132. .. container:: contribute
  133. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_GLTFState_property_create_animations:
  137. .. rst-class:: classref-property
  138. :ref:`bool<class_bool>` **create_animations** = ``true``
  139. .. rst-class:: classref-property-setget
  140. - void **set_create_animations** **(** :ref:`bool<class_bool>` value **)**
  141. - :ref:`bool<class_bool>` **get_create_animations** **(** **)**
  142. .. container:: contribute
  143. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_GLTFState_property_glb_data:
  147. .. rst-class:: classref-property
  148. :ref:`PoolByteArray<class_PoolByteArray>` **glb_data** = ``PoolByteArray( )``
  149. .. rst-class:: classref-property-setget
  150. - void **set_glb_data** **(** :ref:`PoolByteArray<class_PoolByteArray>` value **)**
  151. - :ref:`PoolByteArray<class_PoolByteArray>` **get_glb_data** **(** **)**
  152. .. container:: contribute
  153. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  154. .. rst-class:: classref-item-separator
  155. ----
  156. .. _class_GLTFState_property_json:
  157. .. rst-class:: classref-property
  158. :ref:`Dictionary<class_Dictionary>` **json** = ``{}``
  159. .. rst-class:: classref-property-setget
  160. - void **set_json** **(** :ref:`Dictionary<class_Dictionary>` value **)**
  161. - :ref:`Dictionary<class_Dictionary>` **get_json** **(** **)**
  162. .. container:: contribute
  163. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  164. .. rst-class:: classref-item-separator
  165. ----
  166. .. _class_GLTFState_property_major_version:
  167. .. rst-class:: classref-property
  168. :ref:`int<class_int>` **major_version** = ``0``
  169. .. rst-class:: classref-property-setget
  170. - void **set_major_version** **(** :ref:`int<class_int>` value **)**
  171. - :ref:`int<class_int>` **get_major_version** **(** **)**
  172. .. container:: contribute
  173. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  174. .. rst-class:: classref-item-separator
  175. ----
  176. .. _class_GLTFState_property_minor_version:
  177. .. rst-class:: classref-property
  178. :ref:`int<class_int>` **minor_version** = ``0``
  179. .. rst-class:: classref-property-setget
  180. - void **set_minor_version** **(** :ref:`int<class_int>` value **)**
  181. - :ref:`int<class_int>` **get_minor_version** **(** **)**
  182. .. container:: contribute
  183. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  184. .. rst-class:: classref-item-separator
  185. ----
  186. .. _class_GLTFState_property_root_nodes:
  187. .. rst-class:: classref-property
  188. :ref:`Array<class_Array>` **root_nodes** = ``[ ]``
  189. .. rst-class:: classref-property-setget
  190. - void **set_root_nodes** **(** :ref:`Array<class_Array>` value **)**
  191. - :ref:`Array<class_Array>` **get_root_nodes** **(** **)**
  192. The root nodes of the GLTF file. Typically, a GLTF file will only have one scene, and therefore one root node. However, a GLTF file may have multiple scenes and therefore multiple root nodes, which will be generated as siblings of each other and as children of the root node of the generated Godot scene.
  193. .. rst-class:: classref-item-separator
  194. ----
  195. .. _class_GLTFState_property_scene_name:
  196. .. rst-class:: classref-property
  197. :ref:`String<class_String>` **scene_name** = ``""``
  198. .. rst-class:: classref-property-setget
  199. - void **set_scene_name** **(** :ref:`String<class_String>` value **)**
  200. - :ref:`String<class_String>` **get_scene_name** **(** **)**
  201. The name of the scene. When importing, if not specified, this will be the file name. When exporting, if specified, the scene name will be saved to the GLTF file.
  202. .. rst-class:: classref-item-separator
  203. ----
  204. .. _class_GLTFState_property_use_named_skin_binds:
  205. .. rst-class:: classref-property
  206. :ref:`bool<class_bool>` **use_named_skin_binds** = ``false``
  207. .. rst-class:: classref-property-setget
  208. - void **set_use_named_skin_binds** **(** :ref:`bool<class_bool>` value **)**
  209. - :ref:`bool<class_bool>` **get_use_named_skin_binds** **(** **)**
  210. .. container:: contribute
  211. There is currently no description for this property. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  212. .. rst-class:: classref-section-separator
  213. ----
  214. .. rst-class:: classref-descriptions-group
  215. Method Descriptions
  216. -------------------
  217. .. _class_GLTFState_method_add_used_extension:
  218. .. rst-class:: classref-method
  219. void **add_used_extension** **(** :ref:`String<class_String>` extension_name, :ref:`bool<class_bool>` required **)**
  220. Appends an extension to the list of extensions used by this GLTF file during serialization. If ``required`` is true, the extension will also be added to the list of required extensions. Do not run this in :ref:`GLTFDocumentExtension._export_post<class_GLTFDocumentExtension_method__export_post>`, as that stage is too late to add extensions. The final list is sorted alphabetically.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_GLTFState_method_get_accessors:
  224. .. rst-class:: classref-method
  225. :ref:`Array<class_Array>` **get_accessors** **(** **)**
  226. .. container:: contribute
  227. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  228. .. rst-class:: classref-item-separator
  229. ----
  230. .. _class_GLTFState_method_get_additional_data:
  231. .. rst-class:: classref-method
  232. :ref:`Variant<class_Variant>` **get_additional_data** **(** :ref:`String<class_String>` extension_name **)**
  233. Gets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless.
  234. The argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the return value can be anything you set. If nothing was set, the return value is null.
  235. .. rst-class:: classref-item-separator
  236. ----
  237. .. _class_GLTFState_method_get_animation_player:
  238. .. rst-class:: classref-method
  239. :ref:`AnimationPlayer<class_AnimationPlayer>` **get_animation_player** **(** :ref:`int<class_int>` idx **)**
  240. .. container:: contribute
  241. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  242. .. rst-class:: classref-item-separator
  243. ----
  244. .. _class_GLTFState_method_get_animation_players_count:
  245. .. rst-class:: classref-method
  246. :ref:`int<class_int>` **get_animation_players_count** **(** :ref:`int<class_int>` idx **)**
  247. .. container:: contribute
  248. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  249. .. rst-class:: classref-item-separator
  250. ----
  251. .. _class_GLTFState_method_get_animations:
  252. .. rst-class:: classref-method
  253. :ref:`Array<class_Array>` **get_animations** **(** **)**
  254. Returns an array of all :ref:`GLTFAnimation<class_GLTFAnimation>`\ s in the GLTF file. When importing, these will be generated as animations in an :ref:`AnimationPlayer<class_AnimationPlayer>` node. When exporting, these will be generated from Godot :ref:`AnimationPlayer<class_AnimationPlayer>` nodes.
  255. .. rst-class:: classref-item-separator
  256. ----
  257. .. _class_GLTFState_method_get_buffer_views:
  258. .. rst-class:: classref-method
  259. :ref:`Array<class_Array>` **get_buffer_views** **(** **)**
  260. .. container:: contribute
  261. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  262. .. rst-class:: classref-item-separator
  263. ----
  264. .. _class_GLTFState_method_get_cameras:
  265. .. rst-class:: classref-method
  266. :ref:`Array<class_Array>` **get_cameras** **(** **)**
  267. Returns an array of all :ref:`GLTFCamera<class_GLTFCamera>`\ s in the GLTF file. These are the cameras that the :ref:`GLTFNode.camera<class_GLTFNode_property_camera>` index refers to.
  268. .. rst-class:: classref-item-separator
  269. ----
  270. .. _class_GLTFState_method_get_images:
  271. .. rst-class:: classref-method
  272. :ref:`Array<class_Array>` **get_images** **(** **)**
  273. .. container:: contribute
  274. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _class_GLTFState_method_get_lights:
  278. .. rst-class:: classref-method
  279. :ref:`Array<class_Array>` **get_lights** **(** **)**
  280. Returns an array of all :ref:`GLTFLight<class_GLTFLight>`\ s in the GLTF file. These are the lights that the :ref:`GLTFNode.light<class_GLTFNode_property_light>` index refers to.
  281. .. rst-class:: classref-item-separator
  282. ----
  283. .. _class_GLTFState_method_get_materials:
  284. .. rst-class:: classref-method
  285. :ref:`Array<class_Array>` **get_materials** **(** **)**
  286. .. container:: contribute
  287. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _class_GLTFState_method_get_meshes:
  291. .. rst-class:: classref-method
  292. :ref:`Array<class_Array>` **get_meshes** **(** **)**
  293. Returns an array of all :ref:`GLTFMesh<class_GLTFMesh>`\ es in the GLTF file. These are the meshes that the :ref:`GLTFNode.mesh<class_GLTFNode_property_mesh>` index refers to.
  294. .. rst-class:: classref-item-separator
  295. ----
  296. .. _class_GLTFState_method_get_nodes:
  297. .. rst-class:: classref-method
  298. :ref:`Array<class_Array>` **get_nodes** **(** **)**
  299. Returns an array of all :ref:`GLTFNode<class_GLTFNode>`\ s in the GLTF file. These are the nodes that :ref:`GLTFNode.children<class_GLTFNode_property_children>` and :ref:`root_nodes<class_GLTFState_property_root_nodes>` refer to. This includes nodes that may not be generated in the Godot scene, or nodes that may generate multiple Godot scene nodes.
  300. .. rst-class:: classref-item-separator
  301. ----
  302. .. _class_GLTFState_method_get_scene_node:
  303. .. rst-class:: classref-method
  304. :ref:`Node<class_Node>` **get_scene_node** **(** :ref:`int<class_int>` idx **)**
  305. .. container:: contribute
  306. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  307. .. rst-class:: classref-item-separator
  308. ----
  309. .. _class_GLTFState_method_get_skeleton_to_node:
  310. .. rst-class:: classref-method
  311. :ref:`Dictionary<class_Dictionary>` **get_skeleton_to_node** **(** **)**
  312. .. container:: contribute
  313. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  314. .. rst-class:: classref-item-separator
  315. ----
  316. .. _class_GLTFState_method_get_skeletons:
  317. .. rst-class:: classref-method
  318. :ref:`Array<class_Array>` **get_skeletons** **(** **)**
  319. Returns an array of all :ref:`GLTFSkeleton<class_GLTFSkeleton>`\ s in the GLTF file. These are the skeletons that the :ref:`GLTFNode.skeleton<class_GLTFNode_property_skeleton>` index refers to.
  320. .. rst-class:: classref-item-separator
  321. ----
  322. .. _class_GLTFState_method_get_skins:
  323. .. rst-class:: classref-method
  324. :ref:`Array<class_Array>` **get_skins** **(** **)**
  325. Returns an array of all :ref:`GLTFSkin<class_GLTFSkin>`\ s in the GLTF file. These are the skins that the :ref:`GLTFNode.skin<class_GLTFNode_property_skin>` index refers to.
  326. .. rst-class:: classref-item-separator
  327. ----
  328. .. _class_GLTFState_method_get_texture_samplers:
  329. .. rst-class:: classref-method
  330. :ref:`Array<class_Array>` **get_texture_samplers** **(** **)**
  331. Retrieves the array of texture samplers that are used by the textures contained in the GLTF.
  332. .. rst-class:: classref-item-separator
  333. ----
  334. .. _class_GLTFState_method_get_textures:
  335. .. rst-class:: classref-method
  336. :ref:`Array<class_Array>` **get_textures** **(** **)**
  337. .. container:: contribute
  338. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  339. .. rst-class:: classref-item-separator
  340. ----
  341. .. _class_GLTFState_method_get_unique_animation_names:
  342. .. rst-class:: classref-method
  343. :ref:`Array<class_Array>` **get_unique_animation_names** **(** **)**
  344. Returns an array of unique animation names. This is only used during the import process.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_GLTFState_method_get_unique_names:
  348. .. rst-class:: classref-method
  349. :ref:`Array<class_Array>` **get_unique_names** **(** **)**
  350. Returns an array of unique node names. This is used in both the import process and export process.
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_GLTFState_method_set_accessors:
  354. .. rst-class:: classref-method
  355. void **set_accessors** **(** :ref:`Array<class_Array>` accessors **)**
  356. .. container:: contribute
  357. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  358. .. rst-class:: classref-item-separator
  359. ----
  360. .. _class_GLTFState_method_set_additional_data:
  361. .. rst-class:: classref-method
  362. void **set_additional_data** **(** :ref:`String<class_String>` extension_name, :ref:`Variant<class_Variant>` additional_data **)**
  363. Sets additional arbitrary data in this **GLTFState** instance. This can be used to keep per-file state data in :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` classes, which is important because they are stateless.
  364. The first argument should be the :ref:`GLTFDocumentExtension<class_GLTFDocumentExtension>` name (does not have to match the extension name in the GLTF file), and the second argument can be anything you want.
  365. .. rst-class:: classref-item-separator
  366. ----
  367. .. _class_GLTFState_method_set_animations:
  368. .. rst-class:: classref-method
  369. void **set_animations** **(** :ref:`Array<class_Array>` animations **)**
  370. .. container:: contribute
  371. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  372. .. rst-class:: classref-item-separator
  373. ----
  374. .. _class_GLTFState_method_set_buffer_views:
  375. .. rst-class:: classref-method
  376. void **set_buffer_views** **(** :ref:`Array<class_Array>` buffer_views **)**
  377. .. container:: contribute
  378. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _class_GLTFState_method_set_cameras:
  382. .. rst-class:: classref-method
  383. void **set_cameras** **(** :ref:`Array<class_Array>` cameras **)**
  384. .. container:: contribute
  385. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  386. .. rst-class:: classref-item-separator
  387. ----
  388. .. _class_GLTFState_method_set_images:
  389. .. rst-class:: classref-method
  390. void **set_images** **(** :ref:`Array<class_Array>` images **)**
  391. .. container:: contribute
  392. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  393. .. rst-class:: classref-item-separator
  394. ----
  395. .. _class_GLTFState_method_set_lights:
  396. .. rst-class:: classref-method
  397. void **set_lights** **(** :ref:`Array<class_Array>` lights **)**
  398. .. container:: contribute
  399. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  400. .. rst-class:: classref-item-separator
  401. ----
  402. .. _class_GLTFState_method_set_materials:
  403. .. rst-class:: classref-method
  404. void **set_materials** **(** :ref:`Array<class_Array>` materials **)**
  405. .. container:: contribute
  406. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  407. .. rst-class:: classref-item-separator
  408. ----
  409. .. _class_GLTFState_method_set_meshes:
  410. .. rst-class:: classref-method
  411. void **set_meshes** **(** :ref:`Array<class_Array>` meshes **)**
  412. .. container:: contribute
  413. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  414. .. rst-class:: classref-item-separator
  415. ----
  416. .. _class_GLTFState_method_set_nodes:
  417. .. rst-class:: classref-method
  418. void **set_nodes** **(** :ref:`Array<class_Array>` nodes **)**
  419. .. container:: contribute
  420. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  421. .. rst-class:: classref-item-separator
  422. ----
  423. .. _class_GLTFState_method_set_skeleton_to_node:
  424. .. rst-class:: classref-method
  425. void **set_skeleton_to_node** **(** :ref:`Dictionary<class_Dictionary>` skeleton_to_node **)**
  426. .. container:: contribute
  427. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  428. .. rst-class:: classref-item-separator
  429. ----
  430. .. _class_GLTFState_method_set_skeletons:
  431. .. rst-class:: classref-method
  432. void **set_skeletons** **(** :ref:`Array<class_Array>` skeletons **)**
  433. .. container:: contribute
  434. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  435. .. rst-class:: classref-item-separator
  436. ----
  437. .. _class_GLTFState_method_set_skins:
  438. .. rst-class:: classref-method
  439. void **set_skins** **(** :ref:`Array<class_Array>` skins **)**
  440. .. container:: contribute
  441. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  442. .. rst-class:: classref-item-separator
  443. ----
  444. .. _class_GLTFState_method_set_texture_samplers:
  445. .. rst-class:: classref-method
  446. void **set_texture_samplers** **(** :ref:`Array<class_Array>` texture_samplers **)**
  447. Sets the array of texture samplers that are used by the textures contained in the GLTF.
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_GLTFState_method_set_textures:
  451. .. rst-class:: classref-method
  452. void **set_textures** **(** :ref:`Array<class_Array>` textures **)**
  453. .. container:: contribute
  454. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  455. .. rst-class:: classref-item-separator
  456. ----
  457. .. _class_GLTFState_method_set_unique_animation_names:
  458. .. rst-class:: classref-method
  459. void **set_unique_animation_names** **(** :ref:`Array<class_Array>` unique_animation_names **)**
  460. .. container:: contribute
  461. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  462. .. rst-class:: classref-item-separator
  463. ----
  464. .. _class_GLTFState_method_set_unique_names:
  465. .. rst-class:: classref-method
  466. void **set_unique_names** **(** :ref:`Array<class_Array>` unique_names **)**
  467. .. container:: contribute
  468. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  469. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  470. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  471. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  472. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`