W3cubDocs

/Godot 3.1

EditorInterface

Inherits: Node < Object

Category: Core

Brief Description

Godot editor’s interface.

Methods

void edit_resource ( Resource resource )
Control get_base_control ( )
Node get_edited_scene_root ( )
EditorSettings get_editor_settings ( )
Control get_editor_viewport ( )
EditorInspector get_inspector ( ) const
Array get_open_scenes ( ) const
EditorFileSystem get_resource_filesystem ( )
EditorResourcePreview get_resource_previewer ( )
ScriptEditor get_script_editor ( )
String get_selected_path ( ) const
EditorSelection get_selection ( )
void inspect_object ( Object object, String for_property=”” )
bool is_plugin_enabled ( String plugin ) const
Array make_mesh_previews ( Array meshes, int preview_size )
void open_scene_from_path ( String scene_filepath )
void reload_scene_from_path ( String scene_filepath )
Error save_scene ( )
void save_scene_as ( String path, bool with_preview=true )
void select_file ( String file )
void set_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.

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.

Node get_edited_scene_root ( )

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

EditorSettings get_editor_settings ( )

Returns the EditorSettings.

Control get_editor_viewport ( )

Returns the editor Viewport.

EditorInspector get_inspector ( ) const

Array get_open_scenes ( ) const

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

EditorFileSystem get_resource_filesystem ( )

Returns the EditorFileSystem.

EditorResourcePreview get_resource_previewer ( )

Returns the EditorResourcePreview.

ScriptEditor get_script_editor ( )

Returns the ScriptEditor.

String get_selected_path ( ) const

EditorSelection get_selection ( )

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.

bool is_plugin_enabled ( String plugin ) const

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

Array make_mesh_previews ( Array meshes, int preview_size )

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.

Error save_scene ( )

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.

© 2014–2019 Juan Linietsky, Ariel Manzur, Godot Engine contributors
Licensed under the MIT License.
http://docs.godotengine.org/en/3.1/classes/class_editorinterface.html