aboutsummaryrefslogtreecommitdiff
path: root/editor/editor_run_script.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2017-08-26 10:32:15 -0300
committerJuan Linietsky2017-08-26 10:33:07 -0300
commitdd7145b778ea4884fd52f5efaf79dc55375c8465 (patch)
treef4a3ff305d3bec624dda455701aad40eea1605a8 /editor/editor_run_script.cpp
parentf634973acb711432fe50f8072416f30c8f92122b (diff)
downloadgodot-dd7145b778ea4884fd52f5efaf79dc55375c8465.tar.gz
godot-dd7145b778ea4884fd52f5efaf79dc55375c8465.tar.zst
godot-dd7145b778ea4884fd52f5efaf79dc55375c8465.zip
-Split EditorPlugin into EditorPlugin and EditorInterface
-Added EditorInterface to EditorScript -Added functions to save the scene to EditorInterface
Diffstat (limited to 'editor/editor_run_script.cpp')
-rw-r--r--editor/editor_run_script.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 8bd1b8f4f..990c0cfbe 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -46,6 +46,11 @@ void EditorScript::add_root_node(Node *p_node) {
//editor->set_edited_scene(p_node);
}
+EditorInterface *EditorScript::get_editor_interface() {
+
+ return EditorInterface::get_singleton();
+}
+
Node *EditorScript::get_scene() {
if (!editor) {
@@ -83,6 +88,7 @@ void EditorScript::_bind_methods() {
ClassDB::bind_method(D_METHOD("add_root_node", "node"), &EditorScript::add_root_node);
ClassDB::bind_method(D_METHOD("get_scene"), &EditorScript::get_scene);
+ ClassDB::bind_method(D_METHOD("get_editor_interface"), &EditorScript::get_editor_interface);
BIND_VMETHOD(MethodInfo("_run"));
}