EditorInterface.xml 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208
  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. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="edit_resource">
  13. <return type="void">
  14. </return>
  15. <argument index="0" name="resource" type="Resource">
  16. </argument>
  17. <description>
  18. Edits the given [Resource].
  19. </description>
  20. </method>
  21. <method name="get_base_control">
  22. <return type="Control">
  23. </return>
  24. <description>
  25. 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.
  26. </description>
  27. </method>
  28. <method name="get_current_path" qualifiers="const">
  29. <return type="String">
  30. </return>
  31. <description>
  32. </description>
  33. </method>
  34. <method name="get_edited_scene_root">
  35. <return type="Node">
  36. </return>
  37. <description>
  38. Returns the edited (current) scene's root [Node].
  39. </description>
  40. </method>
  41. <method name="get_editor_settings">
  42. <return type="EditorSettings">
  43. </return>
  44. <description>
  45. Returns the [EditorSettings].
  46. </description>
  47. </method>
  48. <method name="get_editor_viewport">
  49. <return type="Control">
  50. </return>
  51. <description>
  52. Returns the editor [Viewport].
  53. </description>
  54. </method>
  55. <method name="get_inspector" qualifiers="const">
  56. <return type="EditorInspector">
  57. </return>
  58. <description>
  59. </description>
  60. </method>
  61. <method name="get_open_scenes" qualifiers="const">
  62. <return type="Array">
  63. </return>
  64. <description>
  65. Returns an [Array] with the file paths of the currently opened scenes.
  66. </description>
  67. </method>
  68. <method name="get_resource_filesystem">
  69. <return type="EditorFileSystem">
  70. </return>
  71. <description>
  72. Returns the [EditorFileSystem].
  73. </description>
  74. </method>
  75. <method name="get_resource_previewer">
  76. <return type="EditorResourcePreview">
  77. </return>
  78. <description>
  79. Returns the [EditorResourcePreview].
  80. </description>
  81. </method>
  82. <method name="get_script_editor">
  83. <return type="ScriptEditor">
  84. </return>
  85. <description>
  86. Returns the [ScriptEditor].
  87. </description>
  88. </method>
  89. <method name="get_selected_path" qualifiers="const">
  90. <return type="String">
  91. </return>
  92. <description>
  93. </description>
  94. </method>
  95. <method name="get_selection">
  96. <return type="EditorSelection">
  97. </return>
  98. <description>
  99. Returns the [EditorSelection].
  100. </description>
  101. </method>
  102. <method name="inspect_object">
  103. <return type="void">
  104. </return>
  105. <argument index="0" name="object" type="Object">
  106. </argument>
  107. <argument index="1" name="for_property" type="String" default="&quot;&quot;">
  108. </argument>
  109. <description>
  110. Shows the given property on the given [code]object[/code] in the Editor's Inspector dock.
  111. </description>
  112. </method>
  113. <method name="is_plugin_enabled" qualifiers="const">
  114. <return type="bool">
  115. </return>
  116. <argument index="0" name="plugin" type="String">
  117. </argument>
  118. <description>
  119. Returns the enabled status of a plugin. The plugin name is the same as its directory name.
  120. </description>
  121. </method>
  122. <method name="make_mesh_previews">
  123. <return type="Array">
  124. </return>
  125. <argument index="0" name="meshes" type="Array">
  126. </argument>
  127. <argument index="1" name="preview_size" type="int">
  128. </argument>
  129. <description>
  130. Returns mesh previews rendered at the given size as an [Array] of [Texture]s.
  131. </description>
  132. </method>
  133. <method name="open_scene_from_path">
  134. <return type="void">
  135. </return>
  136. <argument index="0" name="scene_filepath" type="String">
  137. </argument>
  138. <description>
  139. Opens the scene at the given path.
  140. </description>
  141. </method>
  142. <method name="reload_scene_from_path">
  143. <return type="void">
  144. </return>
  145. <argument index="0" name="scene_filepath" type="String">
  146. </argument>
  147. <description>
  148. Reloads the scene at the given path.
  149. </description>
  150. </method>
  151. <method name="save_scene">
  152. <return type="int" enum="Error">
  153. </return>
  154. <description>
  155. Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants).
  156. </description>
  157. </method>
  158. <method name="save_scene_as">
  159. <return type="void">
  160. </return>
  161. <argument index="0" name="path" type="String">
  162. </argument>
  163. <argument index="1" name="with_preview" type="bool" default="true">
  164. </argument>
  165. <description>
  166. Saves the scene as a file at [code]path[/code].
  167. </description>
  168. </method>
  169. <method name="select_file">
  170. <return type="void">
  171. </return>
  172. <argument index="0" name="file" type="String">
  173. </argument>
  174. <description>
  175. Selects the file, with the path provided by [code]file[/code], in the FileSystem dock.
  176. </description>
  177. </method>
  178. <method name="set_distraction_free_mode">
  179. <return type="void">
  180. </return>
  181. <argument index="0" name="enter" type="bool">
  182. </argument>
  183. <description>
  184. </description>
  185. </method>
  186. <method name="set_main_screen_editor">
  187. <return type="void">
  188. </return>
  189. <argument index="0" name="name" type="String">
  190. </argument>
  191. <description>
  192. </description>
  193. </method>
  194. <method name="set_plugin_enabled">
  195. <return type="void">
  196. </return>
  197. <argument index="0" name="plugin" type="String">
  198. </argument>
  199. <argument index="1" name="enabled" type="bool">
  200. </argument>
  201. <description>
  202. Sets the enabled status of a plugin. The plugin name is the same as its directory name.
  203. </description>
  204. </method>
  205. </methods>
  206. <constants>
  207. </constants>
  208. </class>