class_editorinterface.rst 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the EditorInterface.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_EditorInterface:
  5. EditorInterface
  6. ===============
  7. **Inherits:** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Editor interface and main components.
  12. Member Functions
  13. ----------------
  14. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`edit_resource<class_EditorInterface_edit_resource>` **(** :ref:`Resource<class_resource>` resource **)** |
  16. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`Control<class_control>` | :ref:`get_base_control<class_EditorInterface_get_base_control>` **(** **)** |
  18. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`Node<class_node>` | :ref:`get_edited_scene_root<class_EditorInterface_get_edited_scene_root>` **(** **)** |
  20. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`EditorSettings<class_editorsettings>` | :ref:`get_editor_settings<class_EditorInterface_get_editor_settings>` **(** **)** |
  22. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`Control<class_control>` | :ref:`get_editor_viewport<class_EditorInterface_get_editor_viewport>` **(** **)** |
  24. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`Array<class_array>` | :ref:`get_open_scenes<class_EditorInterface_get_open_scenes>` **(** **)** const |
  26. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`EditorFileSystem<class_editorfilesystem>` | :ref:`get_resource_filesystem<class_EditorInterface_get_resource_filesystem>` **(** **)** |
  28. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`EditorResourcePreview<class_editorresourcepreview>` | :ref:`get_resource_previewer<class_EditorInterface_get_resource_previewer>` **(** **)** |
  30. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`ScriptEditor<class_scripteditor>` | :ref:`get_script_editor<class_EditorInterface_get_script_editor>` **(** **)** |
  32. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`String<class_string>` | :ref:`get_selected_path<class_EditorInterface_get_selected_path>` **(** **)** const |
  34. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`EditorSelection<class_editorselection>` | :ref:`get_selection<class_EditorInterface_get_selection>` **(** **)** |
  36. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`inspect_object<class_EditorInterface_inspect_object>` **(** :ref:`Object<class_object>` object, :ref:`String<class_string>` for_property="" **)** |
  38. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`bool<class_bool>` | :ref:`is_plugin_enabled<class_EditorInterface_is_plugin_enabled>` **(** :ref:`String<class_string>` plugin **)** const |
  40. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`Array<class_array>` | :ref:`make_mesh_previews<class_EditorInterface_make_mesh_previews>` **(** :ref:`Array<class_array>` meshes, :ref:`int<class_int>` preview_size **)** |
  42. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | void | :ref:`open_scene_from_path<class_EditorInterface_open_scene_from_path>` **(** :ref:`String<class_string>` scene_filepath **)** |
  44. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`reload_scene_from_path<class_EditorInterface_reload_scene_from_path>` **(** :ref:`String<class_string>` scene_filepath **)** |
  46. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`int<class_int>` | :ref:`save_scene<class_EditorInterface_save_scene>` **(** **)** |
  48. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | void | :ref:`save_scene_as<class_EditorInterface_save_scene_as>` **(** :ref:`String<class_string>` path, :ref:`bool<class_bool>` with_preview=true **)** |
  50. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | void | :ref:`select_file<class_EditorInterface_select_file>` **(** :ref:`String<class_string>` p_file **)** |
  52. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | void | :ref:`set_plugin_enabled<class_EditorInterface_set_plugin_enabled>` **(** :ref:`String<class_string>` plugin, :ref:`bool<class_bool>` enabled **)** |
  54. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. Description
  56. -----------
  57. Editor interface. Allows 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>`\ er, :ref:`ScriptEditor<class_scripteditor>`, the editor viewport, as well as information about scenes. Also see :ref:`EditorPlugin<class_editorplugin>` and :ref:`EditorScript<class_editorscript>`.
  58. Member Function Description
  59. ---------------------------
  60. .. _class_EditorInterface_edit_resource:
  61. - void **edit_resource** **(** :ref:`Resource<class_resource>` resource **)**
  62. Edits the given :ref:`Resource<class_resource>`.
  63. .. _class_EditorInterface_get_base_control:
  64. - :ref:`Control<class_control>` **get_base_control** **(** **)**
  65. Returns the base :ref:`Control<class_control>`.
  66. .. _class_EditorInterface_get_edited_scene_root:
  67. - :ref:`Node<class_node>` **get_edited_scene_root** **(** **)**
  68. Returns the edited scene's root :ref:`Node<class_node>`.
  69. .. _class_EditorInterface_get_editor_settings:
  70. - :ref:`EditorSettings<class_editorsettings>` **get_editor_settings** **(** **)**
  71. Returns the :ref:`EditorSettings<class_editorsettings>`.
  72. .. _class_EditorInterface_get_editor_viewport:
  73. - :ref:`Control<class_control>` **get_editor_viewport** **(** **)**
  74. Returns the editor :ref:`Viewport<class_viewport>`.
  75. .. _class_EditorInterface_get_open_scenes:
  76. - :ref:`Array<class_array>` **get_open_scenes** **(** **)** const
  77. Returns an :ref:`Array<class_array>` of the currently opened scenes.
  78. .. _class_EditorInterface_get_resource_filesystem:
  79. - :ref:`EditorFileSystem<class_editorfilesystem>` **get_resource_filesystem** **(** **)**
  80. Returns the :ref:`EditorFileSystem<class_editorfilesystem>`.
  81. .. _class_EditorInterface_get_resource_previewer:
  82. - :ref:`EditorResourcePreview<class_editorresourcepreview>` **get_resource_previewer** **(** **)**
  83. Returns the :ref:`EditorResourcePreview<class_editorresourcepreview>`\ er.
  84. .. _class_EditorInterface_get_script_editor:
  85. - :ref:`ScriptEditor<class_scripteditor>` **get_script_editor** **(** **)**
  86. Returns the :ref:`ScriptEditor<class_scripteditor>`.
  87. .. _class_EditorInterface_get_selected_path:
  88. - :ref:`String<class_string>` **get_selected_path** **(** **)** const
  89. .. _class_EditorInterface_get_selection:
  90. - :ref:`EditorSelection<class_editorselection>` **get_selection** **(** **)**
  91. Returns the :ref:`EditorSelection<class_editorselection>`.
  92. .. _class_EditorInterface_inspect_object:
  93. - void **inspect_object** **(** :ref:`Object<class_object>` object, :ref:`String<class_string>` for_property="" **)**
  94. Shows the given property on the given ``object`` in the Editor's Inspector dock.
  95. .. _class_EditorInterface_is_plugin_enabled:
  96. - :ref:`bool<class_bool>` **is_plugin_enabled** **(** :ref:`String<class_string>` plugin **)** const
  97. Returns the enabled status of a plugin. The plugin name is the same as its directory name.
  98. .. _class_EditorInterface_make_mesh_previews:
  99. - :ref:`Array<class_array>` **make_mesh_previews** **(** :ref:`Array<class_array>` meshes, :ref:`int<class_int>` preview_size **)**
  100. Returns mesh previews rendered at the given size as an :ref:`Array<class_array>` of :ref:`Texture<class_texture>`\ s.
  101. .. _class_EditorInterface_open_scene_from_path:
  102. - void **open_scene_from_path** **(** :ref:`String<class_string>` scene_filepath **)**
  103. Opens the scene at the given path.
  104. .. _class_EditorInterface_reload_scene_from_path:
  105. - void **reload_scene_from_path** **(** :ref:`String<class_string>` scene_filepath **)**
  106. Reloads the scene at the given path.
  107. .. _class_EditorInterface_save_scene:
  108. - :ref:`int<class_int>` **save_scene** **(** **)**
  109. Saves the scene. Returns either OK or ERR_CANT_CREATE. See :ref:`@GlobalScope<class_@globalscope>` constants.
  110. .. _class_EditorInterface_save_scene_as:
  111. - void **save_scene_as** **(** :ref:`String<class_string>` path, :ref:`bool<class_bool>` with_preview=true **)**
  112. Saves the scene as a file at ``path``.
  113. .. _class_EditorInterface_select_file:
  114. - void **select_file** **(** :ref:`String<class_string>` p_file **)**
  115. .. _class_EditorInterface_set_plugin_enabled:
  116. - void **set_plugin_enabled** **(** :ref:`String<class_string>` plugin, :ref:`bool<class_bool>` enabled **)**
  117. Sets the enabled status of a plugin. The plugin name is the same as its directory name.