summaryrefslogtreecommitdiff
path: root/editor/editor_plugin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r--editor/editor_plugin.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index f974ba9998..840bae35bf 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2020 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2020 Godot Engine contributors (cf. AUTHORS.md). */
+/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md). */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -128,7 +128,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
Main::iteration();
Main::iteration();
Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture);
- ERR_CONTINUE(!img.is_valid() || img->empty());
+ ERR_CONTINUE(!img.is_valid() || img->is_empty());
Ref<ImageTexture> it(memnew(ImageTexture));
it->create_from_image(img);
@@ -152,8 +152,8 @@ void EditorInterface::set_main_screen_editor(const String &p_name) {
EditorNode::get_singleton()->select_editor_by_name(p_name);
}
-Control *EditorInterface::get_editor_viewport() {
- return EditorNode::get_singleton()->get_viewport();
+Control *EditorInterface::get_editor_main_control() {
+ return EditorNode::get_singleton()->get_main_control();
}
void EditorInterface::edit_resource(const Ref<Resource> &p_resource) {
@@ -319,7 +319,7 @@ void EditorInterface::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_edited_scene_root"), &EditorInterface::get_edited_scene_root);
ClassDB::bind_method(D_METHOD("get_resource_previewer"), &EditorInterface::get_resource_previewer);
ClassDB::bind_method(D_METHOD("get_resource_filesystem"), &EditorInterface::get_resource_file_system);
- ClassDB::bind_method(D_METHOD("get_editor_viewport"), &EditorInterface::get_editor_viewport);
+ ClassDB::bind_method(D_METHOD("get_editor_main_control"), &EditorInterface::get_editor_main_control);
ClassDB::bind_method(D_METHOD("make_mesh_previews", "meshes", "preview_size"), &EditorInterface::_make_mesh_previews);
ClassDB::bind_method(D_METHOD("select_file", "file"), &EditorInterface::select_file);
ClassDB::bind_method(D_METHOD("get_selected_path"), &EditorInterface::get_selected_path);