summaryrefslogtreecommitdiff
path: root/editor/editor_node.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-03-29 13:26:49 +0200
committerGitHub <noreply@github.com>2022-03-29 13:26:49 +0200
commit88299c1589100851651f88fdcf65bcf41b184987 (patch)
tree827c7807911c8994acee0bb8e028dbc62bef2979 /editor/editor_node.cpp
parente9b928b42aa32060c2b3ad58c1539dff4b3ac71f (diff)
parent6b3c964080d914cfe23af32d80cfb3b9f41f687f (diff)
Merge pull request #59496 from KoBeWi/inspector_teleport
Diffstat (limited to 'editor/editor_node.cpp')
-rw-r--r--editor/editor_node.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 57998b7778..bcdd54edd4 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3755,6 +3755,11 @@ void EditorNode::open_request(const String &p_path) {
load_scene(p_path); // as it will be opened in separate tab
}
+void EditorNode::edit_foreign_resource(RES p_resource) {
+ load_scene(p_resource->get_path().get_slice("::", 0));
+ InspectorDock::get_singleton()->call_deferred("edit_resource", p_resource);
+}
+
void EditorNode::request_instance_scene(const String &p_path) {
SceneTreeDock::get_singleton()->instantiate(p_path);
}
@@ -5740,6 +5745,7 @@ void EditorNode::_bind_methods() {
ClassDB::bind_method("_get_scene_metadata", &EditorNode::_get_scene_metadata);
ClassDB::bind_method("set_edited_scene", &EditorNode::set_edited_scene);
ClassDB::bind_method("open_request", &EditorNode::open_request);
+ ClassDB::bind_method("edit_foreign_resource", &EditorNode::edit_foreign_resource);
ClassDB::bind_method("_close_messages", &EditorNode::_close_messages);
ClassDB::bind_method("_show_messages", &EditorNode::_show_messages);