class_editorinterface.rst 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.0/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.0/doc/classes/EditorInterface.xml.
  6. .. _class_EditorInterface:
  7. EditorInterface
  8. ===============
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Godot editor's interface.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. **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<class_EditorSettings>`, :ref:`EditorFileSystem<class_EditorFileSystem>`, :ref:`EditorResourcePreview<class_EditorResourcePreview>`, :ref:`ScriptEditor<class_ScriptEditor>`, the editor viewport, and information about scenes.
  15. \ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorPlugin.get_editor_interface<class_EditorPlugin_method_get_editor_interface>`.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-------------------------+------------------------------------------------------------------------------------+
  22. | :ref:`bool<class_bool>` | :ref:`distraction_free_mode<class_EditorInterface_property_distraction_free_mode>` |
  23. +-------------------------+------------------------------------------------------------------------------------+
  24. .. rst-class:: classref-reftable-group
  25. Methods
  26. -------
  27. .. table::
  28. :widths: auto
  29. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`edit_node<class_EditorInterface_method_edit_node>` **(** :ref:`Node<class_Node>` node **)** |
  31. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`edit_resource<class_EditorInterface_method_edit_resource>` **(** :ref:`Resource<class_Resource>` resource **)** |
  33. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`edit_script<class_EditorInterface_method_edit_script>` **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=0, :ref:`bool<class_bool>` grab_focus=true **)** |
  35. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`Control<class_Control>` | :ref:`get_base_control<class_EditorInterface_method_get_base_control>` **(** **)** |
  37. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`EditorCommandPalette<class_EditorCommandPalette>` | :ref:`get_command_palette<class_EditorInterface_method_get_command_palette>` **(** **)** |const| |
  39. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`String<class_String>` | :ref:`get_current_directory<class_EditorInterface_method_get_current_directory>` **(** **)** |const| |
  41. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`String<class_String>` | :ref:`get_current_path<class_EditorInterface_method_get_current_path>` **(** **)** |const| |
  43. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`Node<class_Node>` | :ref:`get_edited_scene_root<class_EditorInterface_method_get_edited_scene_root>` **(** **)** |
  45. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`VBoxContainer<class_VBoxContainer>` | :ref:`get_editor_main_screen<class_EditorInterface_method_get_editor_main_screen>` **(** **)** |
  47. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`EditorPaths<class_EditorPaths>` | :ref:`get_editor_paths<class_EditorInterface_method_get_editor_paths>` **(** **)** |
  49. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`float<class_float>` | :ref:`get_editor_scale<class_EditorInterface_method_get_editor_scale>` **(** **)** |const| |
  51. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`EditorSettings<class_EditorSettings>` | :ref:`get_editor_settings<class_EditorInterface_method_get_editor_settings>` **(** **)** |
  53. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`FileSystemDock<class_FileSystemDock>` | :ref:`get_file_system_dock<class_EditorInterface_method_get_file_system_dock>` **(** **)** |
  55. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`EditorInspector<class_EditorInspector>` | :ref:`get_inspector<class_EditorInterface_method_get_inspector>` **(** **)** |const| |
  57. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_open_scenes<class_EditorInterface_method_get_open_scenes>` **(** **)** |const| |
  59. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`String<class_String>` | :ref:`get_playing_scene<class_EditorInterface_method_get_playing_scene>` **(** **)** |const| |
  61. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`EditorFileSystem<class_EditorFileSystem>` | :ref:`get_resource_filesystem<class_EditorInterface_method_get_resource_filesystem>` **(** **)** |
  63. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | :ref:`EditorResourcePreview<class_EditorResourcePreview>` | :ref:`get_resource_previewer<class_EditorInterface_method_get_resource_previewer>` **(** **)** |
  65. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`ScriptEditor<class_ScriptEditor>` | :ref:`get_script_editor<class_EditorInterface_method_get_script_editor>` **(** **)** |
  67. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`get_selected_paths<class_EditorInterface_method_get_selected_paths>` **(** **)** |const| |
  69. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | :ref:`EditorSelection<class_EditorSelection>` | :ref:`get_selection<class_EditorInterface_method_get_selection>` **(** **)** |
  71. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`inspect_object<class_EditorInterface_method_inspect_object>` **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` for_property="", :ref:`bool<class_bool>` inspector_only=false **)** |
  73. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`bool<class_bool>` | :ref:`is_movie_maker_enabled<class_EditorInterface_method_is_movie_maker_enabled>` **(** **)** |const| |
  75. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | :ref:`bool<class_bool>` | :ref:`is_playing_scene<class_EditorInterface_method_is_playing_scene>` **(** **)** |const| |
  77. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_method_is_plugin_enabled>` **(** :ref:`String<class_String>` plugin **)** |const| |
  79. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | :ref:`Texture2D[]<class_Texture2D>` | :ref:`make_mesh_previews<class_EditorInterface_method_make_mesh_previews>` **(** :ref:`Mesh[]<class_Mesh>` meshes, :ref:`int<class_int>` preview_size **)** |
  81. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`open_scene_from_path<class_EditorInterface_method_open_scene_from_path>` **(** :ref:`String<class_String>` scene_filepath **)** |
  83. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`play_current_scene<class_EditorInterface_method_play_current_scene>` **(** **)** |
  85. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`play_custom_scene<class_EditorInterface_method_play_custom_scene>` **(** :ref:`String<class_String>` scene_filepath **)** |
  87. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`play_main_scene<class_EditorInterface_method_play_main_scene>` **(** **)** |
  89. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`reload_scene_from_path<class_EditorInterface_method_reload_scene_from_path>` **(** :ref:`String<class_String>` scene_filepath **)** |
  91. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`restart_editor<class_EditorInterface_method_restart_editor>` **(** :ref:`bool<class_bool>` save=true **)** |
  93. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`Error<enum_@GlobalScope_Error>` | :ref:`save_scene<class_EditorInterface_method_save_scene>` **(** **)** |
  95. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`save_scene_as<class_EditorInterface_method_save_scene_as>` **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` with_preview=true **)** |
  97. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`select_file<class_EditorInterface_method_select_file>` **(** :ref:`String<class_String>` file **)** |
  99. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`set_main_screen_editor<class_EditorInterface_method_set_main_screen_editor>` **(** :ref:`String<class_String>` name **)** |
  101. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`set_movie_maker_enabled<class_EditorInterface_method_set_movie_maker_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |
  103. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`set_plugin_enabled<class_EditorInterface_method_set_plugin_enabled>` **(** :ref:`String<class_String>` plugin, :ref:`bool<class_bool>` enabled **)** |
  105. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`stop_playing_scene<class_EditorInterface_method_stop_playing_scene>` **(** **)** |
  107. +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. .. rst-class:: classref-section-separator
  109. ----
  110. .. rst-class:: classref-descriptions-group
  111. Property Descriptions
  112. ---------------------
  113. .. _class_EditorInterface_property_distraction_free_mode:
  114. .. rst-class:: classref-property
  115. :ref:`bool<class_bool>` **distraction_free_mode**
  116. .. rst-class:: classref-property-setget
  117. - void **set_distraction_free_mode** **(** :ref:`bool<class_bool>` value **)**
  118. - :ref:`bool<class_bool>` **is_distraction_free_mode_enabled** **(** **)**
  119. If ``true``, enables distraction-free mode which hides side docks to increase the space available for the main view.
  120. .. rst-class:: classref-section-separator
  121. ----
  122. .. rst-class:: classref-descriptions-group
  123. Method Descriptions
  124. -------------------
  125. .. _class_EditorInterface_method_edit_node:
  126. .. rst-class:: classref-method
  127. void **edit_node** **(** :ref:`Node<class_Node>` node **)**
  128. Edits the given :ref:`Node<class_Node>`. The node will be also selected if it's inside the scene tree.
  129. .. rst-class:: classref-item-separator
  130. ----
  131. .. _class_EditorInterface_method_edit_resource:
  132. .. rst-class:: classref-method
  133. void **edit_resource** **(** :ref:`Resource<class_Resource>` resource **)**
  134. Edits the given :ref:`Resource<class_Resource>`. If the resource is a :ref:`Script<class_Script>` you can also edit it with :ref:`edit_script<class_EditorInterface_method_edit_script>` to specify the line and column position.
  135. .. rst-class:: classref-item-separator
  136. ----
  137. .. _class_EditorInterface_method_edit_script:
  138. .. rst-class:: classref-method
  139. void **edit_script** **(** :ref:`Script<class_Script>` script, :ref:`int<class_int>` line=-1, :ref:`int<class_int>` column=0, :ref:`bool<class_bool>` grab_focus=true **)**
  140. Edits the given :ref:`Script<class_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.
  141. .. rst-class:: classref-item-separator
  142. ----
  143. .. _class_EditorInterface_method_get_base_control:
  144. .. rst-class:: classref-method
  145. :ref:`Control<class_Control>` **get_base_control** **(** **)**
  146. 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.
  147. \ **Warning:** Removing and freeing this node will render the editor useless and may cause a crash.
  148. .. rst-class:: classref-item-separator
  149. ----
  150. .. _class_EditorInterface_method_get_command_palette:
  151. .. rst-class:: classref-method
  152. :ref:`EditorCommandPalette<class_EditorCommandPalette>` **get_command_palette** **(** **)** |const|
  153. Returns the editor's :ref:`EditorCommandPalette<class_EditorCommandPalette>` instance.
  154. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  155. .. rst-class:: classref-item-separator
  156. ----
  157. .. _class_EditorInterface_method_get_current_directory:
  158. .. rst-class:: classref-method
  159. :ref:`String<class_String>` **get_current_directory** **(** **)** |const|
  160. Returns the current directory being viewed in the :ref:`FileSystemDock<class_FileSystemDock>`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir<class_String_method_get_base_dir>` instead.
  161. .. rst-class:: classref-item-separator
  162. ----
  163. .. _class_EditorInterface_method_get_current_path:
  164. .. rst-class:: classref-method
  165. :ref:`String<class_String>` **get_current_path** **(** **)** |const|
  166. Returns the current path being viewed in the :ref:`FileSystemDock<class_FileSystemDock>`.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_EditorInterface_method_get_edited_scene_root:
  170. .. rst-class:: classref-method
  171. :ref:`Node<class_Node>` **get_edited_scene_root** **(** **)**
  172. Returns the edited (current) scene's root :ref:`Node<class_Node>`.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_EditorInterface_method_get_editor_main_screen:
  176. .. rst-class:: classref-method
  177. :ref:`VBoxContainer<class_VBoxContainer>` **get_editor_main_screen** **(** **)**
  178. Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen<class_EditorPlugin_method__has_main_screen>`.
  179. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  180. .. rst-class:: classref-item-separator
  181. ----
  182. .. _class_EditorInterface_method_get_editor_paths:
  183. .. rst-class:: classref-method
  184. :ref:`EditorPaths<class_EditorPaths>` **get_editor_paths** **(** **)**
  185. Returns the :ref:`EditorPaths<class_EditorPaths>` singleton.
  186. .. rst-class:: classref-item-separator
  187. ----
  188. .. _class_EditorInterface_method_get_editor_scale:
  189. .. rst-class:: classref-method
  190. :ref:`float<class_float>` **get_editor_scale** **(** **)** |const|
  191. 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.
  192. \ **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.
  193. .. rst-class:: classref-item-separator
  194. ----
  195. .. _class_EditorInterface_method_get_editor_settings:
  196. .. rst-class:: classref-method
  197. :ref:`EditorSettings<class_EditorSettings>` **get_editor_settings** **(** **)**
  198. Returns the editor's :ref:`EditorSettings<class_EditorSettings>` instance.
  199. .. rst-class:: classref-item-separator
  200. ----
  201. .. _class_EditorInterface_method_get_file_system_dock:
  202. .. rst-class:: classref-method
  203. :ref:`FileSystemDock<class_FileSystemDock>` **get_file_system_dock** **(** **)**
  204. Returns the editor's :ref:`FileSystemDock<class_FileSystemDock>` instance.
  205. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  206. .. rst-class:: classref-item-separator
  207. ----
  208. .. _class_EditorInterface_method_get_inspector:
  209. .. rst-class:: classref-method
  210. :ref:`EditorInspector<class_EditorInspector>` **get_inspector** **(** **)** |const|
  211. Returns the editor's :ref:`EditorInspector<class_EditorInspector>` instance.
  212. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_EditorInterface_method_get_open_scenes:
  216. .. rst-class:: classref-method
  217. :ref:`PackedStringArray<class_PackedStringArray>` **get_open_scenes** **(** **)** |const|
  218. Returns an :ref:`Array<class_Array>` with the file paths of the currently opened scenes.
  219. .. rst-class:: classref-item-separator
  220. ----
  221. .. _class_EditorInterface_method_get_playing_scene:
  222. .. rst-class:: classref-method
  223. :ref:`String<class_String>` **get_playing_scene** **(** **)** |const|
  224. Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_EditorInterface_method_get_resource_filesystem:
  228. .. rst-class:: classref-method
  229. :ref:`EditorFileSystem<class_EditorFileSystem>` **get_resource_filesystem** **(** **)**
  230. Returns the editor's :ref:`EditorFileSystem<class_EditorFileSystem>` instance.
  231. .. rst-class:: classref-item-separator
  232. ----
  233. .. _class_EditorInterface_method_get_resource_previewer:
  234. .. rst-class:: classref-method
  235. :ref:`EditorResourcePreview<class_EditorResourcePreview>` **get_resource_previewer** **(** **)**
  236. Returns the editor's :ref:`EditorResourcePreview<class_EditorResourcePreview>` instance.
  237. .. rst-class:: classref-item-separator
  238. ----
  239. .. _class_EditorInterface_method_get_script_editor:
  240. .. rst-class:: classref-method
  241. :ref:`ScriptEditor<class_ScriptEditor>` **get_script_editor** **(** **)**
  242. Returns the editor's :ref:`ScriptEditor<class_ScriptEditor>` instance.
  243. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  244. .. rst-class:: classref-item-separator
  245. ----
  246. .. _class_EditorInterface_method_get_selected_paths:
  247. .. rst-class:: classref-method
  248. :ref:`PackedStringArray<class_PackedStringArray>` **get_selected_paths** **(** **)** |const|
  249. Returns an array containing the paths of the currently selected files (and directories) in the :ref:`FileSystemDock<class_FileSystemDock>`.
  250. .. rst-class:: classref-item-separator
  251. ----
  252. .. _class_EditorInterface_method_get_selection:
  253. .. rst-class:: classref-method
  254. :ref:`EditorSelection<class_EditorSelection>` **get_selection** **(** **)**
  255. Returns the editor's :ref:`EditorSelection<class_EditorSelection>` instance.
  256. .. rst-class:: classref-item-separator
  257. ----
  258. .. _class_EditorInterface_method_inspect_object:
  259. .. rst-class:: classref-method
  260. void **inspect_object** **(** :ref:`Object<class_Object>` object, :ref:`String<class_String>` for_property="", :ref:`bool<class_bool>` inspector_only=false **)**
  261. 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``.
  262. .. rst-class:: classref-item-separator
  263. ----
  264. .. _class_EditorInterface_method_is_movie_maker_enabled:
  265. .. rst-class:: classref-method
  266. :ref:`bool<class_bool>` **is_movie_maker_enabled** **(** **)** |const|
  267. Returns ``true`` if Movie Maker mode is enabled in the editor. See also :ref:`set_movie_maker_enabled<class_EditorInterface_method_set_movie_maker_enabled>`. See :ref:`MovieWriter<class_MovieWriter>` for more information.
  268. .. rst-class:: classref-item-separator
  269. ----
  270. .. _class_EditorInterface_method_is_playing_scene:
  271. .. rst-class:: classref-method
  272. :ref:`bool<class_bool>` **is_playing_scene** **(** **)** |const|
  273. Returns ``true`` if a scene is currently being played, ``false`` otherwise. Paused scenes are considered as being played.
  274. .. rst-class:: classref-item-separator
  275. ----
  276. .. _class_EditorInterface_method_is_plugin_enabled:
  277. .. rst-class:: classref-method
  278. :ref:`bool<class_bool>` **is_plugin_enabled** **(** :ref:`String<class_String>` plugin **)** |const|
  279. Returns ``true`` if the specified ``plugin`` is enabled. The plugin name is the same as its directory name.
  280. .. rst-class:: classref-item-separator
  281. ----
  282. .. _class_EditorInterface_method_make_mesh_previews:
  283. .. rst-class:: classref-method
  284. :ref:`Texture2D[]<class_Texture2D>` **make_mesh_previews** **(** :ref:`Mesh[]<class_Mesh>` meshes, :ref:`int<class_int>` preview_size **)**
  285. Returns mesh previews rendered at the given size as an :ref:`Array<class_Array>` of :ref:`Texture2D<class_Texture2D>`\ s.
  286. .. rst-class:: classref-item-separator
  287. ----
  288. .. _class_EditorInterface_method_open_scene_from_path:
  289. .. rst-class:: classref-method
  290. void **open_scene_from_path** **(** :ref:`String<class_String>` scene_filepath **)**
  291. Opens the scene at the given path.
  292. .. rst-class:: classref-item-separator
  293. ----
  294. .. _class_EditorInterface_method_play_current_scene:
  295. .. rst-class:: classref-method
  296. void **play_current_scene** **(** **)**
  297. Plays the currently active scene.
  298. .. rst-class:: classref-item-separator
  299. ----
  300. .. _class_EditorInterface_method_play_custom_scene:
  301. .. rst-class:: classref-method
  302. void **play_custom_scene** **(** :ref:`String<class_String>` scene_filepath **)**
  303. Plays the scene specified by its filepath.
  304. .. rst-class:: classref-item-separator
  305. ----
  306. .. _class_EditorInterface_method_play_main_scene:
  307. .. rst-class:: classref-method
  308. void **play_main_scene** **(** **)**
  309. Plays the main scene.
  310. .. rst-class:: classref-item-separator
  311. ----
  312. .. _class_EditorInterface_method_reload_scene_from_path:
  313. .. rst-class:: classref-method
  314. void **reload_scene_from_path** **(** :ref:`String<class_String>` scene_filepath **)**
  315. Reloads the scene at the given path.
  316. .. rst-class:: classref-item-separator
  317. ----
  318. .. _class_EditorInterface_method_restart_editor:
  319. .. rst-class:: classref-method
  320. void **restart_editor** **(** :ref:`bool<class_bool>` save=true **)**
  321. Restarts the editor. This closes the editor and then opens the same project. If ``save`` is ``true``, the project will be saved before restarting.
  322. .. rst-class:: classref-item-separator
  323. ----
  324. .. _class_EditorInterface_method_save_scene:
  325. .. rst-class:: classref-method
  326. :ref:`Error<enum_@GlobalScope_Error>` **save_scene** **(** **)**
  327. Saves the scene. Returns either :ref:`@GlobalScope.OK<class_@GlobalScope_constant_OK>` or :ref:`@GlobalScope.ERR_CANT_CREATE<class_@GlobalScope_constant_ERR_CANT_CREATE>`.
  328. .. rst-class:: classref-item-separator
  329. ----
  330. .. _class_EditorInterface_method_save_scene_as:
  331. .. rst-class:: classref-method
  332. void **save_scene_as** **(** :ref:`String<class_String>` path, :ref:`bool<class_bool>` with_preview=true **)**
  333. Saves the scene as a file at ``path``.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_EditorInterface_method_select_file:
  337. .. rst-class:: classref-method
  338. void **select_file** **(** :ref:`String<class_String>` file **)**
  339. Selects the file, with the path provided by ``file``, in the FileSystem dock.
  340. .. rst-class:: classref-item-separator
  341. ----
  342. .. _class_EditorInterface_method_set_main_screen_editor:
  343. .. rst-class:: classref-method
  344. void **set_main_screen_editor** **(** :ref:`String<class_String>` name **)**
  345. Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the text of the tab in question exactly (``2D``, ``3D``, ``Script``, ``AssetLib``).
  346. .. rst-class:: classref-item-separator
  347. ----
  348. .. _class_EditorInterface_method_set_movie_maker_enabled:
  349. .. rst-class:: classref-method
  350. void **set_movie_maker_enabled** **(** :ref:`bool<class_bool>` enabled **)**
  351. Sets whether Movie Maker mode is enabled in the editor. See also :ref:`is_movie_maker_enabled<class_EditorInterface_method_is_movie_maker_enabled>`. See :ref:`MovieWriter<class_MovieWriter>` for more information.
  352. .. rst-class:: classref-item-separator
  353. ----
  354. .. _class_EditorInterface_method_set_plugin_enabled:
  355. .. rst-class:: classref-method
  356. void **set_plugin_enabled** **(** :ref:`String<class_String>` plugin, :ref:`bool<class_bool>` enabled **)**
  357. Sets the enabled status of a plugin. The plugin name is the same as its directory name.
  358. .. rst-class:: classref-item-separator
  359. ----
  360. .. _class_EditorInterface_method_stop_playing_scene:
  361. .. rst-class:: classref-method
  362. void **stop_playing_scene** **(** **)**
  363. Stops the scene that is currently playing.
  364. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  365. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  366. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  367. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  368. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  369. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`