Add a get_node_index method to GLTFState

This commit is contained in:
Aaron Franke 2023-05-26 17:22:29 -05:00
parent 9a3221f1ed
commit 5e139c2ab9
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
3 changed files with 21 additions and 2 deletions

View file

@ -90,6 +90,14 @@
Returns an array of all [GLTFMesh]es in the GLTF file. These are the meshes that the [member GLTFNode.mesh] index refers to.
</description>
</method>
<method name="get_node_index">
<return type="int" />
<param index="0" name="scene_node" type="Node" />
<description>
Returns the index of the [GLTFNode] corresponding to this Godot scene node. This is the inverse of [method get_scene_node]. Useful during the export process.
[b]Note:[/b] Not every Godot scene node will have a corresponding [GLTFNode], and not every [GLTFNode] will have a scene node generated. If there is no [GLTFNode] index for this scene node, [code]-1[/code] is returned.
</description>
</method>
<method name="get_nodes">
<return type="GLTFNode[]" />
<description>
@ -100,7 +108,8 @@
<return type="Node" />
<param index="0" name="idx" type="int" />
<description>
Returns the Godot scene node that corresponds to the same index as the [GLTFNode] it was generated from. Not every [GLTFNode] will have a scene node generated, and not every generated scene node will have a corresponding [GLTFNode].
Returns the Godot scene node that corresponds to the same index as the [GLTFNode] it was generated from. This is the inverse of [method get_node_index]. Useful during the import process.
[b]Note:[/b] Not every [GLTFNode] will have a scene node generated, and not every generated scene node will have a corresponding [GLTFNode]. If there is no scene node for this [GLTFNode] index, [code]null[/code] is returned.
</description>
</method>
<method name="get_skeletons">