summaryrefslogtreecommitdiff
path: root/scene/resources/packed_scene.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/packed_scene.cpp')
-rw-r--r--scene/resources/packed_scene.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 03127620f7..57d2a8d890 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -1532,7 +1532,39 @@ void SceneState::add_editable_instance(const NodePath& p_path){
editable_instances.push_back(p_path);
}
+DVector<String> SceneState::_get_node_groups(int p_idx) const {
+ Vector<StringName> groups = get_node_groups(p_idx);
+ DVector<String> ret;
+
+ for(int i=0;i<groups.size();i++)
+ ret.push_back(groups[i]);
+
+ return ret;
+}
+
+void SceneState::_bind_methods() {
+
+ //unbuild API
+
+ ObjectTypeDB::bind_method(_MD("get_node_count"),&SceneState::get_node_count);
+ ObjectTypeDB::bind_method(_MD("get_node_type","idx"),&SceneState::get_node_type);
+ ObjectTypeDB::bind_method(_MD("get_node_name","idx"),&SceneState::get_node_name);
+ ObjectTypeDB::bind_method(_MD("get_node_path","idx","for_parent"),&SceneState::get_node_path,DEFVAL(false));
+ ObjectTypeDB::bind_method(_MD("get_node_owner_path","idx"),&SceneState::get_node_owner_path);
+ ObjectTypeDB::bind_method(_MD("get_node_instance:PackedScene","idx"),&SceneState::get_node_instance);
+ ObjectTypeDB::bind_method(_MD("get_node_groups","idx"),&SceneState::_get_node_groups);
+ ObjectTypeDB::bind_method(_MD("get_node_property_count","idx"),&SceneState::get_node_property_count);
+ ObjectTypeDB::bind_method(_MD("get_node_property_name","idx","prop_idx"),&SceneState::get_node_property_name);
+ ObjectTypeDB::bind_method(_MD("get_node_property_value","idx","prop_idx"),&SceneState::get_node_property_value);
+ ObjectTypeDB::bind_method(_MD("get_connection_count"),&SceneState::get_connection_count);
+ ObjectTypeDB::bind_method(_MD("get_connection_source","idx"),&SceneState::get_connection_source);
+ ObjectTypeDB::bind_method(_MD("get_connection_signal","idx"),&SceneState::get_connection_signal);
+ ObjectTypeDB::bind_method(_MD("get_connection_target","idx"),&SceneState::get_connection_target);
+ ObjectTypeDB::bind_method(_MD("get_connection_method","idx"),&SceneState::get_connection_method);
+ ObjectTypeDB::bind_method(_MD("get_connection_flags","idx"),&SceneState::get_connection_flags);
+ ObjectTypeDB::bind_method(_MD("get_connection_binds","idx"),&SceneState::get_connection_binds);
+}
SceneState::SceneState() {
@@ -1635,6 +1667,7 @@ void PackedScene::_bind_methods() {
ObjectTypeDB::bind_method(_MD("can_instance"),&PackedScene::can_instance);
ObjectTypeDB::bind_method(_MD("_set_bundled_scene"),&PackedScene::_set_bundled_scene);
ObjectTypeDB::bind_method(_MD("_get_bundled_scene"),&PackedScene::_get_bundled_scene);
+ ObjectTypeDB::bind_method(_MD("get_state:SceneState"),&PackedScene::get_state);
ADD_PROPERTY( PropertyInfo(Variant::DICTIONARY,"_bundled"),_SCS("_set_bundled_scene"),_SCS("_get_bundled_scene"));