:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the EditorInterface.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_EditorInterface: EditorInterface =============== **Inherits:** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Godot editor's interface. Methods ------- +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_base_control` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_edited_scene_root` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorSettings` | :ref:`get_editor_settings` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_editor_viewport` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector` **(** **)** const | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_open_scenes` **(** **)** const | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScriptEditor` | :ref:`get_script_editor` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_selected_path` **(** **)** const | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorSelection` | :ref:`get_selection` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`inspect_object` **(** :ref:`Object` object, :ref:`String` for_property="" **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** const | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`make_mesh_previews` **(** :ref:`Array` meshes, :ref:`int` preview_size **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_scene` **(** **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`select_file` **(** :ref:`String` file **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | +-----------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+ Description ----------- EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to :ref:`EditorSettings`, :ref:`EditorFileSystem`, :ref:`EditorResourcePreview`, :ref:`ScriptEditor`, the editor viewport, and information about scenes. Method Descriptions ------------------- .. _class_EditorInterface_method_edit_resource: - void **edit_resource** **(** :ref:`Resource` resource **)** Edits the given :ref:`Resource`. ---- .. _class_EditorInterface_method_get_base_control: - :ref:`Control` **get_base_control** **(** **)** Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly. ---- .. _class_EditorInterface_method_get_edited_scene_root: - :ref:`Node` **get_edited_scene_root** **(** **)** Returns the edited (current) scene's root :ref:`Node`. ---- .. _class_EditorInterface_method_get_editor_settings: - :ref:`EditorSettings` **get_editor_settings** **(** **)** Returns the :ref:`EditorSettings`. ---- .. _class_EditorInterface_method_get_editor_viewport: - :ref:`Control` **get_editor_viewport** **(** **)** Returns the editor :ref:`Viewport`. ---- .. _class_EditorInterface_method_get_inspector: - :ref:`EditorInspector` **get_inspector** **(** **)** const ---- .. _class_EditorInterface_method_get_open_scenes: - :ref:`Array` **get_open_scenes** **(** **)** const Returns an :ref:`Array` with the file paths of the currently opened scenes. ---- .. _class_EditorInterface_method_get_resource_filesystem: - :ref:`EditorFileSystem` **get_resource_filesystem** **(** **)** Returns the :ref:`EditorFileSystem`. ---- .. _class_EditorInterface_method_get_resource_previewer: - :ref:`EditorResourcePreview` **get_resource_previewer** **(** **)** Returns the :ref:`EditorResourcePreview`. ---- .. _class_EditorInterface_method_get_script_editor: - :ref:`ScriptEditor` **get_script_editor** **(** **)** Returns the :ref:`ScriptEditor`. ---- .. _class_EditorInterface_method_get_selected_path: - :ref:`String` **get_selected_path** **(** **)** const ---- .. _class_EditorInterface_method_get_selection: - :ref:`EditorSelection` **get_selection** **(** **)** Returns the :ref:`EditorSelection`. ---- .. _class_EditorInterface_method_inspect_object: - void **inspect_object** **(** :ref:`Object` object, :ref:`String` for_property="" **)** Shows the given property on the given ``object`` in the Editor's Inspector dock. ---- .. _class_EditorInterface_method_is_plugin_enabled: - :ref:`bool` **is_plugin_enabled** **(** :ref:`String` plugin **)** const Returns the enabled status of a plugin. The plugin name is the same as its directory name. ---- .. _class_EditorInterface_method_make_mesh_previews: - :ref:`Array` **make_mesh_previews** **(** :ref:`Array` meshes, :ref:`int` preview_size **)** Returns mesh previews rendered at the given size as an :ref:`Array` of :ref:`Texture`\ s. ---- .. _class_EditorInterface_method_open_scene_from_path: - void **open_scene_from_path** **(** :ref:`String` scene_filepath **)** Opens the scene at the given path. ---- .. _class_EditorInterface_method_reload_scene_from_path: - void **reload_scene_from_path** **(** :ref:`String` scene_filepath **)** Reloads the scene at the given path. ---- .. _class_EditorInterface_method_save_scene: - :ref:`Error` **save_scene** **(** **)** Saves the scene. Returns either OK or ERR_CANT_CREATE. See :ref:`@GlobalScope` constants. ---- .. _class_EditorInterface_method_save_scene_as: - void **save_scene_as** **(** :ref:`String` path, :ref:`bool` with_preview=true **)** Saves the scene as a file at ``path``. ---- .. _class_EditorInterface_method_select_file: - void **select_file** **(** :ref:`String` file **)** ---- .. _class_EditorInterface_method_set_plugin_enabled: - void **set_plugin_enabled** **(** :ref:`String` plugin, :ref:`bool` enabled **)** Sets the enabled status of a plugin. The plugin name is the same as its directory name.