EditorInterface.xml 5.1 KB

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