From a71f670d7dfbae96f5a9ba7c9a9d455b42521a25 Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Wed, 12 Mar 2025 15:50:15 +0100 Subject: [PATCH] Bind `SceneState` methods `get_path` and `get_base_scene_state` --- doc/classes/SceneState.xml | 12 ++++++++++++ scene/resources/packed_scene.cpp | 2 ++ 2 files changed, 14 insertions(+) diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index b7c8931af48..e7dfc65e684 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -10,6 +10,12 @@ + + + + Returns the [SceneState] of the scene that this scene inherits from, or [code]null[/code] if it doesn't inherit from any scene. + + @@ -155,6 +161,12 @@ Returns the type of the node at [param idx]. + + + + Returns the resource path to the represented [PackedScene]. + + diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp index 1650991831c..25ba542215f 100644 --- a/scene/resources/packed_scene.cpp +++ b/scene/resources/packed_scene.cpp @@ -2092,6 +2092,8 @@ Vector 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);