1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-12 13:20:55 +00:00

-Split EditorPlugin into EditorPlugin and EditorInterface

-Added EditorInterface to EditorScript
-Added functions to save the scene to EditorInterface
This commit is contained in:
Juan Linietsky
2017-08-26 10:32:15 -03:00
parent f634973acb
commit dd7145b778
7 changed files with 186 additions and 125 deletions

View File

@@ -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"));
}