class_editorplugin.rst 90 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/4.1/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.1/doc/classes/EditorPlugin.xml.
  6. .. _class_EditorPlugin:
  7. EditorPlugin
  8. ============
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. Used by the editor to extend its functionality.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. Plugins are used by the editor to extend functionality. The most common types of plugins are those which edit a given node or resource type, import plugins and export plugins. See also :ref:`EditorScript<class_EditorScript>` to add functions to the editor.
  15. \ **Note:** Some names in this class contain "left" or "right" (e.g. :ref:`DOCK_SLOT_LEFT_UL<class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL>`). These APIs assume left-to-right layout, and would be backwards when using right-to-left layout. These names are kept for compatibility reasons.
  16. .. rst-class:: classref-introduction-group
  17. Tutorials
  18. ---------
  19. - :doc:`Editor plugins documentation index <../tutorials/plugins/editor/index>`
  20. .. rst-class:: classref-reftable-group
  21. Methods
  22. -------
  23. .. table::
  24. :widths: auto
  25. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | void | :ref:`_apply_changes<class_EditorPlugin_method__apply_changes>` **(** **)** |virtual| |
  27. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`_build<class_EditorPlugin_method__build>` **(** **)** |virtual| |
  29. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | void | :ref:`_clear<class_EditorPlugin_method__clear>` **(** **)** |virtual| |
  31. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | void | :ref:`_disable_plugin<class_EditorPlugin_method__disable_plugin>` **(** **)** |virtual| |
  33. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | void | :ref:`_edit<class_EditorPlugin_method__edit>` **(** :ref:`Object<class_Object>` object **)** |virtual| |
  35. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | void | :ref:`_enable_plugin<class_EditorPlugin_method__enable_plugin>` **(** **)** |virtual| |
  37. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | void | :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| |
  39. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | void | :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| |
  41. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`int<class_int>` | :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>` **(** :ref:`Camera3D<class_Camera3D>` viewport_camera, :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
  43. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | void | :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| |
  45. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | void | :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>` **(** :ref:`Control<class_Control>` viewport_control **)** |virtual| |
  47. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`bool<class_bool>` | :ref:`_forward_canvas_gui_input<class_EditorPlugin_method__forward_canvas_gui_input>` **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual| |
  49. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_breakpoints<class_EditorPlugin_method__get_breakpoints>` **(** **)** |virtual| |const| |
  51. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_plugin_icon<class_EditorPlugin_method__get_plugin_icon>` **(** **)** |virtual| |const| |
  53. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`String<class_String>` | :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` **(** **)** |virtual| |const| |
  55. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_state<class_EditorPlugin_method__get_state>` **(** **)** |virtual| |const| |
  57. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | void | :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>` **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| |
  59. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorPlugin_method__handles>` **(** :ref:`Object<class_Object>` object **)** |virtual| |const| |
  61. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`_has_main_screen<class_EditorPlugin_method__has_main_screen>` **(** **)** |virtual| |const| |
  63. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`_make_visible<class_EditorPlugin_method__make_visible>` **(** :ref:`bool<class_bool>` visible **)** |virtual| |
  65. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`_save_external_data<class_EditorPlugin_method__save_external_data>` **(** **)** |virtual| |
  67. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`_set_state<class_EditorPlugin_method__set_state>` **(** :ref:`Dictionary<class_Dictionary>` state **)** |virtual| |
  69. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`_set_window_layout<class_EditorPlugin_method__set_window_layout>` **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual| |
  71. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`add_autoload_singleton<class_EditorPlugin_method_add_autoload_singleton>` **(** :ref:`String<class_String>` name, :ref:`String<class_String>` path **)** |
  73. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | :ref:`Button<class_Button>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_method_add_control_to_bottom_panel>` **(** :ref:`Control<class_Control>` control, :ref:`String<class_String>` title **)** |
  75. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`add_control_to_container<class_EditorPlugin_method_add_control_to_container>` **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** |
  77. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`add_control_to_dock<class_EditorPlugin_method_add_control_to_dock>` **(** :ref:`DockSlot<enum_EditorPlugin_DockSlot>` slot, :ref:`Control<class_Control>` control **)** |
  79. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>` **(** :ref:`String<class_String>` type, :ref:`String<class_String>` base, :ref:`Script<class_Script>` script, :ref:`Texture2D<class_Texture2D>` icon **)** |
  81. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`add_debugger_plugin<class_EditorPlugin_method_add_debugger_plugin>` **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** |
  83. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>` **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** |
  85. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>` **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer, :ref:`bool<class_bool>` first_priority=false **)** |
  87. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** |
  89. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>` **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** |
  91. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>` **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** |
  93. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | void | :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>` **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer, :ref:`bool<class_bool>` first_priority=false **)** |
  95. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>` **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin, :ref:`bool<class_bool>` first_priority=false **)** |
  97. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`add_tool_menu_item<class_EditorPlugin_method_add_tool_menu_item>` **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` callable **)** |
  99. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`add_tool_submenu_item<class_EditorPlugin_method_add_tool_submenu_item>` **(** :ref:`String<class_String>` name, :ref:`PopupMenu<class_PopupMenu>` submenu **)** |
  101. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>` **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** |
  103. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>` **(** :ref:`Callable<class_Callable>` callable **)** |
  105. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorPlugin_method_get_editor_interface>` **(** **)** |
  107. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_export_as_menu<class_EditorPlugin_method_get_export_as_menu>` **(** **)** |
  109. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` | :ref:`get_script_create_dialog<class_EditorPlugin_method_get_script_create_dialog>` **(** **)** |
  111. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_undo_redo<class_EditorPlugin_method_get_undo_redo>` **(** **)** |
  113. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | void | :ref:`hide_bottom_panel<class_EditorPlugin_method_hide_bottom_panel>` **(** **)** |
  115. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | void | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_method_make_bottom_panel_item_visible>` **(** :ref:`Control<class_Control>` item **)** |
  117. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  118. | void | :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>` **(** **)** |
  119. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  120. | void | :ref:`remove_autoload_singleton<class_EditorPlugin_method_remove_autoload_singleton>` **(** :ref:`String<class_String>` name **)** |
  121. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  122. | void | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` **(** :ref:`Control<class_Control>` control **)** |
  123. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  124. | void | :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>` **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)** |
  125. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  126. | void | :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` **(** :ref:`Control<class_Control>` control **)** |
  127. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  128. | void | :ref:`remove_custom_type<class_EditorPlugin_method_remove_custom_type>` **(** :ref:`String<class_String>` type **)** |
  129. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  130. | void | :ref:`remove_debugger_plugin<class_EditorPlugin_method_remove_debugger_plugin>` **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)** |
  131. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  132. | void | :ref:`remove_export_plugin<class_EditorPlugin_method_remove_export_plugin>` **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)** |
  133. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  134. | void | :ref:`remove_import_plugin<class_EditorPlugin_method_remove_import_plugin>` **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer **)** |
  135. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  136. | void | :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>` **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)** |
  137. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  138. | void | :ref:`remove_node_3d_gizmo_plugin<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>` **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)** |
  139. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  140. | void | :ref:`remove_resource_conversion_plugin<class_EditorPlugin_method_remove_resource_conversion_plugin>` **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)** |
  141. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  142. | void | :ref:`remove_scene_format_importer_plugin<class_EditorPlugin_method_remove_scene_format_importer_plugin>` **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer **)** |
  143. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  144. | void | :ref:`remove_scene_post_import_plugin<class_EditorPlugin_method_remove_scene_post_import_plugin>` **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin **)** |
  145. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  146. | void | :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>` **(** :ref:`String<class_String>` name **)** |
  147. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  148. | void | :ref:`remove_translation_parser_plugin<class_EditorPlugin_method_remove_translation_parser_plugin>` **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)** |
  149. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  150. | void | :ref:`remove_undo_redo_inspector_hook_callback<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>` **(** :ref:`Callable<class_Callable>` callable **)** |
  151. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  152. | void | :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>` **(** **)** |
  153. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  154. | void | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>` **(** **)** |
  155. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  156. | :ref:`int<class_int>` | :ref:`update_overlays<class_EditorPlugin_method_update_overlays>` **(** **)** |const| |
  157. +-----------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  158. .. rst-class:: classref-section-separator
  159. ----
  160. .. rst-class:: classref-descriptions-group
  161. Signals
  162. -------
  163. .. _class_EditorPlugin_signal_main_screen_changed:
  164. .. rst-class:: classref-signal
  165. **main_screen_changed** **(** :ref:`String<class_String>` screen_name **)**
  166. Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins.
  167. .. rst-class:: classref-item-separator
  168. ----
  169. .. _class_EditorPlugin_signal_project_settings_changed:
  170. .. rst-class:: classref-signal
  171. **project_settings_changed** **(** **)**
  172. Emitted when any project setting has changed.
  173. .. rst-class:: classref-item-separator
  174. ----
  175. .. _class_EditorPlugin_signal_resource_saved:
  176. .. rst-class:: classref-signal
  177. **resource_saved** **(** :ref:`Resource<class_Resource>` resource **)**
  178. Emitted when the given ``resource`` was saved on disc.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_EditorPlugin_signal_scene_changed:
  182. .. rst-class:: classref-signal
  183. **scene_changed** **(** :ref:`Node<class_Node>` scene_root **)**
  184. Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be ``null``.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_EditorPlugin_signal_scene_closed:
  188. .. rst-class:: classref-signal
  189. **scene_closed** **(** :ref:`String<class_String>` filepath **)**
  190. Emitted when user closes a scene. The argument is file path to a closed scene.
  191. .. rst-class:: classref-section-separator
  192. ----
  193. .. rst-class:: classref-descriptions-group
  194. Enumerations
  195. ------------
  196. .. _enum_EditorPlugin_CustomControlContainer:
  197. .. rst-class:: classref-enumeration
  198. enum **CustomControlContainer**:
  199. .. _class_EditorPlugin_constant_CONTAINER_TOOLBAR:
  200. .. rst-class:: classref-enumeration-constant
  201. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_TOOLBAR** = ``0``
  202. Main editor toolbar, next to play buttons.
  203. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_MENU:
  204. .. rst-class:: classref-enumeration-constant
  205. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_MENU** = ``1``
  206. The toolbar that appears when 3D editor is active.
  207. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
  208. .. rst-class:: classref-enumeration-constant
  209. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = ``2``
  210. Left sidebar of the 3D editor.
  211. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT:
  212. .. rst-class:: classref-enumeration-constant
  213. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = ``3``
  214. Right sidebar of the 3D editor.
  215. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_BOTTOM:
  216. .. rst-class:: classref-enumeration-constant
  217. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_BOTTOM** = ``4``
  218. Bottom panel of the 3D editor.
  219. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_MENU:
  220. .. rst-class:: classref-enumeration-constant
  221. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_MENU** = ``5``
  222. The toolbar that appears when 2D editor is active.
  223. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
  224. .. rst-class:: classref-enumeration-constant
  225. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = ``6``
  226. Left sidebar of the 2D editor.
  227. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_RIGHT:
  228. .. rst-class:: classref-enumeration-constant
  229. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = ``7``
  230. Right sidebar of the 2D editor.
  231. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM:
  232. .. rst-class:: classref-enumeration-constant
  233. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_BOTTOM** = ``8``
  234. Bottom panel of the 2D editor.
  235. .. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM:
  236. .. rst-class:: classref-enumeration-constant
  237. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_INSPECTOR_BOTTOM** = ``9``
  238. Bottom section of the inspector.
  239. .. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT:
  240. .. rst-class:: classref-enumeration-constant
  241. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_LEFT** = ``10``
  242. Tab of Project Settings dialog, to the left of other tabs.
  243. .. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_RIGHT:
  244. .. rst-class:: classref-enumeration-constant
  245. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_RIGHT** = ``11``
  246. Tab of Project Settings dialog, to the right of other tabs.
  247. .. rst-class:: classref-item-separator
  248. ----
  249. .. _enum_EditorPlugin_DockSlot:
  250. .. rst-class:: classref-enumeration
  251. enum **DockSlot**:
  252. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL:
  253. .. rst-class:: classref-enumeration-constant
  254. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UL** = ``0``
  255. Dock slot, left side, upper-left (empty in default layout).
  256. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BL:
  257. .. rst-class:: classref-enumeration-constant
  258. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BL** = ``1``
  259. Dock slot, left side, bottom-left (empty in default layout).
  260. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UR:
  261. .. rst-class:: classref-enumeration-constant
  262. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UR** = ``2``
  263. Dock slot, left side, upper-right (in default layout includes Scene and Import docks).
  264. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BR:
  265. .. rst-class:: classref-enumeration-constant
  266. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BR** = ``3``
  267. Dock slot, left side, bottom-right (in default layout includes FileSystem dock).
  268. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UL:
  269. .. rst-class:: classref-enumeration-constant
  270. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UL** = ``4``
  271. Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks).
  272. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL:
  273. .. rst-class:: classref-enumeration-constant
  274. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BL** = ``5``
  275. Dock slot, right side, bottom-left (empty in default layout).
  276. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UR:
  277. .. rst-class:: classref-enumeration-constant
  278. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UR** = ``6``
  279. Dock slot, right side, upper-right (empty in default layout).
  280. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BR** = ``7``
  283. Dock slot, right side, bottom-right (empty in default layout).
  284. .. _class_EditorPlugin_constant_DOCK_SLOT_MAX:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_MAX** = ``8``
  287. Represents the size of the :ref:`DockSlot<enum_EditorPlugin_DockSlot>` enum.
  288. .. rst-class:: classref-item-separator
  289. ----
  290. .. _enum_EditorPlugin_AfterGUIInput:
  291. .. rst-class:: classref-enumeration
  292. enum **AfterGUIInput**:
  293. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS:
  294. .. rst-class:: classref-enumeration-constant
  295. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_PASS** = ``0``
  296. Forwards the :ref:`InputEvent<class_InputEvent>` to other EditorPlugins.
  297. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP:
  298. .. rst-class:: classref-enumeration-constant
  299. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_STOP** = ``1``
  300. Prevents the :ref:`InputEvent<class_InputEvent>` from reaching other Editor classes.
  301. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM:
  302. .. rst-class:: classref-enumeration-constant
  303. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_CUSTOM** = ``2``
  304. Pass the :ref:`InputEvent<class_InputEvent>` to other editor plugins except the main :ref:`Node3D<class_Node3D>` one. This can be used to prevent node selection changes and work with sub-gizmos instead.
  305. .. rst-class:: classref-section-separator
  306. ----
  307. .. rst-class:: classref-descriptions-group
  308. Method Descriptions
  309. -------------------
  310. .. _class_EditorPlugin_method__apply_changes:
  311. .. rst-class:: classref-method
  312. void **_apply_changes** **(** **)** |virtual|
  313. This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency.
  314. This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object.
  315. .. rst-class:: classref-item-separator
  316. ----
  317. .. _class_EditorPlugin_method__build:
  318. .. rst-class:: classref-method
  319. :ref:`bool<class_bool>` **_build** **(** **)** |virtual|
  320. This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
  321. This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build<class_EditorPlugin_method__build>` methods from running.
  322. .. rst-class:: classref-item-separator
  323. ----
  324. .. _class_EditorPlugin_method__clear:
  325. .. rst-class:: classref-method
  326. void **_clear** **(** **)** |virtual|
  327. Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene.
  328. .. rst-class:: classref-item-separator
  329. ----
  330. .. _class_EditorPlugin_method__disable_plugin:
  331. .. rst-class:: classref-method
  332. void **_disable_plugin** **(** **)** |virtual|
  333. Called by the engine when the user disables the **EditorPlugin** in the Plugin tab of the project settings window.
  334. .. rst-class:: classref-item-separator
  335. ----
  336. .. _class_EditorPlugin_method__edit:
  337. .. rst-class:: classref-method
  338. void **_edit** **(** :ref:`Object<class_Object>` object **)** |virtual|
  339. This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
  340. \ ``object`` can be ``null`` if the plugin was editing an object, but there is no longer any selected object handled by this plugin. It can be used to cleanup editing state.
  341. .. rst-class:: classref-item-separator
  342. ----
  343. .. _class_EditorPlugin_method__enable_plugin:
  344. .. rst-class:: classref-method
  345. void **_enable_plugin** **(** **)** |virtual|
  346. Called by the engine when the user enables the **EditorPlugin** in the Plugin tab of the project settings window.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_EditorPlugin_method__forward_3d_draw_over_viewport:
  350. .. rst-class:: classref-method
  351. void **_forward_3d_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual|
  352. Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control<class_Control>` for drawing. You can update the viewport manually by calling :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`.
  353. .. tabs::
  354. .. code-tab:: gdscript
  355. func _forward_3d_draw_over_viewport(overlay):
  356. # Draw a circle at cursor position.
  357. overlay.draw_circle(overlay.get_local_mouse_position(), 64)
  358. func _forward_3d_gui_input(camera, event):
  359. if event is InputEventMouseMotion:
  360. # Redraw viewport when cursor is moved.
  361. update_overlays()
  362. return EditorPlugin.AFTER_GUI_INPUT_STOP
  363. return EditorPlugin.AFTER_GUI_INPUT_PASS
  364. .. code-tab:: csharp
  365. public override void _Forward3DDrawOverViewport(Control viewportControl)
  366. {
  367. // Draw a circle at cursor position.
  368. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  369. }
  370. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event)
  371. {
  372. if (@event is InputEventMouseMotion)
  373. {
  374. // Redraw viewport when cursor is moved.
  375. UpdateOverlays();
  376. return EditorPlugin.AfterGuiInput.Stop;
  377. }
  378. return EditorPlugin.AfterGuiInput.Pass;
  379. }
  380. .. rst-class:: classref-item-separator
  381. ----
  382. .. _class_EditorPlugin_method__forward_3d_force_draw_over_viewport:
  383. .. rst-class:: classref-method
  384. void **_forward_3d_force_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual|
  385. This method is the same as :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
  386. You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`.
  387. .. rst-class:: classref-item-separator
  388. ----
  389. .. _class_EditorPlugin_method__forward_3d_gui_input:
  390. .. rst-class:: classref-method
  391. :ref:`int<class_int>` **_forward_3d_gui_input** **(** :ref:`Camera3D<class_Camera3D>` viewport_camera, :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
  392. Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_method__handles>` is implemented, and an :ref:`InputEvent<class_InputEvent>` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent<class_InputEvent>` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` for options.
  393. \ **Example:**\
  394. .. tabs::
  395. .. code-tab:: gdscript
  396. # Prevents the InputEvent from reaching other Editor classes.
  397. func _forward_3d_gui_input(camera, event):
  398. return EditorPlugin.AFTER_GUI_INPUT_STOP
  399. .. code-tab:: csharp
  400. // Prevents the InputEvent from reaching other Editor classes.
  401. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  402. {
  403. return EditorPlugin.AfterGuiInput.Stop;
  404. }
  405. Must ``return EditorPlugin.AFTER_GUI_INPUT_PASS`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes.
  406. \ **Example:**\
  407. .. tabs::
  408. .. code-tab:: gdscript
  409. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  410. func _forward_3d_gui_input(camera, event):
  411. return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
  412. .. code-tab:: csharp
  413. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  414. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  415. {
  416. return @event is InputEventMouseMotion ? EditorPlugin.AfterGuiInput.Stop : EditorPlugin.AfterGuiInput.Pass;
  417. }
  418. .. rst-class:: classref-item-separator
  419. ----
  420. .. _class_EditorPlugin_method__forward_canvas_draw_over_viewport:
  421. .. rst-class:: classref-method
  422. void **_forward_canvas_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual|
  423. Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control<class_Control>` for drawing. You can update the viewport manually by calling :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`.
  424. .. tabs::
  425. .. code-tab:: gdscript
  426. func _forward_canvas_draw_over_viewport(overlay):
  427. # Draw a circle at cursor position.
  428. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
  429. func _forward_canvas_gui_input(event):
  430. if event is InputEventMouseMotion:
  431. # Redraw viewport when cursor is moved.
  432. update_overlays()
  433. return true
  434. return false
  435. .. code-tab:: csharp
  436. public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
  437. {
  438. // Draw a circle at cursor position.
  439. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  440. }
  441. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  442. {
  443. if (@event is InputEventMouseMotion)
  444. {
  445. // Redraw viewport when cursor is moved.
  446. UpdateOverlays();
  447. return true;
  448. }
  449. return false;
  450. }
  451. .. rst-class:: classref-item-separator
  452. ----
  453. .. _class_EditorPlugin_method__forward_canvas_force_draw_over_viewport:
  454. .. rst-class:: classref-method
  455. void **_forward_canvas_force_draw_over_viewport** **(** :ref:`Control<class_Control>` viewport_control **)** |virtual|
  456. This method is the same as :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else.
  457. You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`.
  458. .. rst-class:: classref-item-separator
  459. ----
  460. .. _class_EditorPlugin_method__forward_canvas_gui_input:
  461. .. rst-class:: classref-method
  462. :ref:`bool<class_bool>` **_forward_canvas_gui_input** **(** :ref:`InputEvent<class_InputEvent>` event **)** |virtual|
  463. Called when there is a root node in the current edited scene, :ref:`_handles<class_EditorPlugin_method__handles>` is implemented and an :ref:`InputEvent<class_InputEvent>` happens in the 2D viewport. Intercepts the :ref:`InputEvent<class_InputEvent>`, if ``return true`` **EditorPlugin** consumes the ``event``, otherwise forwards ``event`` to other Editor classes.
  464. \ **Example:**\
  465. .. tabs::
  466. .. code-tab:: gdscript
  467. # Prevents the InputEvent from reaching other Editor classes.
  468. func _forward_canvas_gui_input(event):
  469. return true
  470. .. code-tab:: csharp
  471. // Prevents the InputEvent from reaching other Editor classes.
  472. public override bool ForwardCanvasGuiInput(InputEvent @event)
  473. {
  474. return true;
  475. }
  476. Must ``return false`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes.
  477. \ **Example:**\
  478. .. tabs::
  479. .. code-tab:: gdscript
  480. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  481. func _forward_canvas_gui_input(event):
  482. if (event is InputEventMouseMotion):
  483. return true
  484. return false
  485. .. code-tab:: csharp
  486. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  487. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  488. {
  489. if (@event is InputEventMouseMotion)
  490. {
  491. return true;
  492. }
  493. return false;
  494. }
  495. .. rst-class:: classref-item-separator
  496. ----
  497. .. _class_EditorPlugin_method__get_breakpoints:
  498. .. rst-class:: classref-method
  499. :ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints** **(** **)** |virtual| |const|
  500. This is for editors that edit script-based objects. You can return a list of breakpoints in the format (``script:line``), for example: ``res://path_to_script.gd:25``.
  501. .. rst-class:: classref-item-separator
  502. ----
  503. .. _class_EditorPlugin_method__get_plugin_icon:
  504. .. rst-class:: classref-method
  505. :ref:`Texture2D<class_Texture2D>` **_get_plugin_icon** **(** **)** |virtual| |const|
  506. Override this method in your plugin to return a :ref:`Texture2D<class_Texture2D>` in order to give it an icon.
  507. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
  508. Ideally, the plugin icon should be white with a transparent background and 16x16 pixels in size.
  509. .. tabs::
  510. .. code-tab:: gdscript
  511. func _get_plugin_icon():
  512. # You can use a custom icon:
  513. return preload("res://addons/my_plugin/my_plugin_icon.svg")
  514. # Or use a built-in icon:
  515. return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
  516. .. code-tab:: csharp
  517. public override Texture2D _GetPluginIcon()
  518. {
  519. // You can use a custom icon:
  520. return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
  521. // Or use a built-in icon:
  522. return GetEditorInterface().GetBaseControl().GetThemeIcon("Node", "EditorIcons");
  523. }
  524. .. rst-class:: classref-item-separator
  525. ----
  526. .. _class_EditorPlugin_method__get_plugin_name:
  527. .. rst-class:: classref-method
  528. :ref:`String<class_String>` **_get_plugin_name** **(** **)** |virtual| |const|
  529. Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
  530. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons.
  531. .. rst-class:: classref-item-separator
  532. ----
  533. .. _class_EditorPlugin_method__get_state:
  534. .. rst-class:: classref-method
  535. :ref:`Dictionary<class_Dictionary>` **_get_state** **(** **)** |virtual| |const|
  536. Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>` instead.
  537. Use :ref:`_set_state<class_EditorPlugin_method__set_state>` to restore your saved state.
  538. \ **Note:** This method should not be used to save important settings that should persist with the project.
  539. \ **Note:** You must implement :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` for the state to be stored and restored correctly.
  540. ::
  541. func _get_state():
  542. var state = {"zoom": zoom, "preferred_color": my_color}
  543. return state
  544. .. rst-class:: classref-item-separator
  545. ----
  546. .. _class_EditorPlugin_method__get_window_layout:
  547. .. rst-class:: classref-method
  548. void **_get_window_layout** **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual|
  549. Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory.
  550. Use :ref:`_set_window_layout<class_EditorPlugin_method__set_window_layout>` to restore your saved layout.
  551. ::
  552. func _get_window_layout(configuration):
  553. configuration.set_value("MyPlugin", "window_position", $Window.position)
  554. configuration.set_value("MyPlugin", "icon_color", $Icon.modulate)
  555. .. rst-class:: classref-item-separator
  556. ----
  557. .. _class_EditorPlugin_method__handles:
  558. .. rst-class:: classref-method
  559. :ref:`bool<class_bool>` **_handles** **(** :ref:`Object<class_Object>` object **)** |virtual| |const|
  560. Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit<class_EditorPlugin_method__edit>` and :ref:`_make_visible<class_EditorPlugin_method__make_visible>` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input<class_EditorPlugin_method__forward_canvas_gui_input>` and :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>` these will be called too.
  561. .. rst-class:: classref-item-separator
  562. ----
  563. .. _class_EditorPlugin_method__has_main_screen:
  564. .. rst-class:: classref-method
  565. :ref:`bool<class_bool>` **_has_main_screen** **(** **)** |virtual| |const|
  566. Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**).
  567. When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_base_control<class_EditorInterface_method_get_base_control>` and made visible inside :ref:`_make_visible<class_EditorPlugin_method__make_visible>`.
  568. Use :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>` and :ref:`_get_plugin_icon<class_EditorPlugin_method__get_plugin_icon>` to customize the plugin button's appearance.
  569. ::
  570. var plugin_control
  571. func _enter_tree():
  572. plugin_control = preload("my_plugin_control.tscn").instantiate()
  573. get_editor_interface().get_editor_main_screen().add_child(plugin_control)
  574. plugin_control.hide()
  575. func _has_main_screen():
  576. return true
  577. func _make_visible(visible):
  578. plugin_control.visible = visible
  579. func _get_plugin_name():
  580. return "My Super Cool Plugin 3000"
  581. func _get_plugin_icon():
  582. return get_editor_interface().get_base_control().get_theme_icon("Node", "EditorIcons")
  583. .. rst-class:: classref-item-separator
  584. ----
  585. .. _class_EditorPlugin_method__make_visible:
  586. .. rst-class:: classref-method
  587. void **_make_visible** **(** :ref:`bool<class_bool>` visible **)** |virtual|
  588. This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
  589. Remember that you have to manage the visibility of all your editor controls manually.
  590. .. rst-class:: classref-item-separator
  591. ----
  592. .. _class_EditorPlugin_method__save_external_data:
  593. .. rst-class:: classref-method
  594. void **_save_external_data** **(** **)** |virtual|
  595. This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources.
  596. .. rst-class:: classref-item-separator
  597. ----
  598. .. _class_EditorPlugin_method__set_state:
  599. .. rst-class:: classref-method
  600. void **_set_state** **(** :ref:`Dictionary<class_Dictionary>` state **)** |virtual|
  601. Restore the state saved by :ref:`_get_state<class_EditorPlugin_method__get_state>`. This method is called when the current scene tab is changed in the editor.
  602. \ **Note:** Your plugin must implement :ref:`_get_plugin_name<class_EditorPlugin_method__get_plugin_name>`, otherwise it will not be recognized and this method will not be called.
  603. ::
  604. func _set_state(data):
  605. zoom = data.get("zoom", 1.0)
  606. preferred_color = data.get("my_color", Color.WHITE)
  607. .. rst-class:: classref-item-separator
  608. ----
  609. .. _class_EditorPlugin_method__set_window_layout:
  610. .. rst-class:: classref-method
  611. void **_set_window_layout** **(** :ref:`ConfigFile<class_ConfigFile>` configuration **)** |virtual|
  612. Restore the plugin GUI layout and data saved by :ref:`_get_window_layout<class_EditorPlugin_method__get_window_layout>`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data.
  613. ::
  614. func _set_window_layout(configuration):
  615. $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2())
  616. $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.WHITE)
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_EditorPlugin_method_add_autoload_singleton:
  620. .. rst-class:: classref-method
  621. void **add_autoload_singleton** **(** :ref:`String<class_String>` name, :ref:`String<class_String>` path **)**
  622. Adds a script at ``path`` to the Autoload list as ``name``.
  623. .. rst-class:: classref-item-separator
  624. ----
  625. .. _class_EditorPlugin_method_add_control_to_bottom_panel:
  626. .. rst-class:: classref-method
  627. :ref:`Button<class_Button>` **add_control_to_bottom_panel** **(** :ref:`Control<class_Control>` control, :ref:`String<class_String>` title **)**
  628. Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
  629. .. rst-class:: classref-item-separator
  630. ----
  631. .. _class_EditorPlugin_method_add_control_to_container:
  632. .. rst-class:: classref-method
  633. void **add_control_to_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)**
  634. Adds a custom control to a container (see :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`). There are many locations where custom controls can be added in the editor UI.
  635. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
  636. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
  637. .. rst-class:: classref-item-separator
  638. ----
  639. .. _class_EditorPlugin_method_add_control_to_dock:
  640. .. rst-class:: classref-method
  641. void **add_control_to_dock** **(** :ref:`DockSlot<enum_EditorPlugin_DockSlot>` slot, :ref:`Control<class_Control>` control **)**
  642. Adds the control to a specific dock slot (see :ref:`DockSlot<enum_EditorPlugin_DockSlot>` for options).
  643. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
  644. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>` and free it with :ref:`Node.queue_free<class_Node_method_queue_free>`.
  645. .. rst-class:: classref-item-separator
  646. ----
  647. .. _class_EditorPlugin_method_add_custom_type:
  648. .. rst-class:: classref-method
  649. void **add_custom_type** **(** :ref:`String<class_String>` type, :ref:`String<class_String>` base, :ref:`Script<class_Script>` script, :ref:`Texture2D<class_Texture2D>` icon **)**
  650. Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed.
  651. When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object.
  652. \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes.
  653. You can use the virtual method :ref:`_handles<class_EditorPlugin_method__handles>` to check if your custom object is being edited by checking the script or using the ``is`` keyword.
  654. During run-time, this will be a simple object with a script so this function does not need to be called then.
  655. \ **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script.
  656. .. rst-class:: classref-item-separator
  657. ----
  658. .. _class_EditorPlugin_method_add_debugger_plugin:
  659. .. rst-class:: classref-method
  660. void **add_debugger_plugin** **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)**
  661. Adds a :ref:`Script<class_Script>` as debugger plugin to the Debugger. The script must extend :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`.
  662. .. rst-class:: classref-item-separator
  663. ----
  664. .. _class_EditorPlugin_method_add_export_plugin:
  665. .. rst-class:: classref-method
  666. void **add_export_plugin** **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)**
  667. Registers a new :ref:`EditorExportPlugin<class_EditorExportPlugin>`. Export plugins are used to perform tasks when the project is being exported.
  668. See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  669. .. rst-class:: classref-item-separator
  670. ----
  671. .. _class_EditorPlugin_method_add_import_plugin:
  672. .. rst-class:: classref-method
  673. void **add_import_plugin** **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer, :ref:`bool<class_bool>` first_priority=false **)**
  674. Registers a new :ref:`EditorImportPlugin<class_EditorImportPlugin>`. Import plugins are used to import custom and unsupported assets as a custom :ref:`Resource<class_Resource>` type.
  675. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  676. \ **Note:** If you want to import custom 3D asset formats use :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>` instead.
  677. See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  678. .. rst-class:: classref-item-separator
  679. ----
  680. .. _class_EditorPlugin_method_add_inspector_plugin:
  681. .. rst-class:: classref-method
  682. void **add_inspector_plugin** **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)**
  683. Registers a new :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`. Inspector plugins are used to extend :ref:`EditorInspector<class_EditorInspector>` and provide custom configuration tools for your object's properties.
  684. \ **Note:** Always use :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>` to remove the registered :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior.
  685. .. tabs::
  686. .. code-tab:: gdscript
  687. const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
  688. var inspector_plugin = MyInspectorPlugin.new()
  689. func _enter_tree():
  690. add_inspector_plugin(inspector_plugin)
  691. func _exit_tree():
  692. remove_inspector_plugin(inspector_plugin)
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _class_EditorPlugin_method_add_node_3d_gizmo_plugin:
  696. .. rst-class:: classref-method
  697. void **add_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)**
  698. Registers a new :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a :ref:`Node3D<class_Node3D>`.
  699. See :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_EditorPlugin_method_add_resource_conversion_plugin:
  703. .. rst-class:: classref-method
  704. void **add_resource_conversion_plugin** **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)**
  705. Registers a new :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`. Resource conversion plugins are used to add custom resource converters to the editor inspector.
  706. See :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` for an example of how to create a resource conversion plugin.
  707. .. rst-class:: classref-item-separator
  708. ----
  709. .. _class_EditorPlugin_method_add_scene_format_importer_plugin:
  710. .. rst-class:: classref-method
  711. void **add_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer, :ref:`bool<class_bool>` first_priority=false **)**
  712. Registers a new :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`. Scene importers are used to import custom 3D asset formats as scenes.
  713. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  714. .. rst-class:: classref-item-separator
  715. ----
  716. .. _class_EditorPlugin_method_add_scene_post_import_plugin:
  717. .. rst-class:: classref-method
  718. void **add_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin, :ref:`bool<class_bool>` first_priority=false **)**
  719. Add a :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
  720. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  721. .. rst-class:: classref-item-separator
  722. ----
  723. .. _class_EditorPlugin_method_add_tool_menu_item:
  724. .. rst-class:: classref-method
  725. void **add_tool_menu_item** **(** :ref:`String<class_String>` name, :ref:`Callable<class_Callable>` callable **)**
  726. Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the provided ``callable`` will be called.
  727. .. rst-class:: classref-item-separator
  728. ----
  729. .. _class_EditorPlugin_method_add_tool_submenu_item:
  730. .. rst-class:: classref-method
  731. void **add_tool_submenu_item** **(** :ref:`String<class_String>` name, :ref:`PopupMenu<class_PopupMenu>` submenu **)**
  732. Adds a custom :ref:`PopupMenu<class_PopupMenu>` submenu under **Project > Tools >** ``name``. Use ``remove_tool_menu_item(name)`` on plugin clean up to remove the menu.
  733. .. rst-class:: classref-item-separator
  734. ----
  735. .. _class_EditorPlugin_method_add_translation_parser_plugin:
  736. .. rst-class:: classref-method
  737. void **add_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)**
  738. Registers a custom translation parser plugin for extracting translatable strings from custom files.
  739. .. rst-class:: classref-item-separator
  740. ----
  741. .. _class_EditorPlugin_method_add_undo_redo_inspector_hook_callback:
  742. .. rst-class:: classref-method
  743. void **add_undo_redo_inspector_hook_callback** **(** :ref:`Callable<class_Callable>` callable **)**
  744. Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified.
  745. The callback should have 4 arguments: :ref:`Object<class_Object>` ``undo_redo``, :ref:`Object<class_Object>` ``modified_object``, :ref:`String<class_String>` ``property`` and :ref:`Variant<class_Variant>` ``new_value``. They are, respectively, the :ref:`UndoRedo<class_UndoRedo>` object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take.
  746. .. rst-class:: classref-item-separator
  747. ----
  748. .. _class_EditorPlugin_method_get_editor_interface:
  749. .. rst-class:: classref-method
  750. :ref:`EditorInterface<class_EditorInterface>` **get_editor_interface** **(** **)**
  751. Returns the :ref:`EditorInterface<class_EditorInterface>` singleton. It provides access to some parts of the editor GUI as well as various inner states and tools.
  752. .. rst-class:: classref-item-separator
  753. ----
  754. .. _class_EditorPlugin_method_get_export_as_menu:
  755. .. rst-class:: classref-method
  756. :ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu** **(** **)**
  757. Returns the :ref:`PopupMenu<class_PopupMenu>` under **Scene > Export As...**.
  758. .. rst-class:: classref-item-separator
  759. ----
  760. .. _class_EditorPlugin_method_get_script_create_dialog:
  761. .. rst-class:: classref-method
  762. :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog** **(** **)**
  763. Gets the Editor's dialog used for making scripts.
  764. \ **Note:** Users can configure it before use.
  765. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  766. .. rst-class:: classref-item-separator
  767. ----
  768. .. _class_EditorPlugin_method_get_undo_redo:
  769. .. rst-class:: classref-method
  770. :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo** **(** **)**
  771. Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it.
  772. .. rst-class:: classref-item-separator
  773. ----
  774. .. _class_EditorPlugin_method_hide_bottom_panel:
  775. .. rst-class:: classref-method
  776. void **hide_bottom_panel** **(** **)**
  777. Minimizes the bottom panel.
  778. .. rst-class:: classref-item-separator
  779. ----
  780. .. _class_EditorPlugin_method_make_bottom_panel_item_visible:
  781. .. rst-class:: classref-method
  782. void **make_bottom_panel_item_visible** **(** :ref:`Control<class_Control>` item **)**
  783. Makes a specific item in the bottom panel visible.
  784. .. rst-class:: classref-item-separator
  785. ----
  786. .. _class_EditorPlugin_method_queue_save_layout:
  787. .. rst-class:: classref-method
  788. void **queue_save_layout** **(** **)**
  789. Queue save the project's editor layout.
  790. .. rst-class:: classref-item-separator
  791. ----
  792. .. _class_EditorPlugin_method_remove_autoload_singleton:
  793. .. rst-class:: classref-method
  794. void **remove_autoload_singleton** **(** :ref:`String<class_String>` name **)**
  795. Removes an Autoload ``name`` from the list.
  796. .. rst-class:: classref-item-separator
  797. ----
  798. .. _class_EditorPlugin_method_remove_control_from_bottom_panel:
  799. .. rst-class:: classref-method
  800. void **remove_control_from_bottom_panel** **(** :ref:`Control<class_Control>` control **)**
  801. Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
  802. .. rst-class:: classref-item-separator
  803. ----
  804. .. _class_EditorPlugin_method_remove_control_from_container:
  805. .. rst-class:: classref-method
  806. void **remove_control_from_container** **(** :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` container, :ref:`Control<class_Control>` control **)**
  807. Removes the control from the specified container. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
  808. .. rst-class:: classref-item-separator
  809. ----
  810. .. _class_EditorPlugin_method_remove_control_from_docks:
  811. .. rst-class:: classref-method
  812. void **remove_control_from_docks** **(** :ref:`Control<class_Control>` control **)**
  813. Removes the control from the dock. You have to manually :ref:`Node.queue_free<class_Node_method_queue_free>` the control.
  814. .. rst-class:: classref-item-separator
  815. ----
  816. .. _class_EditorPlugin_method_remove_custom_type:
  817. .. rst-class:: classref-method
  818. void **remove_custom_type** **(** :ref:`String<class_String>` type **)**
  819. Removes a custom type added by :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>`.
  820. .. rst-class:: classref-item-separator
  821. ----
  822. .. _class_EditorPlugin_method_remove_debugger_plugin:
  823. .. rst-class:: classref-method
  824. void **remove_debugger_plugin** **(** :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>` script **)**
  825. Removes the debugger plugin with given script from the Debugger.
  826. .. rst-class:: classref-item-separator
  827. ----
  828. .. _class_EditorPlugin_method_remove_export_plugin:
  829. .. rst-class:: classref-method
  830. void **remove_export_plugin** **(** :ref:`EditorExportPlugin<class_EditorExportPlugin>` plugin **)**
  831. Removes an export plugin registered by :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>`.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_EditorPlugin_method_remove_import_plugin:
  835. .. rst-class:: classref-method
  836. void **remove_import_plugin** **(** :ref:`EditorImportPlugin<class_EditorImportPlugin>` importer **)**
  837. Removes an import plugin registered by :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`.
  838. .. rst-class:: classref-item-separator
  839. ----
  840. .. _class_EditorPlugin_method_remove_inspector_plugin:
  841. .. rst-class:: classref-method
  842. void **remove_inspector_plugin** **(** :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>` plugin **)**
  843. Removes an inspector plugin registered by :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`
  844. .. rst-class:: classref-item-separator
  845. ----
  846. .. _class_EditorPlugin_method_remove_node_3d_gizmo_plugin:
  847. .. rst-class:: classref-method
  848. void **remove_node_3d_gizmo_plugin** **(** :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>` plugin **)**
  849. Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`.
  850. .. rst-class:: classref-item-separator
  851. ----
  852. .. _class_EditorPlugin_method_remove_resource_conversion_plugin:
  853. .. rst-class:: classref-method
  854. void **remove_resource_conversion_plugin** **(** :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` plugin **)**
  855. Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>`.
  856. .. rst-class:: classref-item-separator
  857. ----
  858. .. _class_EditorPlugin_method_remove_scene_format_importer_plugin:
  859. .. rst-class:: classref-method
  860. void **remove_scene_format_importer_plugin** **(** :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>` scene_format_importer **)**
  861. Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>`.
  862. .. rst-class:: classref-item-separator
  863. ----
  864. .. _class_EditorPlugin_method_remove_scene_post_import_plugin:
  865. .. rst-class:: classref-method
  866. void **remove_scene_post_import_plugin** **(** :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>` scene_import_plugin **)**
  867. Remove the :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, added with :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>`.
  868. .. rst-class:: classref-item-separator
  869. ----
  870. .. _class_EditorPlugin_method_remove_tool_menu_item:
  871. .. rst-class:: classref-method
  872. void **remove_tool_menu_item** **(** :ref:`String<class_String>` name **)**
  873. Removes a menu ``name`` from **Project > Tools**.
  874. .. rst-class:: classref-item-separator
  875. ----
  876. .. _class_EditorPlugin_method_remove_translation_parser_plugin:
  877. .. rst-class:: classref-method
  878. void **remove_translation_parser_plugin** **(** :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>` parser **)**
  879. Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>`.
  880. .. rst-class:: classref-item-separator
  881. ----
  882. .. _class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback:
  883. .. rst-class:: classref-method
  884. void **remove_undo_redo_inspector_hook_callback** **(** :ref:`Callable<class_Callable>` callable **)**
  885. Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`.
  886. .. rst-class:: classref-item-separator
  887. ----
  888. .. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled:
  889. .. rst-class:: classref-method
  890. void **set_force_draw_over_forwarding_enabled** **(** **)**
  891. Enables calling of :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin.
  892. .. rst-class:: classref-item-separator
  893. ----
  894. .. _class_EditorPlugin_method_set_input_event_forwarding_always_enabled:
  895. .. rst-class:: classref-method
  896. void **set_input_event_forwarding_always_enabled** **(** **)**
  897. Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input<class_EditorPlugin_method__forward_3d_gui_input>`. It might be especially usable if your plugin will want to use raycast in the scene.
  898. .. rst-class:: classref-item-separator
  899. ----
  900. .. _class_EditorPlugin_method_update_overlays:
  901. .. rst-class:: classref-method
  902. :ref:`int<class_int>` **update_overlays** **(** **)** |const|
  903. Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_method__forward_canvas_draw_over_viewport>`, :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_method__forward_canvas_force_draw_over_viewport>`, :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_method__forward_3d_draw_over_viewport>` and :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_method__forward_3d_force_draw_over_viewport>` to be called.
  904. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  905. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  906. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  907. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  908. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  909. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  910. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`