class_editorinterface.rst 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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:`EditorSelection<class_editorselection>` | :ref:`get_selection<class_EditorInterface_get_selection>` **(** **)** |
  34. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`inspect_object<class_EditorInterface_inspect_object>` **(** :ref:`Object<class_object>` object, :ref:`String<class_string>` for_property="" **)** |
  36. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`Array<class_array>` | :ref:`make_mesh_previews<class_EditorInterface_make_mesh_previews>` **(** :ref:`Array<class_array>` meshes, :ref:`int<class_int>` preview_size **)** |
  38. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | void | :ref:`open_scene_from_path<class_EditorInterface_open_scene_from_path>` **(** :ref:`String<class_string>` scene_filepath **)** |
  40. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | void | :ref:`reload_scene_from_path<class_EditorInterface_reload_scene_from_path>` **(** :ref:`String<class_string>` scene_filepath **)** |
  42. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`int<class_int>` | :ref:`save_scene<class_EditorInterface_save_scene>` **(** **)** |
  44. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | void | :ref:`save_scene_as<class_EditorInterface_save_scene_as>` **(** :ref:`String<class_string>` path, :ref:`bool<class_bool>` with_preview=true **)** |
  46. +------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. Description
  48. -----------
  49. 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>`.
  50. Member Function Description
  51. ---------------------------
  52. .. _class_EditorInterface_edit_resource:
  53. - void **edit_resource** **(** :ref:`Resource<class_resource>` resource **)**
  54. Edits the given :ref:`Resource<class_resource>`.
  55. .. _class_EditorInterface_get_base_control:
  56. - :ref:`Control<class_control>` **get_base_control** **(** **)**
  57. Returns the base :ref:`Control<class_control>`.
  58. .. _class_EditorInterface_get_edited_scene_root:
  59. - :ref:`Node<class_node>` **get_edited_scene_root** **(** **)**
  60. Returns the edited scene's root :ref:`Node<class_node>`.
  61. .. _class_EditorInterface_get_editor_settings:
  62. - :ref:`EditorSettings<class_editorsettings>` **get_editor_settings** **(** **)**
  63. Returns the :ref:`EditorSettings<class_editorsettings>`.
  64. .. _class_EditorInterface_get_editor_viewport:
  65. - :ref:`Control<class_control>` **get_editor_viewport** **(** **)**
  66. Returns the editor :ref:`Viewport<class_viewport>`.
  67. .. _class_EditorInterface_get_open_scenes:
  68. - :ref:`Array<class_array>` **get_open_scenes** **(** **)** const
  69. Returns an :ref:`Array<class_array>` of the currently opened scenes.
  70. .. _class_EditorInterface_get_resource_filesystem:
  71. - :ref:`EditorFileSystem<class_editorfilesystem>` **get_resource_filesystem** **(** **)**
  72. Returns the :ref:`EditorFileSystem<class_editorfilesystem>`.
  73. .. _class_EditorInterface_get_resource_previewer:
  74. - :ref:`EditorResourcePreview<class_editorresourcepreview>` **get_resource_previewer** **(** **)**
  75. Returns the :ref:`EditorResourcePreview<class_editorresourcepreview>`\ er.
  76. .. _class_EditorInterface_get_script_editor:
  77. - :ref:`ScriptEditor<class_scripteditor>` **get_script_editor** **(** **)**
  78. Returns the :ref:`ScriptEditor<class_scripteditor>`.
  79. .. _class_EditorInterface_get_selection:
  80. - :ref:`EditorSelection<class_editorselection>` **get_selection** **(** **)**
  81. Returns the :ref:`EditorSelection<class_editorselection>`.
  82. .. _class_EditorInterface_inspect_object:
  83. - void **inspect_object** **(** :ref:`Object<class_object>` object, :ref:`String<class_string>` for_property="" **)**
  84. Shows the given property on the given ``object`` in the Editor's Inspector dock.
  85. .. _class_EditorInterface_make_mesh_previews:
  86. - :ref:`Array<class_array>` **make_mesh_previews** **(** :ref:`Array<class_array>` meshes, :ref:`int<class_int>` preview_size **)**
  87. Returns mesh previews rendered at the given size as an :ref:`Array<class_array>` of :ref:`Texture<class_texture>`\ s.
  88. .. _class_EditorInterface_open_scene_from_path:
  89. - void **open_scene_from_path** **(** :ref:`String<class_string>` scene_filepath **)**
  90. Opens the scene at the given path.
  91. .. _class_EditorInterface_reload_scene_from_path:
  92. - void **reload_scene_from_path** **(** :ref:`String<class_string>` scene_filepath **)**
  93. Reloads the scene at the given path.
  94. .. _class_EditorInterface_save_scene:
  95. - :ref:`int<class_int>` **save_scene** **(** **)**
  96. Saves the scene. Returns either OK or ERR_CANT_CREATE. See :ref:`@GlobalScope<class_@globalscope>` constants.
  97. .. _class_EditorInterface_save_scene_as:
  98. - void **save_scene_as** **(** :ref:`String<class_string>` path, :ref:`bool<class_bool>` with_preview=true **)**
  99. Saves the scene as a file at ``path``.