Merge pull request #104115 from mihe/scene-state-binds

Bind `SceneState` methods `get_path` and `get_base_scene_state`
This commit is contained in:
Thaddeus Crews 2025-03-25 11:09:00 -05:00
commit c5e36a973c
No known key found for this signature in database
GPG key ID: 62181B86FE9E5D84
2 changed files with 14 additions and 0 deletions

View file

@ -10,6 +10,12 @@
<tutorials>
</tutorials>
<methods>
<method name="get_base_scene_state" qualifiers="const">
<return type="SceneState" />
<description>
Returns the [SceneState] of the scene that this scene inherits from, or [code]null[/code] if it doesn't inherit from any scene.
</description>
</method>
<method name="get_connection_binds" qualifiers="const">
<return type="Array" />
<param index="0" name="idx" type="int" />
@ -155,6 +161,12 @@
Returns the type of the node at [param idx].
</description>
</method>
<method name="get_path" qualifiers="const">
<return type="String" />
<description>
Returns the resource path to the represented [PackedScene].
</description>
</method>
<method name="is_node_instance_placeholder" qualifiers="const">
<return type="bool" />
<param index="0" name="idx" type="int" />

View file

@ -2092,6 +2092,8 @@ Vector<String> SceneState::_get_node_groups(int p_idx) const {
void SceneState::_bind_methods() {
//unbuild API
ClassDB::bind_method(D_METHOD("get_path"), &SceneState::get_path);
ClassDB::bind_method(D_METHOD("get_base_scene_state"), &SceneState::get_base_scene_state);
ClassDB::bind_method(D_METHOD("get_node_count"), &SceneState::get_node_count);
ClassDB::bind_method(D_METHOD("get_node_type", "idx"), &SceneState::get_node_type);
ClassDB::bind_method(D_METHOD("get_node_name", "idx"), &SceneState::get_node_name);