EditorInterface

Inherits: Node < Object

Category: Core

Brief Description

Godot editor’s interface.

Methods

voidedit_resource ( Resource resource )
Controlget_base_control ( )
Nodeget_edited_scene_root ( )
EditorSettingsget_editor_settings ( )
Controlget_editor_viewport ( )
EditorInspectorget_inspector ( ) const
Arrayget_open_scenes ( ) const
EditorFileSystemget_resource_filesystem ( )
EditorResourcePreviewget_resource_previewer ( )
ScriptEditorget_script_editor ( )
Stringget_selected_path ( ) const
EditorSelectionget_selection ( )
voidinspect_object ( Object object, String for_property=”” )
boolis_plugin_enabled ( String plugin ) const
Arraymake_mesh_previews ( Array meshes, int preview_size )
voidopen_scene_from_path ( String scene_filepath )
voidreload_scene_from_path ( String scene_filepath )
Errorsave_scene ( )
voidsave_scene_as ( String path, bool with_preview=true )
voidselect_file ( String file )
voidset_plugin_enabled ( String plugin, 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 EditorSettings, EditorFileSystem, EditorResourcePreview, ScriptEditor, the editor viewport, and information about scenes.

Method Descriptions

  • void edit_resource ( Resource resource )

Edits the given Resource.


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.


  • Node get_edited_scene_root ( )

Returns the edited (current) scene’s root Node.


Returns the EditorSettings.


Returns the editor Viewport.



  • Array get_open_scenes ( ) const

Returns an Array with the file paths of the currently opened scenes.


Returns the EditorFileSystem.


Returns the EditorResourcePreview.


Returns the ScriptEditor.


  • String get_selected_path ( ) const

Returns the EditorSelection.


  • void inspect_object ( Object object, String for_property=”” )

Shows the given property on the given object in the Editor’s Inspector dock.


Returns the enabled status of a plugin. The plugin name is the same as its directory name.


Returns mesh previews rendered at the given size as an Array of Textures.


  • void open_scene_from_path ( String scene_filepath )

Opens the scene at the given path.


  • void reload_scene_from_path ( String scene_filepath )

Reloads the scene at the given path.


Saves the scene. Returns either OK or ERR_CANT_CREATE. See @GlobalScope constants.


  • void save_scene_as ( String path, bool with_preview=true )

Saves the scene as a file at path.


  • void select_file ( String file )

  • void set_plugin_enabled ( String plugin, bool enabled )

Sets the enabled status of a plugin. The plugin name is the same as its directory name.