Files
godot-docs-l10n/classes/it/class_editorinterface.rst
Rémi Verschelde c3f2364c10 Sync classref with 4.6 branch
Lots of translations invalidated (fuzzied) as we just synced Weblate.
2025-12-19 16:39:51 +01:00

1120 lines
96 KiB
ReStructuredText

:github_url: hide
.. _class_EditorInterface:
EditorInterface
===============
**Eredita:** :ref:`Object<class_Object>`
Interfaccia dell'editor Godot.
.. rst-class:: classref-introduction-group
Descrizione
----------------------
**EditorInterface** dà il controllo sulla finestra dell'editor di Godot. Permette di personalizzare la finestra, salvare e (ri)caricare scene, renderizzare le anteprime delle mesh, ispezionare e modificare le risorse e gli oggetti e fornisce l'accesso a :ref:`EditorSettings<class_EditorSettings>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`ScriptEditor<class_ScriptEditor>`, alla viewport dell'editor e alle informazioni sulle scene.
\ **Nota:** Questa classe non dovrebbe essere istanziata direttamente. Invece, accedi al singleton direttamente tramite il suo nome.
.. tabs::
.. code-tab:: gdscript
var editor_settings = EditorInterface.get_editor_settings()
.. code-tab:: csharp
// In C# puoi accedervi tramite la proprietà Singleton statica.
EditorSettings settings = EditorInterface.Singleton.GetEditorSettings();
.. rst-class:: classref-reftable-group
Proprietà
------------------
.. table::
:widths: auto
+-------------------------+------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`distraction_free_mode<class_EditorInterface_property_distraction_free_mode>` |
+-------------------------+------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`movie_maker_enabled<class_EditorInterface_property_movie_maker_enabled>` |
+-------------------------+------------------------------------------------------------------------------------+
.. rst-class:: classref-reftable-group
Metodi
------------
.. table::
:widths: auto
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`add_root_node<class_EditorInterface_method_add_root_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`close_scene<class_EditorInterface_method_close_scene>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`edit_node<class_EditorInterface_method_edit_node>`\ (\ node\: :ref:`Node<class_Node>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`edit_resource<class_EditorInterface_method_edit_resource>`\ (\ resource\: :ref:`Resource<class_Resource>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`edit_script<class_EditorInterface_method_edit_script>`\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_current_feature_profile<class_EditorInterface_method_get_current_feature_profile>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_editor_language<class_EditorInterface_method_get_editor_language>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Theme<class_Theme>` | :ref:`get_editor_theme<class_EditorInterface_method_get_editor_theme>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorToaster<class_EditorToaster>` | :ref:`get_editor_toaster<class_EditorInterface_method_get_editor_toaster>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_editor_undo_redo<class_EditorInterface_method_get_editor_undo_redo>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_2d<class_EditorInterface_method_get_editor_viewport_2d>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`SubViewport<class_SubViewport>` | :ref:`get_editor_viewport_3d<class_EditorInterface_method_get_editor_viewport_3d>`\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_node_3d_rotate_snap<class_EditorInterface_method_get_node_3d_rotate_snap>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_node_3d_scale_snap<class_EditorInterface_method_get_node_3d_scale_snap>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`float<class_float>` | :ref:`get_node_3d_translate_snap<class_EditorInterface_method_get_node_3d_translate_snap>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] | :ref:`get_open_scene_roots<class_EditorInterface_method_get_open_scene_roots>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`inspect_object<class_EditorInterface_method_inspect_object>`\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_multi_window_enabled<class_EditorInterface_method_is_multi_window_enabled>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_node_3d_snap_enabled<class_EditorInterface_method_is_node_3d_snap_enabled>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_object_edited<class_EditorInterface_method_is_object_edited>`\ (\ object\: :ref:`Object<class_Object>`\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>`\ (\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`\ ) |const| |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>`\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`mark_scene_as_unsaved<class_EditorInterface_method_mark_scene_as_unsaved>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`, set_inherited\: :ref:`bool<class_bool>` = false\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_create_dialog<class_EditorInterface_method_popup_create_dialog>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_dialog<class_EditorInterface_method_popup_dialog>`\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_dialog_centered<class_EditorInterface_method_popup_dialog_centered>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_dialog_centered_clamped<class_EditorInterface_method_popup_dialog_centered_clamped>`\ (\ dialog\: :ref:`Window<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_dialog_centered_ratio<class_EditorInterface_method_popup_dialog_centered_ratio>`\ (\ dialog\: :ref:`Window<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_method_selector<class_EditorInterface_method_popup_method_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, current_value\: :ref:`String<class_String>` = ""\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_node_selector<class_EditorInterface_method_popup_node_selector>`\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], current_value\: :ref:`Node<class_Node>` = null\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_property_selector<class_EditorInterface_method_popup_property_selector>`\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), current_value\: :ref:`String<class_String>` = ""\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`popup_quick_open<class_EditorInterface_method_popup_quick_open>`\ (\ callback\: :ref:`Callable<class_Callable>`, base_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>`\ (\ scene_filepath\: :ref:`String<class_String>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`restart_editor<class_EditorInterface_method_restart_editor>`\ (\ save\: :ref:`bool<class_bool>` = true\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`save_all_scenes<class_EditorInterface_method_save_all_scenes>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>`\ (\ path\: :ref:`String<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`select_file<class_EditorInterface_method_select_file>`\ (\ file\: :ref:`String<class_String>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_current_feature_profile<class_EditorInterface_method_set_current_feature_profile>`\ (\ profile_name\: :ref:`String<class_String>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>`\ (\ name\: :ref:`String<class_String>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_object_edited<class_EditorInterface_method_set_object_edited>`\ (\ object\: :ref:`Object<class_Object>`, edited\: :ref:`bool<class_bool>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>`\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| |void| | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>`\ (\ ) |
+----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descrizioni delle proprietà
------------------------------------------------------
.. _class_EditorInterface_property_distraction_free_mode:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **distraction_free_mode** :ref:`🔗<class_EditorInterface_property_distraction_free_mode>`
.. rst-class:: classref-property-setget
- |void| **set_distraction_free_mode**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_distraction_free_mode_enabled**\ (\ )
Se ``true``, abilita la modalità senza distrazioni che nasconde i pannelli laterali per aumentare lo spazio disponibile per la vista principale.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_property_movie_maker_enabled:
.. rst-class:: classref-property
:ref:`bool<class_bool>` **movie_maker_enabled** :ref:`🔗<class_EditorInterface_property_movie_maker_enabled>`
.. rst-class:: classref-property-setget
- |void| **set_movie_maker_enabled**\ (\ value\: :ref:`bool<class_bool>`\ )
- :ref:`bool<class_bool>` **is_movie_maker_enabled**\ (\ )
Se ``true``, la modalità Movie Maker è abilitata nell'editor. Vedi :ref:`MovieWriter<class_MovieWriter>` per ulteriori informazioni.
.. rst-class:: classref-section-separator
----
.. rst-class:: classref-descriptions-group
Descrizioni dei metodi
--------------------------------------------
.. _class_EditorInterface_method_add_root_node:
.. rst-class:: classref-method
|void| **add_root_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorInterface_method_add_root_node>`
Rende ``node`` la radice della scena attualmente aperta. Funziona solo se la scena è vuota. Se ``node`` è un'istanza di scena, verrà creata una scena ereditaria.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_close_scene:
.. rst-class:: classref-method
:ref:`Error<enum_@GlobalScope_Error>` **close_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_close_scene>`
Chiude la scena attualmente attiva, ignorando eventuali modifiche in sospeso nel processo. Restituisce :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` in caso di successo oppure :ref:`@GlobalScope.ERR_DOES_NOT_EXIST<class_@GlobalScope_constant_ERR_DOES_NOT_EXIST>` se non c'è alcuna scena da chiudere.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_edit_node:
.. rst-class:: classref-method
|void| **edit_node**\ (\ node\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorInterface_method_edit_node>`
Modifica il :ref:`Node<class_Node>` specificato. Il nodo verrà selezionato anche se si trova all'interno dell'albero di scena.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_edit_resource:
.. rst-class:: classref-method
|void| **edit_resource**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorInterface_method_edit_resource>`
Modifica la :ref:`Resource<class_Resource>` specificata. Se la risorsa è uno :ref:`Script<class_Script>`, puoi anche modificarla con :ref:`edit_script()<class_EditorInterface_method_edit_script>` per specificare la posizione della riga e della colonna.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_edit_script:
.. rst-class:: classref-method
|void| **edit_script**\ (\ script\: :ref:`Script<class_Script>`, line\: :ref:`int<class_int>` = -1, column\: :ref:`int<class_int>` = 0, grab_focus\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_edit_script>`
Modifica lo :ref:`Script<class_Script>` specificato. È anche possibile specificare la riga e la colonna su cui aprire lo script. Lo script verrà aperto con l'editor configurato dall'utente per la lingua dello script, che potrebbe essere un editor esterno.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_base_control:
.. rst-class:: classref-method
:ref:`Control<class_Control>` **get_base_control**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_base_control>`
Restituisce il contenitore principale della finestra dell'editor di Godot. Ad esempio, puoi usarlo per recuperare la dimensione del contenitore e posizionare i tuoi controlli di conseguenza.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà l'editor inutile e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_command_palette:
.. rst-class:: classref-method
:ref:`EditorCommandPalette<class_EditorCommandPalette>` **get_command_palette**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_command_palette>`
Restituisce l'istanza di :ref:`EditorCommandPalette<class_EditorCommandPalette>` dell'editor.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà una parte dell'editor inutile e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_current_directory:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_current_directory**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_directory>`
Restituisce la cartella attualmente visualizzata nel :ref:`FileSystemDock<class_FileSystemDock>`. Se viene selezionato un file, la sua cartella di base verrà restituita attraverso :ref:`String.get_base_dir()<class_String_method_get_base_dir>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_current_feature_profile:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_current_feature_profile**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_feature_profile>`
Restituisce il nome del profilo di funzionalità attualmente attivo. Se il profilo predefinito è attualmente attivo, viene restituita una stringa vuota.
Per ottenere un riferimento all':ref:`EditorFeatureProfile<class_EditorFeatureProfile>`, è necessario caricare il profilo di funzionalità attraverso :ref:`EditorFeatureProfile.load_from_file()<class_EditorFeatureProfile_method_load_from_file>`.
\ **Nota:** I profili di funzionalità creati tramite l'interfaccia utente sono caricati dalla cartella ``feature_profiles``, come file con estensione ``.profile``. È possibile ricavare la cartella di configurazione dell'editor tramite :ref:`EditorPaths.get_config_dir()<class_EditorPaths_method_get_config_dir>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_current_path:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_current_path**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_current_path>`
Restituisce il percorso attualmente visualizzato nel :ref:`FileSystemDock<class_FileSystemDock>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_edited_scene_root:
.. rst-class:: classref-method
:ref:`Node<class_Node>` **get_edited_scene_root**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_edited_scene_root>`
Restituisce il :ref:`Node<class_Node>` radice della scena in fase di modifica (attuale).
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_language:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_editor_language**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_language>`
Returns the language currently used for the editor interface.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_main_screen:
.. rst-class:: classref-method
:ref:`VBoxContainer<class_VBoxContainer>` **get_editor_main_screen**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_main_screen>`
Restituisce il controllo dell'editor responsabile dei plugin e degli strumenti della schermata principale. Utilizzalo con le estensioni che implementano :ref:`EditorPlugin._has_main_screen()<class_EditorPlugin_private_method__has_main_screen>`.
\ **Nota:** Questo nodo è un :ref:`VBoxContainer<class_VBoxContainer>`, il che significa che se si aggiunge un figlio :ref:`Control<class_Control>` ad esso, è necessario impostare il :ref:`Control.size_flags_vertical<class_Control_property_size_flags_vertical>` del figlio su :ref:`Control.SIZE_EXPAND_FILL<class_Control_constant_SIZE_EXPAND_FILL>` per fargli usare tutto lo spazio disponibile.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà una parte dell'editor inutile e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_paths:
.. rst-class:: classref-method
:ref:`EditorPaths<class_EditorPaths>` **get_editor_paths**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_paths>`
Restituisce il singleton :ref:`EditorPaths<class_EditorPaths>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_scale:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_editor_scale**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_scale>`
Restituisce la scala effettiva dell'interfaccia utente dell'editor (``1.0`` è una scala del 100%). Può essere utilizzata per regolare la posizione e le dimensioni dell'interfaccia utente aggiunta dalle estensioni.
\ **Nota:** Questo valore è impostato tramite le impostazioni :ref:`EditorSettings.interface/editor/display_scale<class_EditorSettings_property_interface/editor/display_scale>` and :ref:`EditorSettings.interface/editor/custom_display_scale<class_EditorSettings_property_interface/editor/custom_display_scale>`. L'editor deve essere riavviato affinché le modifiche siano applicate correttamente.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_settings:
.. rst-class:: classref-method
:ref:`EditorSettings<class_EditorSettings>` **get_editor_settings**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_settings>`
Restituisce l'istanza di :ref:`EditorSettings<class_EditorSettings>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_theme:
.. rst-class:: classref-method
:ref:`Theme<class_Theme>` **get_editor_theme**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_theme>`
Restituisce il :ref:`Theme<class_Theme>` dell'editor.
\ **Nota:** Quando si crea un'interfaccia utente dell'editor personalizzata, è preferibile accedere agli elementi del tema direttamente dai nodi della GUI attraverso i metodi ``get_theme_*``.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_toaster:
.. rst-class:: classref-method
:ref:`EditorToaster<class_EditorToaster>` **get_editor_toaster**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_toaster>`
Restituisce l':ref:`EditorToaster<class_EditorToaster>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_undo_redo:
.. rst-class:: classref-method
:ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_editor_undo_redo**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_undo_redo>`
Restituisce l':ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_viewport_2d:
.. rst-class:: classref-method
:ref:`SubViewport<class_SubViewport>` **get_editor_viewport_2d**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_viewport_2d>`
Restituisce la :ref:`SubViewport<class_SubViewport>` dell'editor 2D. Non ha una telecamera. Invece, le trasformazioni della vista vengono effettuate direttamente e sono accessibili con :ref:`Viewport.global_canvas_transform<class_Viewport_property_global_canvas_transform>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_editor_viewport_3d:
.. rst-class:: classref-method
:ref:`SubViewport<class_SubViewport>` **get_editor_viewport_3d**\ (\ idx\: :ref:`int<class_int>` = 0\ ) |const| :ref:`🔗<class_EditorInterface_method_get_editor_viewport_3d>`
Restituisce la :ref:`SubViewport<class_SubViewport>` dell'editor 3D specificata, da ``0`` a ``3``. La viewport può essere utilizzata per accedere alle telecamere dell'editor attivo con :ref:`Viewport.get_camera_3d()<class_Viewport_method_get_camera_3d>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_file_system_dock:
.. rst-class:: classref-method
:ref:`FileSystemDock<class_FileSystemDock>` **get_file_system_dock**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_file_system_dock>`
Restituisce l'istanza :ref:`FileSystemDock<class_FileSystemDock>` dell'editor.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà inutile una parte dell'editor e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_inspector:
.. rst-class:: classref-method
:ref:`EditorInspector<class_EditorInspector>` **get_inspector**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_inspector>`
Restituisce l'istanza :ref:`EditorInspector<class_EditorInspector>` dell'editor.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà inutile una parte dell'editor e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_node_3d_rotate_snap:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_node_3d_rotate_snap**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_node_3d_rotate_snap>`
Returns the amount of degrees the 3D editor's rotational snapping is set to.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_node_3d_scale_snap:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_node_3d_scale_snap**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_node_3d_scale_snap>`
Returns the amount of units the 3D editor's scale snapping is set to.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_node_3d_translate_snap:
.. rst-class:: classref-method
:ref:`float<class_float>` **get_node_3d_translate_snap**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_node_3d_translate_snap>`
Returns the amount of units the 3D editor's translation snapping is set to.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_open_scene_roots:
.. rst-class:: classref-method
:ref:`Array<class_Array>`\[:ref:`Node<class_Node>`\] **get_open_scene_roots**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_open_scene_roots>`
Restituisce un array con riferimenti ai nodi radice delle scene attualmente aperte.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_open_scenes:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_open_scenes**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_open_scenes>`
Restituisce un array con i percorsi dei file delle scene attualmente aperte.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_playing_scene:
.. rst-class:: classref-method
:ref:`String<class_String>` **get_playing_scene**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_playing_scene>`
Restituisce il nome della scena che è in riproduzione. Se nessuna scena è attualmente in riproduzione, restituisce una stringa vuota.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_resource_filesystem:
.. rst-class:: classref-method
:ref:`EditorFileSystem<class_EditorFileSystem>` **get_resource_filesystem**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_resource_filesystem>`
Restituisce l'istanza :ref:`EditorFileSystem<class_EditorFileSystem>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_resource_previewer:
.. rst-class:: classref-method
:ref:`EditorResourcePreview<class_EditorResourcePreview>` **get_resource_previewer**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_resource_previewer>`
Restituisce l'istanza :ref:`EditorResourcePreview<class_EditorResourcePreview>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_script_editor:
.. rst-class:: classref-method
:ref:`ScriptEditor<class_ScriptEditor>` **get_script_editor**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_script_editor>`
Restituisce l'istanza :ref:`ScriptEditor<class_ScriptEditor>` dell'editor.
\ **Attenzione:** Rimuovere e liberare questo nodo renderà inutile una parte dell'editor e potrebbe causare un arresto anomalo.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_selected_paths:
.. rst-class:: classref-method
:ref:`PackedStringArray<class_PackedStringArray>` **get_selected_paths**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_selected_paths>`
Restituisce un array contenente i percorsi dei file (e cartelle) attualmente selezionati nel :ref:`FileSystemDock<class_FileSystemDock>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_get_selection:
.. rst-class:: classref-method
:ref:`EditorSelection<class_EditorSelection>` **get_selection**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_get_selection>`
Restituisce l'istanza :ref:`EditorSelection<class_EditorSelection>` dell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_inspect_object:
.. rst-class:: classref-method
|void| **inspect_object**\ (\ object\: :ref:`Object<class_Object>`, for_property\: :ref:`String<class_String>` = "", inspector_only\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorInterface_method_inspect_object>`
Mostra la proprietà specificata sull'oggetto ``object`` nel pannello dell'Ispettore dell'editor. Se ``inspector_only`` è ``true``, i plugin non tenteranno di modificare ``object``.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_is_multi_window_enabled:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_multi_window_enabled**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_is_multi_window_enabled>`
Restituisce ``true`` se il supporto per più finestre è abilitato nell'editor. Il supporto per più finestre è abilitato se *tutte* queste condizioni sono vere:
- :ref:`EditorSettings.interface/multi_window/enable<class_EditorSettings_property_interface/multi_window/enable>` è ``true``.
- :ref:`EditorSettings.interface/editor/single_window_mode<class_EditorSettings_property_interface/editor/single_window_mode>` è ``false``.
- :ref:`Viewport.gui_embed_subwindows<class_Viewport_property_gui_embed_subwindows>` è ``false``. Questo è forzato a ``true`` su piattaforme che non supportano più finestre come Web, o quando viene utilizzato l'argomento della riga di comando ``--single-window`` :doc:`../tutorials/editor/command_line_tutorial`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_is_node_3d_snap_enabled:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_node_3d_snap_enabled**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_is_node_3d_snap_enabled>`
Returns ``true`` if the 3D editor currently has snapping mode enabled, and ``false`` otherwise.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_is_object_edited:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_object_edited**\ (\ object\: :ref:`Object<class_Object>`\ ) |const| :ref:`🔗<class_EditorInterface_method_is_object_edited>`
Returns ``true`` if the object has been marked as edited through :ref:`set_object_edited()<class_EditorInterface_method_set_object_edited>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_is_playing_scene:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_playing_scene**\ (\ ) |const| :ref:`🔗<class_EditorInterface_method_is_playing_scene>`
Restituisce ``true`` se una scena è attualmente in riproduzione, altrimenti ``false``. Le scene in pausa sono considerate in riproduzione.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_is_plugin_enabled:
.. rst-class:: classref-method
:ref:`bool<class_bool>` **is_plugin_enabled**\ (\ plugin\: :ref:`String<class_String>`\ ) |const| :ref:`🔗<class_EditorInterface_method_is_plugin_enabled>`
Restituisce ``true`` se l'estensione ``plugin`` è abilitata. Il nome dell'estensione è la stessa della sua cartella.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_make_mesh_previews:
.. rst-class:: classref-method
:ref:`Array<class_Array>`\[:ref:`Texture2D<class_Texture2D>`\] **make_mesh_previews**\ (\ meshes\: :ref:`Array<class_Array>`\[:ref:`Mesh<class_Mesh>`\], preview_size\: :ref:`int<class_int>`\ ) :ref:`🔗<class_EditorInterface_method_make_mesh_previews>`
Restituisce le anteprime della mesh renderizzate alla dimensione specificata come un :ref:`Array<class_Array>` di :ref:`Texture2D<class_Texture2D>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_mark_scene_as_unsaved:
.. rst-class:: classref-method
|void| **mark_scene_as_unsaved**\ (\ ) :ref:`🔗<class_EditorInterface_method_mark_scene_as_unsaved>`
Contrassegna la scheda della scena attuale come non salvata.
.. 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<class_String>`, set_inherited\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorInterface_method_open_scene_from_path>`
Apre la scena al percorso specificato. Se ``set_inherited`` è ``true``, crea una nuova scena ereditata.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_play_current_scene:
.. rst-class:: classref-method
|void| **play_current_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_play_current_scene>`
Riproduce la scena attualmente attiva.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_play_custom_scene:
.. rst-class:: classref-method
|void| **play_custom_scene**\ (\ scene_filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_play_custom_scene>`
Riproduce la scena specificata dal suo percorso file.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_play_main_scene:
.. rst-class:: classref-method
|void| **play_main_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_play_main_scene>`
Riproduce la scena principale.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_create_dialog:
.. rst-class:: classref-method
|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable<class_Callable>`, base_type\: :ref:`StringName<class_StringName>` = "", current_type\: :ref:`String<class_String>` = "", dialog_title\: :ref:`String<class_String>` = "", type_blocklist\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_EditorInterface_method_popup_create_dialog>`
**Sperimentale:** Questo metodo potrebbe essere cambiato o rimosso in versioni future.
Pops up an editor dialog for creating an object.
The ``callback`` must take a single argument of type :ref:`String<class_String>`, which will contain the type name of the selected object (or the script path of the type, if the type is created from a script), or be an empty string if no item is selected.
The ``base_type`` specifies the base type of objects to display. For example, if you set this to "Resource", all types derived from :ref:`Resource<class_Resource>` will display in the create dialog.
The ``current_type`` will be passed in the search box of the create dialog, and the specified type can be immediately selected when the dialog pops up. If the ``current_type`` is not derived from ``base_type``, there will be no result of the type in the dialog.
The ``dialog_title`` allows you to define a custom title for the dialog. This is useful if you want to accurately hint the usage of the dialog. If the ``dialog_title`` is an empty string, the dialog will use "Create New 'Base Type'" as the default title.
The ``type_blocklist`` contains a list of type names, and the types in the blocklist will be hidden from the create dialog.
\ **Note:** Trying to list the base type in the ``type_blocklist`` will hide all types derived from the base type from the create dialog.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_dialog:
.. rst-class:: classref-method
|void| **popup_dialog**\ (\ dialog\: :ref:`Window<class_Window>`, rect\: :ref:`Rect2i<class_Rect2i>` = Rect2i(0, 0, 0, 0)\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog>`
Apre la finestra ``dialog`` nell'interfaccia utente dell'editor con :ref:`Window.popup_exclusive()<class_Window_method_popup_exclusive>`. La finestra di dialogo non deve avere un genitore attuale, altrimenti il metodo fallisce.
Vedi anche :ref:`Window.set_unparent_when_invisible()<class_Window_method_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<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0)\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered>`
Apre la finestra ``dialog`` nell'interfaccia utente dell'editor con :ref:`Window.popup_exclusive_centered()<class_Window_method_popup_exclusive_centered>`. La finestra di dialogo non deve avere un genitore attuale, altrimenti il metodo fallisce.
Vedi anche :ref:`Window.set_unparent_when_invisible()<class_Window_method_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<class_Window>`, minsize\: :ref:`Vector2i<class_Vector2i>` = Vector2i(0, 0), fallback_ratio\: :ref:`float<class_float>` = 0.75\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered_clamped>`
Apre la finestra ``dialog`` nell'interfaccia utente dell'editor con :ref:`Window.popup_exclusive_centered_clamped()<class_Window_method_popup_exclusive_centered_clamped>`. La finestra di dialogo non deve avere un genitore attuale, altrimenti il metodo fallisce.
Vedi anche :ref:`Window.set_unparent_when_invisible()<class_Window_method_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<class_Window>`, ratio\: :ref:`float<class_float>` = 0.8\ ) :ref:`🔗<class_EditorInterface_method_popup_dialog_centered_ratio>`
Apre la finestra ``dialog`` nell'interfaccia utente dell'editor con :ref:`Window.popup_exclusive_centered_ratio()<class_Window_method_popup_exclusive_centered_ratio>`. La finestra di dialogo non deve avere un genitore attuale, altrimenti il metodo fallisce.
Vedi anche :ref:`Window.set_unparent_when_invisible()<class_Window_method_set_unparent_when_invisible>`.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_method_selector:
.. rst-class:: classref-method
|void| **popup_method_selector**\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, current_value\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_EditorInterface_method_popup_method_selector>`
Apre una finestra di dialogo dell'editor per selezionare un metodo da ``object``. Il ``callback`` deve accettare un singolo argomento di tipo :ref:`String<class_String>` che conterrà il nome del metodo selezionato o sarà vuoto se la finestra di dialogo viene chiusa. Se viene fornito ``current_value``, il metodo sarà selezionato automaticamente nell'elenco dei metodi, se esiste.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_node_selector:
.. rst-class:: classref-method
|void| **popup_node_selector**\ (\ callback\: :ref:`Callable<class_Callable>`, valid_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = [], current_value\: :ref:`Node<class_Node>` = null\ ) :ref:`🔗<class_EditorInterface_method_popup_node_selector>`
Apre una finestra di dialogo dell'editor per selezionare un :ref:`Node<class_Node>` dalla scena modificata. Il ``callback`` deve accettare un singolo argomento di tipo :ref:`NodePath<class_NodePath>`. Viene chiamato sul :ref:`NodePath<class_NodePath>` selezionato o sul percorso vuoto ``^""`` se la finestra di dialogo viene annullata. Se ``valid_types`` viene fornito, la finestra di dialogo mostrerà solo i nodi che corrispondono a uno dei tipi di nodo elencati. Se viene fornito ``current_value``, il nodo verrà selezionato automaticamente nell'albero, se esiste.
\ **Esempio:** Visualizza la finestra di dialogo per selezionare un nodo non appena questo nodo viene aggiunto all'albero per la prima volta:
::
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("selezione nodo annullata")
else:
print("selezionato ", node_path)
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_property_selector:
.. rst-class:: classref-method
|void| **popup_property_selector**\ (\ object\: :ref:`Object<class_Object>`, callback\: :ref:`Callable<class_Callable>`, type_filter\: :ref:`PackedInt32Array<class_PackedInt32Array>` = PackedInt32Array(), current_value\: :ref:`String<class_String>` = ""\ ) :ref:`🔗<class_EditorInterface_method_popup_property_selector>`
Apre una finestra di dialogo dell'editor per selezionare le proprietà da ``object``. Il ``callback`` deve accettare un singolo argomento di tipo :ref:`NodePath<class_NodePath>`. Viene chiamato sul percorso della proprietà selezionata (vedi :ref:`NodePath.get_as_property_path()<class_NodePath_method_get_as_property_path>`) o sul percorso vuoto ``^""`` se la finestra di dialogo viene annullata. Se ``type_filter`` viene fornito, la finestra di dialogo mostrerà solo le proprietà che corrispondono a uno dei valori di :ref:`Variant.Type<enum_@GlobalScope_Variant.Type>` elencati. Se viene fornito ``current_value``, la proprietà verrà selezionata automaticamente nell'elenco delle proprietà, se esiste.
::
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("selezione proprietà annullata")
else:
print("selezionata ", property_path)
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_popup_quick_open:
.. rst-class:: classref-method
|void| **popup_quick_open**\ (\ callback\: :ref:`Callable<class_Callable>`, base_types\: :ref:`Array<class_Array>`\[:ref:`StringName<class_StringName>`\] = []\ ) :ref:`🔗<class_EditorInterface_method_popup_quick_open>`
Apre una finestra di dialogo dell'editor per selezionare rapidamente un file risorsa. Il ``callback`` deve accettare un singolo argomento di tipo :ref:`String<class_String>` che conterrà il percorso della risorsa selezionata o sarà vuoto se la finestra di dialogo viene chiusa. Se viene fornito ``base_types``, la finestra di dialogo mostrerà solo le risorse che corrispondono a questi tipi. Sono supportati solo i tipi derivanti da :ref:`Resource<class_Resource>`.
.. 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<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_reload_scene_from_path>`
Ricarica la scena al percorso indicato.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_restart_editor:
.. rst-class:: classref-method
|void| **restart_editor**\ (\ save\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_restart_editor>`
Riavvia l'editor. Questo chiude l'editor e poi apre lo stesso progetto. Se ``save`` è ``true``, il progetto verrà salvato prima di riavviare.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_save_all_scenes:
.. rst-class:: classref-method
|void| **save_all_scenes**\ (\ ) :ref:`🔗<class_EditorInterface_method_save_all_scenes>`
Salva tutte le scene aperte nell'editor.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_save_scene:
.. rst-class:: classref-method
:ref:`Error<enum_@GlobalScope_Error>` **save_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_save_scene>`
Salva la scena attualmente attiva. Restituisce :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` o :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_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<class_String>`, with_preview\: :ref:`bool<class_bool>` = true\ ) :ref:`🔗<class_EditorInterface_method_save_scene_as>`
Salva la scena attualmente attiva come file nel percorso ``path``.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_select_file:
.. rst-class:: classref-method
|void| **select_file**\ (\ file\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_select_file>`
Seleziona il file, con il percorso fornito da ``file``, nel pannello del FileSystem.
.. 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<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_set_current_feature_profile>`
Seleziona e attiva il profilo di funzionalità specificato con il nome del profilo ``profile_name`` specificato. Imposta ``profile_name`` su una stringa vuota per ripristinare il profilo di funzionalità predefinito.
Un profilo di funzionalità può essere creato in codice usando la classe :ref:`EditorFeatureProfile<class_EditorFeatureProfile>`.
\ **Nota:** Il profilo di funzionalità che viene attivato deve trovarsi nella cartella ``feature_profiles``, come file con estensione ``.profile``. Se non è possibile trovare un profilo, si verifica un errore. La cartella di configurazione dell'editor può essere trovata tramite :ref:`EditorPaths.get_config_dir()<class_EditorPaths_method_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<class_String>`\ ) :ref:`🔗<class_EditorInterface_method_set_main_screen_editor>`
Imposta la schermata principale attuale dell'editor su quella specificata in ``name``. ``name`` deve corrispondere esattamente al titolo della scheda in questione (ad esempio ``2D``, ``3D``, ``Script``, ``Gioco`` o ``AssetLib`` per le schede predefinite).
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_set_object_edited:
.. rst-class:: classref-method
|void| **set_object_edited**\ (\ object\: :ref:`Object<class_Object>`, edited\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInterface_method_set_object_edited>`
If ``edited`` is ``true``, the object is marked as edited.
\ **Note:** This is primarily used by the editor for :ref:`Resource<class_Resource>` based objects to track their modified state. For example, any changes to an open scene, a resource in the inspector, or an edited script will cause this method to be called with ``true``. Saving the scene, script, or resource resets the edited state by calling this method with ``false``.
\ **Note:** Each call to this method increments the object's edited version. This is used to track changes in the editor and to trigger when thumbnails should be regenerated for resources.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_set_plugin_enabled:
.. rst-class:: classref-method
|void| **set_plugin_enabled**\ (\ plugin\: :ref:`String<class_String>`, enabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_EditorInterface_method_set_plugin_enabled>`
Imposta lo stato d'attivazione di un'estensione. Il nome dell'estensione è lo stesso del nome della sua cartella.
.. rst-class:: classref-item-separator
----
.. _class_EditorInterface_method_stop_playing_scene:
.. rst-class:: classref-method
|void| **stop_playing_scene**\ (\ ) :ref:`🔗<class_EditorInterface_method_stop_playing_scene>`
Interrompe la scena attualmente in riproduzione.
.. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)`
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
.. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)`
.. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)`
.. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)`
.. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)`
.. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)`
.. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)`
.. |void| replace:: :abbr:`void (Nessun valore restituito.)`