class_editorplugin.rst 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/EditorPlugin.xml.
  6. .. _class_EditorPlugin:
  7. EditorPlugin
  8. ============
  9. **Inherits:** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`GridMapEditorPlugin<class_GridMapEditorPlugin>`
  11. Used by the editor to extend its functionality.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. 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.
  16. \ **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.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - :doc:`Editor plugins documentation index <../tutorials/plugins/editor/index>`
  21. .. rst-class:: classref-reftable-group
  22. Methods
  23. -------
  24. .. table::
  25. :widths: auto
  26. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | |void| | :ref:`_apply_changes<class_EditorPlugin_private_method__apply_changes>`\ (\ ) |virtual| |
  28. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`bool<class_bool>` | :ref:`_build<class_EditorPlugin_private_method__build>`\ (\ ) |virtual| |
  30. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | |void| | :ref:`_clear<class_EditorPlugin_private_method__clear>`\ (\ ) |virtual| |
  32. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | |void| | :ref:`_disable_plugin<class_EditorPlugin_private_method__disable_plugin>`\ (\ ) |virtual| |
  34. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | |void| | :ref:`_edit<class_EditorPlugin_private_method__edit>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |
  36. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | |void| | :ref:`_enable_plugin<class_EditorPlugin_private_method__enable_plugin>`\ (\ ) |virtual| |
  38. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | |void| | :ref:`_forward_3d_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
  40. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | |void| | :ref:`_forward_3d_force_draw_over_viewport<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
  42. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`int<class_int>` | :ref:`_forward_3d_gui_input<class_EditorPlugin_private_method__forward_3d_gui_input>`\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  44. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | |void| | :ref:`_forward_canvas_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
  46. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | |void| | :ref:`_forward_canvas_force_draw_over_viewport<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| |
  48. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`_forward_canvas_gui_input<class_EditorPlugin_private_method__forward_canvas_gui_input>`\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| |
  50. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_breakpoints<class_EditorPlugin_private_method__get_breakpoints>`\ (\ ) |virtual| |const| |
  52. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`Texture2D<class_Texture2D>` | :ref:`_get_plugin_icon<class_EditorPlugin_private_method__get_plugin_icon>`\ (\ ) |virtual| |const| |
  54. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`String<class_String>` | :ref:`_get_plugin_name<class_EditorPlugin_private_method__get_plugin_name>`\ (\ ) |virtual| |const| |
  56. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_state<class_EditorPlugin_private_method__get_state>`\ (\ ) |virtual| |const| |
  58. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`String<class_String>` | :ref:`_get_unsaved_status<class_EditorPlugin_private_method__get_unsaved_status>`\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| |
  60. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | |void| | :ref:`_get_window_layout<class_EditorPlugin_private_method__get_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| |
  62. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`_handles<class_EditorPlugin_private_method__handles>`\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| |
  64. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | :ref:`bool<class_bool>` | :ref:`_has_main_screen<class_EditorPlugin_private_method__has_main_screen>`\ (\ ) |virtual| |const| |
  66. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | |void| | :ref:`_make_visible<class_EditorPlugin_private_method__make_visible>`\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| |
  68. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_run_scene<class_EditorPlugin_private_method__run_scene>`\ (\ scene\: :ref:`String<class_String>`, args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| |
  70. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | |void| | :ref:`_save_external_data<class_EditorPlugin_private_method__save_external_data>`\ (\ ) |virtual| |
  72. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | |void| | :ref:`_set_state<class_EditorPlugin_private_method__set_state>`\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| |
  74. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | |void| | :ref:`_set_window_layout<class_EditorPlugin_private_method__set_window_layout>`\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| |
  76. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | |void| | :ref:`add_autoload_singleton<class_EditorPlugin_method_add_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) |
  78. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | |void| | :ref:`add_context_menu_plugin<class_EditorPlugin_method_add_context_menu_plugin>`\ (\ slot\: :ref:`ContextMenuSlot<enum_EditorContextMenuPlugin_ContextMenuSlot>`, plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) |
  80. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | :ref:`Button<class_Button>` | :ref:`add_control_to_bottom_panel<class_EditorPlugin_method_add_control_to_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) |
  82. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | |void| | :ref:`add_control_to_container<class_EditorPlugin_method_add_control_to_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) |
  84. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | |void| | :ref:`add_control_to_dock<class_EditorPlugin_method_add_control_to_dock>`\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) |
  86. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | |void| | :ref:`add_custom_type<class_EditorPlugin_method_add_custom_type>`\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  88. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | |void| | :ref:`add_debugger_plugin<class_EditorPlugin_method_add_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) |
  90. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | |void| | :ref:`add_dock<class_EditorPlugin_method_add_dock>`\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) |
  92. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. | |void| | :ref:`add_export_platform<class_EditorPlugin_method_add_export_platform>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |
  94. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  95. | |void| | :ref:`add_export_plugin<class_EditorPlugin_method_add_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) |
  96. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  97. | |void| | :ref:`add_import_plugin<class_EditorPlugin_method_add_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
  98. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  99. | |void| | :ref:`add_inspector_plugin<class_EditorPlugin_method_add_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) |
  100. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  101. | |void| | :ref:`add_node_3d_gizmo_plugin<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) |
  102. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  103. | |void| | :ref:`add_resource_conversion_plugin<class_EditorPlugin_method_add_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) |
  104. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  105. | |void| | :ref:`add_scene_format_importer_plugin<class_EditorPlugin_method_add_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
  106. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  107. | |void| | :ref:`add_scene_post_import_plugin<class_EditorPlugin_method_add_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) |
  108. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  109. | |void| | :ref:`add_tool_menu_item<class_EditorPlugin_method_add_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) |
  110. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  111. | |void| | :ref:`add_tool_submenu_item<class_EditorPlugin_method_add_tool_submenu_item>`\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) |
  112. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  113. | |void| | :ref:`add_translation_parser_plugin<class_EditorPlugin_method_add_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) |
  114. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  115. | |void| | :ref:`add_undo_redo_inspector_hook_callback<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
  116. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  117. | :ref:`EditorInterface<class_EditorInterface>` | :ref:`get_editor_interface<class_EditorPlugin_method_get_editor_interface>`\ (\ ) |
  118. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  119. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_export_as_menu<class_EditorPlugin_method_get_export_as_menu>`\ (\ ) |
  120. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  121. | :ref:`String<class_String>` | :ref:`get_plugin_version<class_EditorPlugin_method_get_plugin_version>`\ (\ ) |const| |
  122. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  123. | :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` | :ref:`get_script_create_dialog<class_EditorPlugin_method_get_script_create_dialog>`\ (\ ) |
  124. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  125. | :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` | :ref:`get_undo_redo<class_EditorPlugin_method_get_undo_redo>`\ (\ ) |
  126. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  127. | |void| | :ref:`hide_bottom_panel<class_EditorPlugin_method_hide_bottom_panel>`\ (\ ) |
  128. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  129. | |void| | :ref:`make_bottom_panel_item_visible<class_EditorPlugin_method_make_bottom_panel_item_visible>`\ (\ item\: :ref:`Control<class_Control>`\ ) |
  130. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  131. | |void| | :ref:`queue_save_layout<class_EditorPlugin_method_queue_save_layout>`\ (\ ) |
  132. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  133. | |void| | :ref:`remove_autoload_singleton<class_EditorPlugin_method_remove_autoload_singleton>`\ (\ name\: :ref:`String<class_String>`\ ) |
  134. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  135. | |void| | :ref:`remove_context_menu_plugin<class_EditorPlugin_method_remove_context_menu_plugin>`\ (\ plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) |
  136. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  137. | |void| | :ref:`remove_control_from_bottom_panel<class_EditorPlugin_method_remove_control_from_bottom_panel>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
  138. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  139. | |void| | :ref:`remove_control_from_container<class_EditorPlugin_method_remove_control_from_container>`\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) |
  140. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  141. | |void| | :ref:`remove_control_from_docks<class_EditorPlugin_method_remove_control_from_docks>`\ (\ control\: :ref:`Control<class_Control>`\ ) |
  142. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  143. | |void| | :ref:`remove_custom_type<class_EditorPlugin_method_remove_custom_type>`\ (\ type\: :ref:`String<class_String>`\ ) |
  144. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  145. | |void| | :ref:`remove_debugger_plugin<class_EditorPlugin_method_remove_debugger_plugin>`\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) |
  146. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  147. | |void| | :ref:`remove_dock<class_EditorPlugin_method_remove_dock>`\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) |
  148. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  149. | |void| | :ref:`remove_export_platform<class_EditorPlugin_method_remove_export_platform>`\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) |
  150. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  151. | |void| | :ref:`remove_export_plugin<class_EditorPlugin_method_remove_export_plugin>`\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) |
  152. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  153. | |void| | :ref:`remove_import_plugin<class_EditorPlugin_method_remove_import_plugin>`\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) |
  154. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  155. | |void| | :ref:`remove_inspector_plugin<class_EditorPlugin_method_remove_inspector_plugin>`\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) |
  156. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  157. | |void| | :ref:`remove_node_3d_gizmo_plugin<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) |
  158. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  159. | |void| | :ref:`remove_resource_conversion_plugin<class_EditorPlugin_method_remove_resource_conversion_plugin>`\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) |
  160. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  161. | |void| | :ref:`remove_scene_format_importer_plugin<class_EditorPlugin_method_remove_scene_format_importer_plugin>`\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) |
  162. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  163. | |void| | :ref:`remove_scene_post_import_plugin<class_EditorPlugin_method_remove_scene_post_import_plugin>`\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) |
  164. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  165. | |void| | :ref:`remove_tool_menu_item<class_EditorPlugin_method_remove_tool_menu_item>`\ (\ name\: :ref:`String<class_String>`\ ) |
  166. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  167. | |void| | :ref:`remove_translation_parser_plugin<class_EditorPlugin_method_remove_translation_parser_plugin>`\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) |
  168. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  169. | |void| | :ref:`remove_undo_redo_inspector_hook_callback<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`\ (\ callable\: :ref:`Callable<class_Callable>`\ ) |
  170. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  171. | |void| | :ref:`set_dock_tab_icon<class_EditorPlugin_method_set_dock_tab_icon>`\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) |
  172. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  173. | |void| | :ref:`set_force_draw_over_forwarding_enabled<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`\ (\ ) |
  174. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  175. | |void| | :ref:`set_input_event_forwarding_always_enabled<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`\ (\ ) |
  176. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  177. | :ref:`int<class_int>` | :ref:`update_overlays<class_EditorPlugin_method_update_overlays>`\ (\ ) |const| |
  178. +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  179. .. rst-class:: classref-section-separator
  180. ----
  181. .. rst-class:: classref-descriptions-group
  182. Signals
  183. -------
  184. .. _class_EditorPlugin_signal_main_screen_changed:
  185. .. rst-class:: classref-signal
  186. **main_screen_changed**\ (\ screen_name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_main_screen_changed>`
  187. Emitted when user changes the workspace (**2D**, **3D**, **Script**, **Game**, **AssetLib**). Also works with custom screens defined by plugins.
  188. .. rst-class:: classref-item-separator
  189. ----
  190. .. _class_EditorPlugin_signal_project_settings_changed:
  191. .. rst-class:: classref-signal
  192. **project_settings_changed**\ (\ ) :ref:`🔗<class_EditorPlugin_signal_project_settings_changed>`
  193. **Deprecated:** Use :ref:`ProjectSettings.settings_changed<class_ProjectSettings_signal_settings_changed>` instead.
  194. Emitted when any project setting has changed.
  195. .. rst-class:: classref-item-separator
  196. ----
  197. .. _class_EditorPlugin_signal_resource_saved:
  198. .. rst-class:: classref-signal
  199. **resource_saved**\ (\ resource\: :ref:`Resource<class_Resource>`\ ) :ref:`🔗<class_EditorPlugin_signal_resource_saved>`
  200. Emitted when the given ``resource`` was saved on disc. See also :ref:`scene_saved<class_EditorPlugin_signal_scene_saved>`.
  201. .. rst-class:: classref-item-separator
  202. ----
  203. .. _class_EditorPlugin_signal_scene_changed:
  204. .. rst-class:: classref-signal
  205. **scene_changed**\ (\ scene_root\: :ref:`Node<class_Node>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_changed>`
  206. 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``.
  207. .. rst-class:: classref-item-separator
  208. ----
  209. .. _class_EditorPlugin_signal_scene_closed:
  210. .. rst-class:: classref-signal
  211. **scene_closed**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_closed>`
  212. Emitted when user closes a scene. The argument is a file path to the closed scene.
  213. .. rst-class:: classref-item-separator
  214. ----
  215. .. _class_EditorPlugin_signal_scene_saved:
  216. .. rst-class:: classref-signal
  217. **scene_saved**\ (\ filepath\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_signal_scene_saved>`
  218. Emitted when a scene was saved on disc. The argument is a file path to the saved scene. See also :ref:`resource_saved<class_EditorPlugin_signal_resource_saved>`.
  219. .. rst-class:: classref-section-separator
  220. ----
  221. .. rst-class:: classref-descriptions-group
  222. Enumerations
  223. ------------
  224. .. _enum_EditorPlugin_CustomControlContainer:
  225. .. rst-class:: classref-enumeration
  226. enum **CustomControlContainer**: :ref:`🔗<enum_EditorPlugin_CustomControlContainer>`
  227. .. _class_EditorPlugin_constant_CONTAINER_TOOLBAR:
  228. .. rst-class:: classref-enumeration-constant
  229. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_TOOLBAR** = ``0``
  230. Main editor toolbar, next to play buttons.
  231. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_MENU:
  232. .. rst-class:: classref-enumeration-constant
  233. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_MENU** = ``1``
  234. The toolbar that appears when 3D editor is active.
  235. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_LEFT:
  236. .. rst-class:: classref-enumeration-constant
  237. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_LEFT** = ``2``
  238. Left sidebar of the 3D editor.
  239. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT:
  240. .. rst-class:: classref-enumeration-constant
  241. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_SIDE_RIGHT** = ``3``
  242. Right sidebar of the 3D editor.
  243. .. _class_EditorPlugin_constant_CONTAINER_SPATIAL_EDITOR_BOTTOM:
  244. .. rst-class:: classref-enumeration-constant
  245. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_SPATIAL_EDITOR_BOTTOM** = ``4``
  246. Bottom panel of the 3D editor.
  247. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_MENU:
  248. .. rst-class:: classref-enumeration-constant
  249. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_MENU** = ``5``
  250. The toolbar that appears when 2D editor is active.
  251. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_LEFT:
  252. .. rst-class:: classref-enumeration-constant
  253. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_LEFT** = ``6``
  254. Left sidebar of the 2D editor.
  255. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_SIDE_RIGHT:
  256. .. rst-class:: classref-enumeration-constant
  257. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_SIDE_RIGHT** = ``7``
  258. Right sidebar of the 2D editor.
  259. .. _class_EditorPlugin_constant_CONTAINER_CANVAS_EDITOR_BOTTOM:
  260. .. rst-class:: classref-enumeration-constant
  261. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_CANVAS_EDITOR_BOTTOM** = ``8``
  262. Bottom panel of the 2D editor.
  263. .. _class_EditorPlugin_constant_CONTAINER_INSPECTOR_BOTTOM:
  264. .. rst-class:: classref-enumeration-constant
  265. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_INSPECTOR_BOTTOM** = ``9``
  266. Bottom section of the inspector.
  267. .. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_LEFT:
  268. .. rst-class:: classref-enumeration-constant
  269. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_LEFT** = ``10``
  270. Tab of Project Settings dialog, to the left of other tabs.
  271. .. _class_EditorPlugin_constant_CONTAINER_PROJECT_SETTING_TAB_RIGHT:
  272. .. rst-class:: classref-enumeration-constant
  273. :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>` **CONTAINER_PROJECT_SETTING_TAB_RIGHT** = ``11``
  274. Tab of Project Settings dialog, to the right of other tabs.
  275. .. rst-class:: classref-item-separator
  276. ----
  277. .. _enum_EditorPlugin_DockSlot:
  278. .. rst-class:: classref-enumeration
  279. enum **DockSlot**: :ref:`🔗<enum_EditorPlugin_DockSlot>`
  280. .. _class_EditorPlugin_constant_DOCK_SLOT_NONE:
  281. .. rst-class:: classref-enumeration-constant
  282. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_NONE** = ``-1``
  283. The dock is closed.
  284. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UL:
  285. .. rst-class:: classref-enumeration-constant
  286. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UL** = ``0``
  287. Dock slot, left side, upper-left (empty in default layout).
  288. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BL:
  289. .. rst-class:: classref-enumeration-constant
  290. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BL** = ``1``
  291. Dock slot, left side, bottom-left (empty in default layout).
  292. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_UR:
  293. .. rst-class:: classref-enumeration-constant
  294. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_UR** = ``2``
  295. Dock slot, left side, upper-right (in default layout includes Scene and Import docks).
  296. .. _class_EditorPlugin_constant_DOCK_SLOT_LEFT_BR:
  297. .. rst-class:: classref-enumeration-constant
  298. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_LEFT_BR** = ``3``
  299. Dock slot, left side, bottom-right (in default layout includes FileSystem dock).
  300. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UL:
  301. .. rst-class:: classref-enumeration-constant
  302. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UL** = ``4``
  303. Dock slot, right side, upper-left (in default layout includes Inspector, Node, and History docks).
  304. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BL:
  305. .. rst-class:: classref-enumeration-constant
  306. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BL** = ``5``
  307. Dock slot, right side, bottom-left (empty in default layout).
  308. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_UR:
  309. .. rst-class:: classref-enumeration-constant
  310. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_UR** = ``6``
  311. Dock slot, right side, upper-right (empty in default layout).
  312. .. _class_EditorPlugin_constant_DOCK_SLOT_RIGHT_BR:
  313. .. rst-class:: classref-enumeration-constant
  314. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_RIGHT_BR** = ``7``
  315. Dock slot, right side, bottom-right (empty in default layout).
  316. .. _class_EditorPlugin_constant_DOCK_SLOT_BOTTOM:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_BOTTOM** = ``8``
  319. Bottom panel.
  320. .. _class_EditorPlugin_constant_DOCK_SLOT_MAX:
  321. .. rst-class:: classref-enumeration-constant
  322. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_MAX** = ``9``
  323. Represents the size of the :ref:`DockSlot<enum_EditorPlugin_DockSlot>` enum.
  324. .. rst-class:: classref-item-separator
  325. ----
  326. .. _enum_EditorPlugin_AfterGUIInput:
  327. .. rst-class:: classref-enumeration
  328. enum **AfterGUIInput**: :ref:`🔗<enum_EditorPlugin_AfterGUIInput>`
  329. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS:
  330. .. rst-class:: classref-enumeration-constant
  331. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_PASS** = ``0``
  332. Forwards the :ref:`InputEvent<class_InputEvent>` to other EditorPlugins.
  333. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP:
  334. .. rst-class:: classref-enumeration-constant
  335. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_STOP** = ``1``
  336. Prevents the :ref:`InputEvent<class_InputEvent>` from reaching other Editor classes.
  337. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM:
  338. .. rst-class:: classref-enumeration-constant
  339. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_CUSTOM** = ``2``
  340. 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.
  341. .. rst-class:: classref-section-separator
  342. ----
  343. .. rst-class:: classref-descriptions-group
  344. Method Descriptions
  345. -------------------
  346. .. _class_EditorPlugin_private_method__apply_changes:
  347. .. rst-class:: classref-method
  348. |void| **_apply_changes**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__apply_changes>`
  349. 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.
  350. 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.
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_EditorPlugin_private_method__build:
  354. .. rst-class:: classref-method
  355. :ref:`bool<class_bool>` **_build**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__build>`
  356. This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
  357. 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_private_method__build>` methods from running.
  358. .. rst-class:: classref-item-separator
  359. ----
  360. .. _class_EditorPlugin_private_method__clear:
  361. .. rst-class:: classref-method
  362. |void| **_clear**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__clear>`
  363. 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.
  364. .. rst-class:: classref-item-separator
  365. ----
  366. .. _class_EditorPlugin_private_method__disable_plugin:
  367. .. rst-class:: classref-method
  368. |void| **_disable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__disable_plugin>`
  369. Called by the engine when the user disables the **EditorPlugin** in the Plugin tab of the project settings window.
  370. .. rst-class:: classref-item-separator
  371. ----
  372. .. _class_EditorPlugin_private_method__edit:
  373. .. rst-class:: classref-method
  374. |void| **_edit**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__edit>`
  375. This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
  376. \ ``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.
  377. .. rst-class:: classref-item-separator
  378. ----
  379. .. _class_EditorPlugin_private_method__enable_plugin:
  380. .. rst-class:: classref-method
  381. |void| **_enable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__enable_plugin>`
  382. Called by the engine when the user enables the **EditorPlugin** in the Plugin tab of the project settings window.
  383. .. rst-class:: classref-item-separator
  384. ----
  385. .. _class_EditorPlugin_private_method__forward_3d_draw_over_viewport:
  386. .. rst-class:: classref-method
  387. |void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`
  388. Called by the engine when the 3D editor's viewport is updated. ``viewport_control`` is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling :ref:`update_overlays()<class_EditorPlugin_method_update_overlays>`.
  389. .. tabs::
  390. .. code-tab:: gdscript
  391. func _forward_3d_draw_over_viewport(overlay):
  392. # Draw a circle at the cursor's position.
  393. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
  394. func _forward_3d_gui_input(camera, event):
  395. if event is InputEventMouseMotion:
  396. # Redraw the viewport when the cursor is moved.
  397. update_overlays()
  398. return EditorPlugin.AFTER_GUI_INPUT_STOP
  399. return EditorPlugin.AFTER_GUI_INPUT_PASS
  400. .. code-tab:: csharp
  401. public override void _Forward3DDrawOverViewport(Control viewportControl)
  402. {
  403. // Draw a circle at the cursor's position.
  404. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  405. }
  406. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event)
  407. {
  408. if (@event is InputEventMouseMotion)
  409. {
  410. // Redraw the viewport when the cursor is moved.
  411. UpdateOverlays();
  412. return EditorPlugin.AfterGuiInput.Stop;
  413. }
  414. return EditorPlugin.AfterGuiInput.Pass;
  415. }
  416. .. rst-class:: classref-item-separator
  417. ----
  418. .. _class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport:
  419. .. rst-class:: classref-method
  420. |void| **_forward_3d_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>`
  421. This method is the same as :ref:`_forward_3d_draw_over_viewport()<class_EditorPlugin_private_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.
  422. 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>`.
  423. .. rst-class:: classref-item-separator
  424. ----
  425. .. _class_EditorPlugin_private_method__forward_3d_gui_input:
  426. .. rst-class:: classref-method
  427. :ref:`int<class_int>` **_forward_3d_gui_input**\ (\ viewport_camera\: :ref:`Camera3D<class_Camera3D>`, event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_gui_input>`
  428. Called when there is a root node in the current edited scene, :ref:`_handles()<class_EditorPlugin_private_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.
  429. .. tabs::
  430. .. code-tab:: gdscript
  431. # Prevents the InputEvent from reaching other Editor classes.
  432. func _forward_3d_gui_input(camera, event):
  433. return EditorPlugin.AFTER_GUI_INPUT_STOP
  434. .. code-tab:: csharp
  435. // Prevents the InputEvent from reaching other Editor classes.
  436. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  437. {
  438. return EditorPlugin.AfterGuiInput.Stop;
  439. }
  440. This method must return :ref:`AFTER_GUI_INPUT_PASS<class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS>` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes.
  441. .. tabs::
  442. .. code-tab:: gdscript
  443. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  444. func _forward_3d_gui_input(camera, event):
  445. return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
  446. .. code-tab:: csharp
  447. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  448. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  449. {
  450. return @event is InputEventMouseMotion ? EditorPlugin.AfterGuiInput.Stop : EditorPlugin.AfterGuiInput.Pass;
  451. }
  452. .. rst-class:: classref-item-separator
  453. ----
  454. .. _class_EditorPlugin_private_method__forward_canvas_draw_over_viewport:
  455. .. rst-class:: classref-method
  456. |void| **_forward_canvas_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`
  457. Called by the engine when the 2D editor's viewport is updated. ``viewport_control`` is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling :ref:`update_overlays()<class_EditorPlugin_method_update_overlays>`.
  458. .. tabs::
  459. .. code-tab:: gdscript
  460. func _forward_canvas_draw_over_viewport(overlay):
  461. # Draw a circle at the cursor's position.
  462. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
  463. func _forward_canvas_gui_input(event):
  464. if event is InputEventMouseMotion:
  465. # Redraw the viewport when the cursor is moved.
  466. update_overlays()
  467. return true
  468. return false
  469. .. code-tab:: csharp
  470. public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
  471. {
  472. // Draw a circle at the cursor's position.
  473. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  474. }
  475. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  476. {
  477. if (@event is InputEventMouseMotion)
  478. {
  479. // Redraw the viewport when the cursor is moved.
  480. UpdateOverlays();
  481. return true;
  482. }
  483. return false;
  484. }
  485. .. rst-class:: classref-item-separator
  486. ----
  487. .. _class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport:
  488. .. rst-class:: classref-method
  489. |void| **_forward_canvas_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`
  490. This method is the same as :ref:`_forward_canvas_draw_over_viewport()<class_EditorPlugin_private_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.
  491. 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>`.
  492. .. rst-class:: classref-item-separator
  493. ----
  494. .. _class_EditorPlugin_private_method__forward_canvas_gui_input:
  495. .. rst-class:: classref-method
  496. :ref:`bool<class_bool>` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_gui_input>`
  497. Called when there is a root node in the current edited scene, :ref:`_handles()<class_EditorPlugin_private_method__handles>` is implemented, and an :ref:`InputEvent<class_InputEvent>` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes.
  498. .. tabs::
  499. .. code-tab:: gdscript
  500. # Prevents the InputEvent from reaching other Editor classes.
  501. func _forward_canvas_gui_input(event):
  502. return true
  503. .. code-tab:: csharp
  504. // Prevents the InputEvent from reaching other Editor classes.
  505. public override bool ForwardCanvasGuiInput(InputEvent @event)
  506. {
  507. return true;
  508. }
  509. This method must return ``false`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes.
  510. .. tabs::
  511. .. code-tab:: gdscript
  512. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  513. func _forward_canvas_gui_input(event):
  514. if (event is InputEventMouseMotion):
  515. return true
  516. return false
  517. .. code-tab:: csharp
  518. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  519. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  520. {
  521. if (@event is InputEventMouseMotion)
  522. {
  523. return true;
  524. }
  525. return false;
  526. }
  527. .. rst-class:: classref-item-separator
  528. ----
  529. .. _class_EditorPlugin_private_method__get_breakpoints:
  530. .. rst-class:: classref-method
  531. :ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_breakpoints>`
  532. 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``.
  533. .. rst-class:: classref-item-separator
  534. ----
  535. .. _class_EditorPlugin_private_method__get_plugin_icon:
  536. .. rst-class:: classref-method
  537. :ref:`Texture2D<class_Texture2D>` **_get_plugin_icon**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_icon>`
  538. Override this method in your plugin to return a :ref:`Texture2D<class_Texture2D>` in order to give it an icon.
  539. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
  540. Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
  541. .. tabs::
  542. .. code-tab:: gdscript
  543. func _get_plugin_icon():
  544. # You can use a custom icon:
  545. return preload("res://addons/my_plugin/my_plugin_icon.svg")
  546. # Or use a built-in icon:
  547. return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
  548. .. code-tab:: csharp
  549. public override Texture2D _GetPluginIcon()
  550. {
  551. // You can use a custom icon:
  552. return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
  553. // Or use a built-in icon:
  554. return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
  555. }
  556. .. rst-class:: classref-item-separator
  557. ----
  558. .. _class_EditorPlugin_private_method__get_plugin_name:
  559. .. rst-class:: classref-method
  560. :ref:`String<class_String>` **_get_plugin_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_name>`
  561. Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
  562. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
  563. .. rst-class:: classref-item-separator
  564. ----
  565. .. _class_EditorPlugin_private_method__get_state:
  566. .. rst-class:: classref-method
  567. :ref:`Dictionary<class_Dictionary>` **_get_state**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_state>`
  568. 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_private_method__get_window_layout>` instead.
  569. Use :ref:`_set_state()<class_EditorPlugin_private_method__set_state>` to restore your saved state.
  570. \ **Note:** This method should not be used to save important settings that should persist with the project.
  571. \ **Note:** You must implement :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>` for the state to be stored and restored correctly.
  572. ::
  573. func _get_state():
  574. var state = { "zoom": zoom, "preferred_color": my_color }
  575. return state
  576. .. rst-class:: classref-item-separator
  577. ----
  578. .. _class_EditorPlugin_private_method__get_unsaved_status:
  579. .. rst-class:: classref-method
  580. :ref:`String<class_String>` **_get_unsaved_status**\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_unsaved_status>`
  581. Override this method to provide a custom message that lists unsaved changes. The editor will call this method when exiting or when closing a scene, and display the returned string in a confirmation dialog. Return empty string if the plugin has no unsaved changes.
  582. When closing a scene, ``for_scene`` is the path to the scene being closed. You can use it to handle built-in resources in that scene.
  583. If the user confirms saving, :ref:`_save_external_data()<class_EditorPlugin_private_method__save_external_data>` will be called, before closing the editor.
  584. ::
  585. func _get_unsaved_status(for_scene):
  586. if not unsaved:
  587. return ""
  588. if for_scene.is_empty():
  589. return "Save changes in MyCustomPlugin before closing?"
  590. else:
  591. return "Scene %s has changes from MyCustomPlugin. Save before closing?" % for_scene.get_file()
  592. func _save_external_data():
  593. unsaved = false
  594. If the plugin has no scene-specific changes, you can ignore the calls when closing scenes:
  595. ::
  596. func _get_unsaved_status(for_scene):
  597. if not for_scene.is_empty():
  598. return ""
  599. .. rst-class:: classref-item-separator
  600. ----
  601. .. _class_EditorPlugin_private_method__get_window_layout:
  602. .. rst-class:: classref-method
  603. |void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__get_window_layout>`
  604. 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.
  605. Use :ref:`_set_window_layout()<class_EditorPlugin_private_method__set_window_layout>` to restore your saved layout.
  606. ::
  607. func _get_window_layout(configuration):
  608. configuration.set_value("MyPlugin", "window_position", $Window.position)
  609. configuration.set_value("MyPlugin", "icon_color", $Icon.modulate)
  610. .. rst-class:: classref-item-separator
  611. ----
  612. .. _class_EditorPlugin_private_method__handles:
  613. .. rst-class:: classref-method
  614. :ref:`bool<class_bool>` **_handles**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__handles>`
  615. 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_private_method__edit>` and :ref:`_make_visible()<class_EditorPlugin_private_method__make_visible>` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input()<class_EditorPlugin_private_method__forward_canvas_gui_input>` and :ref:`_forward_3d_gui_input()<class_EditorPlugin_private_method__forward_3d_gui_input>` these will be called too.
  616. \ **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors.
  617. .. rst-class:: classref-item-separator
  618. ----
  619. .. _class_EditorPlugin_private_method__has_main_screen:
  620. .. rst-class:: classref-method
  621. :ref:`bool<class_bool>` **_has_main_screen**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__has_main_screen>`
  622. Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script**, **Game**, and **AssetLib**).
  623. 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_editor_main_screen()<class_EditorInterface_method_get_editor_main_screen>` and made visible inside :ref:`_make_visible()<class_EditorPlugin_private_method__make_visible>`.
  624. Use :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>` and :ref:`_get_plugin_icon()<class_EditorPlugin_private_method__get_plugin_icon>` to customize the plugin button's appearance.
  625. ::
  626. var plugin_control
  627. func _enter_tree():
  628. plugin_control = preload("my_plugin_control.tscn").instantiate()
  629. EditorInterface.get_editor_main_screen().add_child(plugin_control)
  630. plugin_control.hide()
  631. func _has_main_screen():
  632. return true
  633. func _make_visible(visible):
  634. plugin_control.visible = visible
  635. func _get_plugin_name():
  636. return "My Super Cool Plugin 3000"
  637. func _get_plugin_icon():
  638. return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
  639. .. rst-class:: classref-item-separator
  640. ----
  641. .. _class_EditorPlugin_private_method__make_visible:
  642. .. rst-class:: classref-method
  643. |void| **_make_visible**\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__make_visible>`
  644. This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
  645. Remember that you have to manage the visibility of all your editor controls manually.
  646. .. rst-class:: classref-item-separator
  647. ----
  648. .. _class_EditorPlugin_private_method__run_scene:
  649. .. rst-class:: classref-method
  650. :ref:`PackedStringArray<class_PackedStringArray>` **_run_scene**\ (\ scene\: :ref:`String<class_String>`, args\: :ref:`PackedStringArray<class_PackedStringArray>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__run_scene>`
  651. This function is called when an individual scene is about to be played in the editor. ``args`` is a list of command line arguments that will be passed to the new Godot instance, which will be replaced by the list returned by this function.
  652. ::
  653. func _run_scene(scene, args):
  654. args.append("--an-extra-argument")
  655. return args
  656. \ **Note:** Text that is printed in this method will not be visible in the editor's Output panel unless :ref:`EditorSettings.run/output/always_clear_output_on_play<class_EditorSettings_property_run/output/always_clear_output_on_play>` is ``false``.
  657. .. rst-class:: classref-item-separator
  658. ----
  659. .. _class_EditorPlugin_private_method__save_external_data:
  660. .. rst-class:: classref-method
  661. |void| **_save_external_data**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__save_external_data>`
  662. 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.
  663. .. rst-class:: classref-item-separator
  664. ----
  665. .. _class_EditorPlugin_private_method__set_state:
  666. .. rst-class:: classref-method
  667. |void| **_set_state**\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_state>`
  668. Restore the state saved by :ref:`_get_state()<class_EditorPlugin_private_method__get_state>`. This method is called when the current scene tab is changed in the editor.
  669. \ **Note:** Your plugin must implement :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>`, otherwise it will not be recognized and this method will not be called.
  670. ::
  671. func _set_state(data):
  672. zoom = data.get("zoom", 1.0)
  673. preferred_color = data.get("my_color", Color.WHITE)
  674. .. rst-class:: classref-item-separator
  675. ----
  676. .. _class_EditorPlugin_private_method__set_window_layout:
  677. .. rst-class:: classref-method
  678. |void| **_set_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_window_layout>`
  679. Restore the plugin GUI layout and data saved by :ref:`_get_window_layout()<class_EditorPlugin_private_method__get_window_layout>`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data.
  680. ::
  681. func _set_window_layout(configuration):
  682. $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2())
  683. $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.WHITE)
  684. .. rst-class:: classref-item-separator
  685. ----
  686. .. _class_EditorPlugin_method_add_autoload_singleton:
  687. .. rst-class:: classref-method
  688. |void| **add_autoload_singleton**\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_add_autoload_singleton>`
  689. Adds a script at ``path`` to the Autoload list as ``name``.
  690. .. rst-class:: classref-item-separator
  691. ----
  692. .. _class_EditorPlugin_method_add_context_menu_plugin:
  693. .. rst-class:: classref-method
  694. |void| **add_context_menu_plugin**\ (\ slot\: :ref:`ContextMenuSlot<enum_EditorContextMenuPlugin_ContextMenuSlot>`, plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_context_menu_plugin>`
  695. Adds a plugin to the context menu. ``slot`` is the context menu where the plugin will be added.
  696. \ **Note:** A plugin instance can belong only to a single context menu slot.
  697. .. rst-class:: classref-item-separator
  698. ----
  699. .. _class_EditorPlugin_method_add_control_to_bottom_panel:
  700. .. rst-class:: classref-method
  701. :ref:`Button<class_Button>` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`, title\: :ref:`String<class_String>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_bottom_panel>`
  702. **Deprecated:** Use :ref:`add_dock()<class_EditorPlugin_method_add_dock>` instead, with :ref:`EditorDock.default_slot<class_EditorDock_property_default_slot>` set to :ref:`DOCK_SLOT_BOTTOM<class_EditorPlugin_constant_DOCK_SLOT_BOTTOM>`.
  703. Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to a button that is outside the scene tree. 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>`.
  704. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier.
  705. .. rst-class:: classref-item-separator
  706. ----
  707. .. _class_EditorPlugin_method_add_control_to_container:
  708. .. rst-class:: classref-method
  709. |void| **add_control_to_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_container>`
  710. Adds a custom control to a container in the editor UI.
  711. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
  712. 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>`.
  713. .. rst-class:: classref-item-separator
  714. ----
  715. .. _class_EditorPlugin_method_add_control_to_dock:
  716. .. rst-class:: classref-method
  717. |void| **add_control_to_dock**\ (\ slot\: :ref:`DockSlot<enum_EditorPlugin_DockSlot>`, control\: :ref:`Control<class_Control>`, shortcut\: :ref:`Shortcut<class_Shortcut>` = null\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_dock>`
  718. **Deprecated:** Use :ref:`add_dock()<class_EditorPlugin_method_add_dock>` instead.
  719. Adds the control to a specific dock slot.
  720. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
  721. 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>`.
  722. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will open and focus the dock.
  723. .. rst-class:: classref-item-separator
  724. ----
  725. .. _class_EditorPlugin_method_add_custom_type:
  726. .. rst-class:: classref-method
  727. |void| **add_custom_type**\ (\ type\: :ref:`String<class_String>`, base\: :ref:`String<class_String>`, script\: :ref:`Script<class_Script>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_add_custom_type>`
  728. Adds a custom type, which will appear in the list of nodes or resources.
  729. 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.
  730. \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes.
  731. You can use the virtual method :ref:`_handles()<class_EditorPlugin_private_method__handles>` to check if your custom object is being edited by checking the script or using the ``is`` keyword.
  732. During run-time, this will be a simple object with a script so this function does not need to be called then.
  733. \ **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script.
  734. .. rst-class:: classref-item-separator
  735. ----
  736. .. _class_EditorPlugin_method_add_debugger_plugin:
  737. .. rst-class:: classref-method
  738. |void| **add_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_debugger_plugin>`
  739. Adds a :ref:`Script<class_Script>` as debugger plugin to the Debugger. The script must extend :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`.
  740. .. rst-class:: classref-item-separator
  741. ----
  742. .. _class_EditorPlugin_method_add_dock:
  743. .. rst-class:: classref-method
  744. |void| **add_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_add_dock>`
  745. Adds a new dock.
  746. When your plugin is deactivated, make sure to remove your custom dock with :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` and free it with :ref:`Node.queue_free()<class_Node_method_queue_free>`.
  747. .. rst-class:: classref-item-separator
  748. ----
  749. .. _class_EditorPlugin_method_add_export_platform:
  750. .. rst-class:: classref-method
  751. |void| **add_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_platform>`
  752. Registers a new :ref:`EditorExportPlatform<class_EditorExportPlatform>`. Export platforms provides functionality of exporting to the specific platform.
  753. .. rst-class:: classref-item-separator
  754. ----
  755. .. _class_EditorPlugin_method_add_export_plugin:
  756. .. rst-class:: classref-method
  757. |void| **add_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_plugin>`
  758. Registers a new :ref:`EditorExportPlugin<class_EditorExportPlugin>`. Export plugins are used to perform tasks when the project is being exported.
  759. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  760. .. rst-class:: classref-item-separator
  761. ----
  762. .. _class_EditorPlugin_method_add_import_plugin:
  763. .. rst-class:: classref-method
  764. |void| **add_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_import_plugin>`
  765. 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.
  766. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  767. \ **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.
  768. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  769. .. rst-class:: classref-item-separator
  770. ----
  771. .. _class_EditorPlugin_method_add_inspector_plugin:
  772. .. rst-class:: classref-method
  773. |void| **add_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_inspector_plugin>`
  774. 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.
  775. \ **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.
  776. .. tabs::
  777. .. code-tab:: gdscript
  778. const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
  779. var inspector_plugin = MyInspectorPlugin.new()
  780. func _enter_tree():
  781. add_inspector_plugin(inspector_plugin)
  782. func _exit_tree():
  783. remove_inspector_plugin(inspector_plugin)
  784. .. rst-class:: classref-item-separator
  785. ----
  786. .. _class_EditorPlugin_method_add_node_3d_gizmo_plugin:
  787. .. rst-class:: classref-method
  788. |void| **add_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`
  789. 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>`.
  790. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  791. .. rst-class:: classref-item-separator
  792. ----
  793. .. _class_EditorPlugin_method_add_resource_conversion_plugin:
  794. .. rst-class:: classref-method
  795. |void| **add_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_resource_conversion_plugin>`
  796. Registers a new :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`. Resource conversion plugins are used to add custom resource converters to the editor inspector.
  797. See :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` for an example of how to create a resource conversion plugin.
  798. .. rst-class:: classref-item-separator
  799. ----
  800. .. _class_EditorPlugin_method_add_scene_format_importer_plugin:
  801. .. rst-class:: classref-method
  802. |void| **add_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_format_importer_plugin>`
  803. Registers a new :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`. Scene importers are used to import custom 3D asset formats as scenes.
  804. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  805. .. rst-class:: classref-item-separator
  806. ----
  807. .. _class_EditorPlugin_method_add_scene_post_import_plugin:
  808. .. rst-class:: classref-method
  809. |void| **add_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_scene_post_import_plugin>`
  810. Add an :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
  811. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  812. .. rst-class:: classref-item-separator
  813. ----
  814. .. _class_EditorPlugin_method_add_tool_menu_item:
  815. .. rst-class:: classref-method
  816. |void| **add_tool_menu_item**\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_menu_item>`
  817. Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the provided ``callable`` will be called.
  818. .. rst-class:: classref-item-separator
  819. ----
  820. .. _class_EditorPlugin_method_add_tool_submenu_item:
  821. .. rst-class:: classref-method
  822. |void| **add_tool_submenu_item**\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_submenu_item>`
  823. Adds a custom :ref:`PopupMenu<class_PopupMenu>` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item()<class_EditorPlugin_method_remove_tool_menu_item>` on plugin clean up to remove the menu.
  824. .. rst-class:: classref-item-separator
  825. ----
  826. .. _class_EditorPlugin_method_add_translation_parser_plugin:
  827. .. rst-class:: classref-method
  828. |void| **add_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_translation_parser_plugin>`
  829. Registers a custom translation parser plugin for extracting translatable strings from custom files.
  830. .. rst-class:: classref-item-separator
  831. ----
  832. .. _class_EditorPlugin_method_add_undo_redo_inspector_hook_callback:
  833. .. rst-class:: classref-method
  834. |void| **add_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`
  835. 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.
  836. 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.
  837. .. rst-class:: classref-item-separator
  838. ----
  839. .. _class_EditorPlugin_method_get_editor_interface:
  840. .. rst-class:: classref-method
  841. :ref:`EditorInterface<class_EditorInterface>` **get_editor_interface**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_editor_interface>`
  842. **Deprecated:** :ref:`EditorInterface<class_EditorInterface>` is a global singleton and can be accessed directly by its name.
  843. Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance.
  844. .. rst-class:: classref-item-separator
  845. ----
  846. .. _class_EditorPlugin_method_get_export_as_menu:
  847. .. rst-class:: classref-method
  848. :ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_export_as_menu>`
  849. Returns the :ref:`PopupMenu<class_PopupMenu>` under **Scene > Export As...**.
  850. .. rst-class:: classref-item-separator
  851. ----
  852. .. _class_EditorPlugin_method_get_plugin_version:
  853. .. rst-class:: classref-method
  854. :ref:`String<class_String>` **get_plugin_version**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_get_plugin_version>`
  855. Provide the version of the plugin declared in the ``plugin.cfg`` config file.
  856. .. rst-class:: classref-item-separator
  857. ----
  858. .. _class_EditorPlugin_method_get_script_create_dialog:
  859. .. rst-class:: classref-method
  860. :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_script_create_dialog>`
  861. Gets the Editor's dialog used for making scripts.
  862. \ **Note:** Users can configure it before use.
  863. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  864. .. rst-class:: classref-item-separator
  865. ----
  866. .. _class_EditorPlugin_method_get_undo_redo:
  867. .. rst-class:: classref-method
  868. :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_undo_redo>`
  869. 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.
  870. .. rst-class:: classref-item-separator
  871. ----
  872. .. _class_EditorPlugin_method_hide_bottom_panel:
  873. .. rst-class:: classref-method
  874. |void| **hide_bottom_panel**\ (\ ) :ref:`🔗<class_EditorPlugin_method_hide_bottom_panel>`
  875. Minimizes the bottom panel.
  876. .. rst-class:: classref-item-separator
  877. ----
  878. .. _class_EditorPlugin_method_make_bottom_panel_item_visible:
  879. .. rst-class:: classref-method
  880. |void| **make_bottom_panel_item_visible**\ (\ item\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_make_bottom_panel_item_visible>`
  881. Makes a specific item in the bottom panel visible.
  882. .. rst-class:: classref-item-separator
  883. ----
  884. .. _class_EditorPlugin_method_queue_save_layout:
  885. .. rst-class:: classref-method
  886. |void| **queue_save_layout**\ (\ ) :ref:`🔗<class_EditorPlugin_method_queue_save_layout>`
  887. Queue save the project's editor layout.
  888. .. rst-class:: classref-item-separator
  889. ----
  890. .. _class_EditorPlugin_method_remove_autoload_singleton:
  891. .. rst-class:: classref-method
  892. |void| **remove_autoload_singleton**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_autoload_singleton>`
  893. Removes an Autoload ``name`` from the list.
  894. .. rst-class:: classref-item-separator
  895. ----
  896. .. _class_EditorPlugin_method_remove_context_menu_plugin:
  897. .. rst-class:: classref-method
  898. |void| **remove_context_menu_plugin**\ (\ plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_context_menu_plugin>`
  899. Removes the specified context menu plugin.
  900. .. rst-class:: classref-item-separator
  901. ----
  902. .. _class_EditorPlugin_method_remove_control_from_bottom_panel:
  903. .. rst-class:: classref-method
  904. |void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_bottom_panel>`
  905. **Deprecated:** Use :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` instead.
  906. Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free()<class_Node_method_queue_free>` the control.
  907. .. rst-class:: classref-item-separator
  908. ----
  909. .. _class_EditorPlugin_method_remove_control_from_container:
  910. .. rst-class:: classref-method
  911. |void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_container>`
  912. Removes the control from the specified container. You have to manually :ref:`Node.queue_free()<class_Node_method_queue_free>` the control.
  913. .. rst-class:: classref-item-separator
  914. ----
  915. .. _class_EditorPlugin_method_remove_control_from_docks:
  916. .. rst-class:: classref-method
  917. |void| **remove_control_from_docks**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_docks>`
  918. **Deprecated:** Use :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` instead.
  919. Removes the control from the dock. You have to manually :ref:`Node.queue_free()<class_Node_method_queue_free>` the control.
  920. .. rst-class:: classref-item-separator
  921. ----
  922. .. _class_EditorPlugin_method_remove_custom_type:
  923. .. rst-class:: classref-method
  924. |void| **remove_custom_type**\ (\ type\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_custom_type>`
  925. Removes a custom type added by :ref:`add_custom_type()<class_EditorPlugin_method_add_custom_type>`.
  926. .. rst-class:: classref-item-separator
  927. ----
  928. .. _class_EditorPlugin_method_remove_debugger_plugin:
  929. .. rst-class:: classref-method
  930. |void| **remove_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_debugger_plugin>`
  931. Removes the debugger plugin with given script from the Debugger.
  932. .. rst-class:: classref-item-separator
  933. ----
  934. .. _class_EditorPlugin_method_remove_dock:
  935. .. rst-class:: classref-method
  936. |void| **remove_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_dock>`
  937. Removes ``dock`` from the available docks. You should manually call :ref:`Node.queue_free()<class_Node_method_queue_free>` to free it.
  938. .. rst-class:: classref-item-separator
  939. ----
  940. .. _class_EditorPlugin_method_remove_export_platform:
  941. .. rst-class:: classref-method
  942. |void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_platform>`
  943. Removes an export platform registered by :ref:`add_export_platform()<class_EditorPlugin_method_add_export_platform>`.
  944. .. rst-class:: classref-item-separator
  945. ----
  946. .. _class_EditorPlugin_method_remove_export_plugin:
  947. .. rst-class:: classref-method
  948. |void| **remove_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_plugin>`
  949. Removes an export plugin registered by :ref:`add_export_plugin()<class_EditorPlugin_method_add_export_plugin>`.
  950. .. rst-class:: classref-item-separator
  951. ----
  952. .. _class_EditorPlugin_method_remove_import_plugin:
  953. .. rst-class:: classref-method
  954. |void| **remove_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_import_plugin>`
  955. Removes an import plugin registered by :ref:`add_import_plugin()<class_EditorPlugin_method_add_import_plugin>`.
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _class_EditorPlugin_method_remove_inspector_plugin:
  959. .. rst-class:: classref-method
  960. |void| **remove_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_inspector_plugin>`
  961. Removes an inspector plugin registered by :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>`.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_EditorPlugin_method_remove_node_3d_gizmo_plugin:
  965. .. rst-class:: classref-method
  966. |void| **remove_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`
  967. Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin()<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`.
  968. .. rst-class:: classref-item-separator
  969. ----
  970. .. _class_EditorPlugin_method_remove_resource_conversion_plugin:
  971. .. rst-class:: classref-method
  972. |void| **remove_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_resource_conversion_plugin>`
  973. Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin()<class_EditorPlugin_method_add_resource_conversion_plugin>`.
  974. .. rst-class:: classref-item-separator
  975. ----
  976. .. _class_EditorPlugin_method_remove_scene_format_importer_plugin:
  977. .. rst-class:: classref-method
  978. |void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_format_importer_plugin>`
  979. Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin()<class_EditorPlugin_method_add_scene_format_importer_plugin>`.
  980. .. rst-class:: classref-item-separator
  981. ----
  982. .. _class_EditorPlugin_method_remove_scene_post_import_plugin:
  983. .. rst-class:: classref-method
  984. |void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_post_import_plugin>`
  985. Remove the :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, added with :ref:`add_scene_post_import_plugin()<class_EditorPlugin_method_add_scene_post_import_plugin>`.
  986. .. rst-class:: classref-item-separator
  987. ----
  988. .. _class_EditorPlugin_method_remove_tool_menu_item:
  989. .. rst-class:: classref-method
  990. |void| **remove_tool_menu_item**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_tool_menu_item>`
  991. Removes a menu ``name`` from **Project > Tools**.
  992. .. rst-class:: classref-item-separator
  993. ----
  994. .. _class_EditorPlugin_method_remove_translation_parser_plugin:
  995. .. rst-class:: classref-method
  996. |void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_translation_parser_plugin>`
  997. Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin()<class_EditorPlugin_method_add_translation_parser_plugin>`.
  998. .. rst-class:: classref-item-separator
  999. ----
  1000. .. _class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback:
  1001. .. rst-class:: classref-method
  1002. |void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`
  1003. Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback()<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`.
  1004. .. rst-class:: classref-item-separator
  1005. ----
  1006. .. _class_EditorPlugin_method_set_dock_tab_icon:
  1007. .. rst-class:: classref-method
  1008. |void| **set_dock_tab_icon**\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_set_dock_tab_icon>`
  1009. **Deprecated:** Use :ref:`EditorDock.dock_icon<class_EditorDock_property_dock_icon>` instead.
  1010. Sets the tab icon for the given control in a dock slot. Setting to ``null`` removes the icon.
  1011. .. rst-class:: classref-item-separator
  1012. ----
  1013. .. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled:
  1014. .. rst-class:: classref-method
  1015. |void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`
  1016. Enables calling of :ref:`_forward_canvas_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport()<class_EditorPlugin_private_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.
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_EditorPlugin_method_set_input_event_forwarding_always_enabled:
  1020. .. rst-class:: classref-method
  1021. |void| **set_input_event_forwarding_always_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`
  1022. Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input()<class_EditorPlugin_private_method__forward_3d_gui_input>`. It might be especially usable if your plugin will want to use raycast in the scene.
  1023. .. rst-class:: classref-item-separator
  1024. ----
  1025. .. _class_EditorPlugin_method_update_overlays:
  1026. .. rst-class:: classref-method
  1027. :ref:`int<class_int>` **update_overlays**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_update_overlays>`
  1028. Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`, :ref:`_forward_canvas_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport>`, :ref:`_forward_3d_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>` and :ref:`_forward_3d_force_draw_over_viewport()<class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport>` to be called.
  1029. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1030. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  1031. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1032. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1033. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1034. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1035. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1036. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1037. .. |void| replace:: :abbr:`void (No return value.)`