:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/4.3/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/4.3/doc/classes/EditorInterface.xml. .. _class_EditorInterface: EditorInterface =============== **Inherits:** :ref:`Object` Godot editor's interface. .. rst-class:: classref-introduction-group 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. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton directly by its name. .. tabs:: .. code-tab:: gdscript var editor_settings = EditorInterface.get_editor_settings() .. code-tab:: csharp // In C# you can access it via the static Singleton property. EditorSettings settings = EditorInterface.Singleton.GetEditorSettings(); .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +-------------------------+------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`distraction_free_mode` | +-------------------------+------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`movie_maker_enabled` | +-------------------------+------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Control` | :ref:`get_base_control`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorCommandPalette` | :ref:`get_command_palette`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_directory`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_feature_profile`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_current_path`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_edited_scene_root`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`VBoxContainer` | :ref:`get_editor_main_screen`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorPaths` | :ref:`get_editor_paths`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_editor_scale`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorSettings` | :ref:`get_editor_settings`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`FileSystemDock` | :ref:`get_file_system_dock`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_playing_scene`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScriptEditor` | :ref:`get_script_editor`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_selected_paths`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`EditorSelection` | :ref:`get_selection`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`inspect_object`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`play_current_scene`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`play_main_scene`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array()\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`save_all_scenes`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`save_scene`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`stop_playing_scene`\ (\ ) | +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_EditorInterface_property_distraction_free_mode: .. rst-class:: classref-property :ref:`bool` **distraction_free_mode** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_distraction_free_mode**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_distraction_free_mode_enabled**\ (\ ) If ``true``, enables distraction-free mode which hides side docks to increase the space available for the main view. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_property_movie_maker_enabled: .. rst-class:: classref-property :ref:`bool` **movie_maker_enabled** :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_movie_maker_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_movie_maker_enabled**\ (\ ) If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWriter` for more information. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_EditorInterface_method_edit_node: .. rst-class:: classref-method |void| **edit_node**\ (\ node\: :ref:`Node`\ ) :ref:`🔗` Edits the given :ref:`Node`. The node will be also selected if it's inside the scene tree. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_edit_resource: .. rst-class:: classref-method |void| **edit_resource**\ (\ resource\: :ref:`Resource`\ ) :ref:`🔗` Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script` to specify the line and column position. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_edit_script: .. rst-class:: classref-method |void| **edit_script**\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) :ref:`🔗` Edits the given :ref:`Script`. The line and column on which to open the script can also be specified. The script will be open with the user-configured editor for the script's language which may be an external editor. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_base_control: .. rst-class:: classref-method :ref:`Control` **get_base_control**\ (\ ) |const| :ref:`🔗` Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. \ **Warning:** Removing and freeing this node will render the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_command_palette: .. rst-class:: classref-method :ref:`EditorCommandPalette` **get_command_palette**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorCommandPalette` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_current_directory: .. rst-class:: classref-method :ref:`String` **get_current_directory**\ (\ ) |const| :ref:`🔗` Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir` instead. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_current_feature_profile: .. rst-class:: classref-method :ref:`String` **get_current_feature_profile**\ (\ ) |const| :ref:`🔗` Returns the name of the currently activated feature profile. If the default profile is currently active, an empty string is returned instead. In order to get a reference to the :ref:`EditorFeatureProfile`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file`. \ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_current_path: .. rst-class:: classref-method :ref:`String` **get_current_path**\ (\ ) |const| :ref:`🔗` Returns the current path being viewed in the :ref:`FileSystemDock`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_edited_scene_root: .. rst-class:: classref-method :ref:`Node` **get_edited_scene_root**\ (\ ) |const| :ref:`🔗` Returns the edited (current) scene's root :ref:`Node`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_main_screen: .. rst-class:: classref-method :ref:`VBoxContainer` **get_editor_main_screen**\ (\ ) |const| :ref:`🔗` Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen`. \ **Note:** This node is a :ref:`VBoxContainer`, which means that if you add a :ref:`Control` child to it, you need to set the child's :ref:`Control.size_flags_vertical` to :ref:`Control.SIZE_EXPAND_FILL` to make it use the full available space. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_paths: .. rst-class:: classref-method :ref:`EditorPaths` **get_editor_paths**\ (\ ) |const| :ref:`🔗` Returns the :ref:`EditorPaths` singleton. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_scale: .. rst-class:: classref-method :ref:`float` **get_editor_scale**\ (\ ) |const| :ref:`🔗` Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. \ **Note:** This value is set via the ``interface/editor/display_scale`` and ``interface/editor/custom_display_scale`` editor settings. Editor must be restarted for changes to be properly applied. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_settings: .. rst-class:: classref-method :ref:`EditorSettings` **get_editor_settings**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorSettings` instance. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_theme: .. rst-class:: classref-method :ref:`Theme` **get_editor_theme**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`Theme`. \ **Note:** When creating custom editor UI, prefer accessing theme items directly from your GUI nodes using the ``get_theme_*`` methods. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_viewport_2d: .. rst-class:: classref-method :ref:`SubViewport` **get_editor_viewport_2d**\ (\ ) |const| :ref:`🔗` Returns the 2D editor :ref:`SubViewport`. It does not have a camera. Instead, the view transforms are done directly and can be accessed with :ref:`Viewport.global_canvas_transform`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_editor_viewport_3d: .. rst-class:: classref-method :ref:`SubViewport` **get_editor_viewport_3d**\ (\ idx\: :ref:`int` = 0\ ) |const| :ref:`🔗` Returns the specified 3D editor :ref:`SubViewport`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_file_system_dock: .. rst-class:: classref-method :ref:`FileSystemDock` **get_file_system_dock**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`FileSystemDock` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_inspector: .. rst-class:: classref-method :ref:`EditorInspector` **get_inspector**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorInspector` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_open_scenes: .. rst-class:: classref-method :ref:`PackedStringArray` **get_open_scenes**\ (\ ) |const| :ref:`🔗` Returns an :ref:`Array` with the file paths of the currently opened scenes. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_playing_scene: .. rst-class:: classref-method :ref:`String` **get_playing_scene**\ (\ ) |const| :ref:`🔗` Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_resource_filesystem: .. rst-class:: classref-method :ref:`EditorFileSystem` **get_resource_filesystem**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorFileSystem` instance. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_resource_previewer: .. rst-class:: classref-method :ref:`EditorResourcePreview` **get_resource_previewer**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorResourcePreview` instance. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_script_editor: .. rst-class:: classref-method :ref:`ScriptEditor` **get_script_editor**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`ScriptEditor` instance. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_selected_paths: .. rst-class:: classref-method :ref:`PackedStringArray` **get_selected_paths**\ (\ ) |const| :ref:`🔗` Returns an array containing the paths of the currently selected files (and directories) in the :ref:`FileSystemDock`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_get_selection: .. rst-class:: classref-method :ref:`EditorSelection` **get_selection**\ (\ ) |const| :ref:`🔗` Returns the editor's :ref:`EditorSelection` instance. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_inspect_object: .. rst-class:: classref-method |void| **inspect_object**\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) :ref:`🔗` Shows the given property on the given ``object`` in the editor's Inspector dock. If ``inspector_only`` is ``true``, plugins will not attempt to edit ``object``. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_is_multi_window_enabled: .. rst-class:: classref-method :ref:`bool` **is_multi_window_enabled**\ (\ ) |const| :ref:`🔗` Returns ``true`` if multiple window support is enabled in the editor. Multiple window support is enabled if *all* of these statements are true: - :ref:`EditorSettings.interface/multi_window/enable` is ``true``. - :ref:`EditorSettings.interface/editor/single_window_mode` is ``false``. - :ref:`Viewport.gui_embed_subwindows` is ``false``. This is forced to ``true`` on platforms that don't support multiple windows such as Web, or when the ``--single-window`` :doc:`command line argument <../tutorials/editor/command_line_tutorial>` is used. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_is_playing_scene: .. rst-class:: classref-method :ref:`bool` **is_playing_scene**\ (\ ) |const| :ref:`🔗` Returns ``true`` if a scene is currently being played, ``false`` otherwise. Paused scenes are considered as being played. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_is_plugin_enabled: .. rst-class:: classref-method :ref:`bool` **is_plugin_enabled**\ (\ plugin\: :ref:`String`\ ) |const| :ref:`🔗` Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the same as its directory name. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_make_mesh_previews: .. rst-class:: classref-method :ref:`Array`\[:ref:`Texture2D`\] **make_mesh_previews**\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) :ref:`🔗` Returns mesh previews rendered at the given size as an :ref:`Array` of :ref:`Texture2D`\ s. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_mark_scene_as_unsaved: .. rst-class:: classref-method |void| **mark_scene_as_unsaved**\ (\ ) :ref:`🔗` Marks the current scene tab as unsaved. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_open_scene_from_path: .. rst-class:: classref-method |void| **open_scene_from_path**\ (\ scene_filepath\: :ref:`String`\ ) :ref:`🔗` Opens the scene at the given path. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_play_current_scene: .. rst-class:: classref-method |void| **play_current_scene**\ (\ ) :ref:`🔗` Plays the currently active scene. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_play_custom_scene: .. rst-class:: classref-method |void| **play_custom_scene**\ (\ scene_filepath\: :ref:`String`\ ) :ref:`🔗` Plays the scene specified by its filepath. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_play_main_scene: .. rst-class:: classref-method |void| **play_main_scene**\ (\ ) :ref:`🔗` Plays the main scene. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_dialog: .. rst-class:: classref-method |void| **popup_dialog**\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive`. The dialog must have no current parent, otherwise the method fails. See also :ref:`Window.set_unparent_when_invisible`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_dialog_centered: .. rst-class:: classref-method |void| **popup_dialog_centered**\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) :ref:`🔗` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered`. The dialog must have no current parent, otherwise the method fails. See also :ref:`Window.set_unparent_when_invisible`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_dialog_centered_clamped: .. rst-class:: classref-method |void| **popup_dialog_centered_clamped**\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) :ref:`🔗` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped`. The dialog must have no current parent, otherwise the method fails. See also :ref:`Window.set_unparent_when_invisible`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_dialog_centered_ratio: .. rst-class:: classref-method |void| **popup_dialog_centered_ratio**\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) :ref:`🔗` Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio`. The dialog must have no current parent, otherwise the method fails. See also :ref:`Window.set_unparent_when_invisible`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_node_selector: .. rst-class:: classref-method |void| **popup_node_selector**\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) :ref:`🔗` Pops up an editor dialog for selecting a :ref:`Node` from the edited scene. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected :ref:`NodePath` or the empty path ``^""`` if the dialog is canceled. If ``valid_types`` is provided, the dialog will only show Nodes that match one of the listed Node types. \ **Example:**\ :: func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_node_selector(_on_node_selected, ["Button"]) func _on_node_selected(node_path): if node_path.is_empty(): print("node selection canceled") else: print("selected ", node_path) .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_popup_property_selector: .. rst-class:: classref-method |void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array()\ ) :ref:`🔗` Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. \ **Example:**\ :: func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_property_selector(this, _on_property_selected, [TYPE_INT]) func _on_property_selected(property_path): if property_path.is_empty(): print("property selection canceled") else: print("selected ", property_path) .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_reload_scene_from_path: .. rst-class:: classref-method |void| **reload_scene_from_path**\ (\ scene_filepath\: :ref:`String`\ ) :ref:`🔗` Reloads the scene at the given path. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_restart_editor: .. rst-class:: classref-method |void| **restart_editor**\ (\ save\: :ref:`bool` = true\ ) :ref:`🔗` Restarts the editor. This closes the editor and then opens the same project. If ``save`` is ``true``, the project will be saved before restarting. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_save_all_scenes: .. rst-class:: classref-method |void| **save_all_scenes**\ (\ ) :ref:`🔗` Saves all opened scenes in the editor. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_save_scene: .. rst-class:: classref-method :ref:`Error` **save_scene**\ (\ ) :ref:`🔗` Saves the currently active scene. Returns either :ref:`@GlobalScope.OK` or :ref:`@GlobalScope.ERR_CANT_CREATE`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_save_scene_as: .. rst-class:: classref-method |void| **save_scene_as**\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) :ref:`🔗` Saves the currently active scene as a file at ``path``. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_select_file: .. rst-class:: classref-method |void| **select_file**\ (\ file\: :ref:`String`\ ) :ref:`🔗` Selects the file, with the path provided by ``file``, in the FileSystem dock. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_set_current_feature_profile: .. rst-class:: classref-method |void| **set_current_feature_profile**\ (\ profile_name\: :ref:`String`\ ) :ref:`🔗` Selects and activates the specified feature profile with the given ``profile_name``. Set ``profile_name`` to an empty string to reset to the default feature profile. A feature profile can be created programmatically using the :ref:`EditorFeatureProfile` class. \ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_set_main_screen_editor: .. rst-class:: classref-method |void| **set_main_screen_editor**\ (\ name\: :ref:`String`\ ) :ref:`🔗` Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the title of the tab in question exactly (e.g. ``2D``, ``3D``, ``Script``, or ``AssetLib`` for default tabs). .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_set_plugin_enabled: .. rst-class:: classref-method |void| **set_plugin_enabled**\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) :ref:`🔗` Sets the enabled status of a plugin. The plugin name is the same as its directory name. .. rst-class:: classref-item-separator ---- .. _class_EditorInterface_method_stop_playing_scene: .. rst-class:: classref-method |void| **stop_playing_scene**\ (\ ) :ref:`🔗` Stops the scene that is currently playing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`