EditorInterface.xml 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="EditorInterface" inherits="Node" version="3.2">
  3. <brief_description>
  4. Godot editor's interface.
  5. </brief_description>
  6. <description>
  7. EditorInterface gives you control over Godot editor's window. It allows customizing the window, saving and (re-)loading scenes, rendering mesh previews, inspecting and editing resources and objects, and provides access to [EditorSettings], [EditorFileSystem], [EditorResourcePreview], [ScriptEditor], the editor viewport, and information about scenes.
  8. [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorPlugin.get_editor_interface].
  9. </description>
  10. <tutorials>
  11. </tutorials>
  12. <methods>
  13. <method name="edit_resource">
  14. <return type="void">
  15. </return>
  16. <argument index="0" name="resource" type="Resource">
  17. </argument>
  18. <description>
  19. Edits the given [Resource].
  20. </description>
  21. </method>
  22. <method name="get_base_control">
  23. <return type="Control">
  24. </return>
  25. <description>
  26. Returns the main container of Godot editor's window. You can use it, for example, to retrieve the size of the container and place your controls accordingly.
  27. </description>
  28. </method>
  29. <method name="get_current_path" qualifiers="const">
  30. <return type="String">
  31. </return>
  32. <description>
  33. </description>
  34. </method>
  35. <method name="get_edited_scene_root">
  36. <return type="Node">
  37. </return>
  38. <description>
  39. Returns the edited (current) scene's root [Node].
  40. </description>
  41. </method>
  42. <method name="get_editor_settings">
  43. <return type="EditorSettings">
  44. </return>
  45. <description>
  46. Returns the [EditorSettings].
  47. </description>
  48. </method>
  49. <method name="get_editor_viewport">
  50. <return type="Control">
  51. </return>
  52. <description>
  53. Returns the editor [Viewport].
  54. </description>
  55. </method>
  56. <method name="get_file_system_dock">
  57. <return type="FileSystemDock">
  58. </return>
  59. <description>
  60. </description>
  61. </method>
  62. <method name="get_inspector" qualifiers="const">
  63. <return type="EditorInspector">
  64. </return>
  65. <description>
  66. </description>
  67. </method>
  68. <method name="get_open_scenes" qualifiers="const">
  69. <return type="Array">
  70. </return>
  71. <description>
  72. Returns an [Array] with the file paths of the currently opened scenes.
  73. </description>
  74. </method>
  75. <method name="get_resource_filesystem">
  76. <return type="EditorFileSystem">
  77. </return>
  78. <description>
  79. Returns the [EditorFileSystem].
  80. </description>
  81. </method>
  82. <method name="get_resource_previewer">
  83. <return type="EditorResourcePreview">
  84. </return>
  85. <description>
  86. Returns the [EditorResourcePreview].
  87. </description>
  88. </method>
  89. <method name="get_script_editor">
  90. <return type="ScriptEditor">
  91. </return>
  92. <description>
  93. Returns the [ScriptEditor].
  94. </description>
  95. </method>
  96. <method name="get_selected_path" qualifiers="const">
  97. <return type="String">
  98. </return>
  99. <description>
  100. </description>
  101. </method>
  102. <method name="get_selection">
  103. <return type="EditorSelection">
  104. </return>
  105. <description>
  106. Returns the [EditorSelection].
  107. </description>
  108. </method>
  109. <method name="inspect_object">
  110. <return type="void">
  111. </return>
  112. <argument index="0" name="object" type="Object">
  113. </argument>
  114. <argument index="1" name="for_property" type="String" default="&quot;&quot;">
  115. </argument>
  116. <description>
  117. Shows the given property on the given [code]object[/code] in the Editor's Inspector dock.
  118. </description>
  119. </method>
  120. <method name="is_plugin_enabled" qualifiers="const">
  121. <return type="bool">
  122. </return>
  123. <argument index="0" name="plugin" type="String">
  124. </argument>
  125. <description>
  126. Returns the enabled status of a plugin. The plugin name is the same as its directory name.
  127. </description>
  128. </method>
  129. <method name="make_mesh_previews">
  130. <return type="Array">
  131. </return>
  132. <argument index="0" name="meshes" type="Array">
  133. </argument>
  134. <argument index="1" name="preview_size" type="int">
  135. </argument>
  136. <description>
  137. Returns mesh previews rendered at the given size as an [Array] of [Texture]s.
  138. </description>
  139. </method>
  140. <method name="open_scene_from_path">
  141. <return type="void">
  142. </return>
  143. <argument index="0" name="scene_filepath" type="String">
  144. </argument>
  145. <description>
  146. Opens the scene at the given path.
  147. </description>
  148. </method>
  149. <method name="reload_scene_from_path">
  150. <return type="void">
  151. </return>
  152. <argument index="0" name="scene_filepath" type="String">
  153. </argument>
  154. <description>
  155. Reloads the scene at the given path.
  156. </description>
  157. </method>
  158. <method name="save_scene">
  159. <return type="int" enum="Error">
  160. </return>
  161. <description>
  162. Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants).
  163. </description>
  164. </method>
  165. <method name="save_scene_as">
  166. <return type="void">
  167. </return>
  168. <argument index="0" name="path" type="String">
  169. </argument>
  170. <argument index="1" name="with_preview" type="bool" default="true">
  171. </argument>
  172. <description>
  173. Saves the scene as a file at [code]path[/code].
  174. </description>
  175. </method>
  176. <method name="select_file">
  177. <return type="void">
  178. </return>
  179. <argument index="0" name="file" type="String">
  180. </argument>
  181. <description>
  182. Selects the file, with the path provided by [code]file[/code], in the FileSystem dock.
  183. </description>
  184. </method>
  185. <method name="set_main_screen_editor">
  186. <return type="void">
  187. </return>
  188. <argument index="0" name="name" type="String">
  189. </argument>
  190. <description>
  191. </description>
  192. </method>
  193. <method name="set_plugin_enabled">
  194. <return type="void">
  195. </return>
  196. <argument index="0" name="plugin" type="String">
  197. </argument>
  198. <argument index="1" name="enabled" type="bool">
  199. </argument>
  200. <description>
  201. Sets the enabled status of a plugin. The plugin name is the same as its directory name.
  202. </description>
  203. </method>
  204. </methods>
  205. <members>
  206. <member name="distraction_free_mode" type="bool" setter="set_distraction_free_mode" getter="is_distraction_free_mode_enabled">
  207. </member>
  208. </members>
  209. <constants>
  210. </constants>
  211. </class>