diff options
Diffstat (limited to 'editor/editor_plugin.cpp')
-rw-r--r-- | editor/editor_plugin.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp index f974ba9998..76912c8925 100644 --- a/editor/editor_plugin.cpp +++ b/editor/editor_plugin.cpp @@ -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); |