class_editorplugin.rst 109 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806
  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_MAX:
  317. .. rst-class:: classref-enumeration-constant
  318. :ref:`DockSlot<enum_EditorPlugin_DockSlot>` **DOCK_SLOT_MAX** = ``8``
  319. Represents the size of the :ref:`DockSlot<enum_EditorPlugin_DockSlot>` enum.
  320. .. rst-class:: classref-item-separator
  321. ----
  322. .. _enum_EditorPlugin_AfterGUIInput:
  323. .. rst-class:: classref-enumeration
  324. enum **AfterGUIInput**: :ref:`🔗<enum_EditorPlugin_AfterGUIInput>`
  325. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_PASS:
  326. .. rst-class:: classref-enumeration-constant
  327. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_PASS** = ``0``
  328. Forwards the :ref:`InputEvent<class_InputEvent>` to other EditorPlugins.
  329. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_STOP:
  330. .. rst-class:: classref-enumeration-constant
  331. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_STOP** = ``1``
  332. Prevents the :ref:`InputEvent<class_InputEvent>` from reaching other Editor classes.
  333. .. _class_EditorPlugin_constant_AFTER_GUI_INPUT_CUSTOM:
  334. .. rst-class:: classref-enumeration-constant
  335. :ref:`AfterGUIInput<enum_EditorPlugin_AfterGUIInput>` **AFTER_GUI_INPUT_CUSTOM** = ``2``
  336. 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.
  337. .. rst-class:: classref-section-separator
  338. ----
  339. .. rst-class:: classref-descriptions-group
  340. Method Descriptions
  341. -------------------
  342. .. _class_EditorPlugin_private_method__apply_changes:
  343. .. rst-class:: classref-method
  344. |void| **_apply_changes**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__apply_changes>`
  345. 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.
  346. 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.
  347. .. rst-class:: classref-item-separator
  348. ----
  349. .. _class_EditorPlugin_private_method__build:
  350. .. rst-class:: classref-method
  351. :ref:`bool<class_bool>` **_build**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__build>`
  352. This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs.
  353. 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.
  354. .. rst-class:: classref-item-separator
  355. ----
  356. .. _class_EditorPlugin_private_method__clear:
  357. .. rst-class:: classref-method
  358. |void| **_clear**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__clear>`
  359. 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.
  360. .. rst-class:: classref-item-separator
  361. ----
  362. .. _class_EditorPlugin_private_method__disable_plugin:
  363. .. rst-class:: classref-method
  364. |void| **_disable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__disable_plugin>`
  365. Called by the engine when the user disables the **EditorPlugin** in the Plugin tab of the project settings window.
  366. .. rst-class:: classref-item-separator
  367. ----
  368. .. _class_EditorPlugin_private_method__edit:
  369. .. rst-class:: classref-method
  370. |void| **_edit**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__edit>`
  371. This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object.
  372. \ ``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.
  373. .. rst-class:: classref-item-separator
  374. ----
  375. .. _class_EditorPlugin_private_method__enable_plugin:
  376. .. rst-class:: classref-method
  377. |void| **_enable_plugin**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__enable_plugin>`
  378. Called by the engine when the user enables the **EditorPlugin** in the Plugin tab of the project settings window.
  379. .. rst-class:: classref-item-separator
  380. ----
  381. .. _class_EditorPlugin_private_method__forward_3d_draw_over_viewport:
  382. .. rst-class:: classref-method
  383. |void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_3d_draw_over_viewport>`
  384. 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>`.
  385. .. tabs::
  386. .. code-tab:: gdscript
  387. func _forward_3d_draw_over_viewport(overlay):
  388. # Draw a circle at the cursor's position.
  389. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
  390. func _forward_3d_gui_input(camera, event):
  391. if event is InputEventMouseMotion:
  392. # Redraw the viewport when the cursor is moved.
  393. update_overlays()
  394. return EditorPlugin.AFTER_GUI_INPUT_STOP
  395. return EditorPlugin.AFTER_GUI_INPUT_PASS
  396. .. code-tab:: csharp
  397. public override void _Forward3DDrawOverViewport(Control viewportControl)
  398. {
  399. // Draw a circle at the cursor's position.
  400. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  401. }
  402. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event)
  403. {
  404. if (@event is InputEventMouseMotion)
  405. {
  406. // Redraw the viewport when the cursor is moved.
  407. UpdateOverlays();
  408. return EditorPlugin.AfterGuiInput.Stop;
  409. }
  410. return EditorPlugin.AfterGuiInput.Pass;
  411. }
  412. .. rst-class:: classref-item-separator
  413. ----
  414. .. _class_EditorPlugin_private_method__forward_3d_force_draw_over_viewport:
  415. .. rst-class:: classref-method
  416. |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>`
  417. 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.
  418. 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>`.
  419. .. rst-class:: classref-item-separator
  420. ----
  421. .. _class_EditorPlugin_private_method__forward_3d_gui_input:
  422. .. rst-class:: classref-method
  423. :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>`
  424. 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.
  425. .. tabs::
  426. .. code-tab:: gdscript
  427. # Prevents the InputEvent from reaching other Editor classes.
  428. func _forward_3d_gui_input(camera, event):
  429. return EditorPlugin.AFTER_GUI_INPUT_STOP
  430. .. code-tab:: csharp
  431. // Prevents the InputEvent from reaching other Editor classes.
  432. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  433. {
  434. return EditorPlugin.AfterGuiInput.Stop;
  435. }
  436. 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.
  437. .. tabs::
  438. .. code-tab:: gdscript
  439. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  440. func _forward_3d_gui_input(camera, event):
  441. return EditorPlugin.AFTER_GUI_INPUT_STOP if event is InputEventMouseMotion else EditorPlugin.AFTER_GUI_INPUT_PASS
  442. .. code-tab:: csharp
  443. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  444. public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D camera, InputEvent @event)
  445. {
  446. return @event is InputEventMouseMotion ? EditorPlugin.AfterGuiInput.Stop : EditorPlugin.AfterGuiInput.Pass;
  447. }
  448. .. rst-class:: classref-item-separator
  449. ----
  450. .. _class_EditorPlugin_private_method__forward_canvas_draw_over_viewport:
  451. .. rst-class:: classref-method
  452. |void| **_forward_canvas_draw_over_viewport**\ (\ viewport_control\: :ref:`Control<class_Control>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_draw_over_viewport>`
  453. 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>`.
  454. .. tabs::
  455. .. code-tab:: gdscript
  456. func _forward_canvas_draw_over_viewport(overlay):
  457. # Draw a circle at the cursor's position.
  458. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE)
  459. func _forward_canvas_gui_input(event):
  460. if event is InputEventMouseMotion:
  461. # Redraw the viewport when the cursor is moved.
  462. update_overlays()
  463. return true
  464. return false
  465. .. code-tab:: csharp
  466. public override void _ForwardCanvasDrawOverViewport(Control viewportControl)
  467. {
  468. // Draw a circle at the cursor's position.
  469. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White);
  470. }
  471. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  472. {
  473. if (@event is InputEventMouseMotion)
  474. {
  475. // Redraw the viewport when the cursor is moved.
  476. UpdateOverlays();
  477. return true;
  478. }
  479. return false;
  480. }
  481. .. rst-class:: classref-item-separator
  482. ----
  483. .. _class_EditorPlugin_private_method__forward_canvas_force_draw_over_viewport:
  484. .. rst-class:: classref-method
  485. |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>`
  486. 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.
  487. 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>`.
  488. .. rst-class:: classref-item-separator
  489. ----
  490. .. _class_EditorPlugin_private_method__forward_canvas_gui_input:
  491. .. rst-class:: classref-method
  492. :ref:`bool<class_bool>` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent<class_InputEvent>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__forward_canvas_gui_input>`
  493. 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.
  494. .. tabs::
  495. .. code-tab:: gdscript
  496. # Prevents the InputEvent from reaching other Editor classes.
  497. func _forward_canvas_gui_input(event):
  498. return true
  499. .. code-tab:: csharp
  500. // Prevents the InputEvent from reaching other Editor classes.
  501. public override bool ForwardCanvasGuiInput(InputEvent @event)
  502. {
  503. return true;
  504. }
  505. This method must return ``false`` in order to forward the :ref:`InputEvent<class_InputEvent>` to other Editor classes.
  506. .. tabs::
  507. .. code-tab:: gdscript
  508. # Consumes InputEventMouseMotion and forwards other InputEvent types.
  509. func _forward_canvas_gui_input(event):
  510. if (event is InputEventMouseMotion):
  511. return true
  512. return false
  513. .. code-tab:: csharp
  514. // Consumes InputEventMouseMotion and forwards other InputEvent types.
  515. public override bool _ForwardCanvasGuiInput(InputEvent @event)
  516. {
  517. if (@event is InputEventMouseMotion)
  518. {
  519. return true;
  520. }
  521. return false;
  522. }
  523. .. rst-class:: classref-item-separator
  524. ----
  525. .. _class_EditorPlugin_private_method__get_breakpoints:
  526. .. rst-class:: classref-method
  527. :ref:`PackedStringArray<class_PackedStringArray>` **_get_breakpoints**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_breakpoints>`
  528. 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``.
  529. .. rst-class:: classref-item-separator
  530. ----
  531. .. _class_EditorPlugin_private_method__get_plugin_icon:
  532. .. rst-class:: classref-method
  533. :ref:`Texture2D<class_Texture2D>` **_get_plugin_icon**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_icon>`
  534. Override this method in your plugin to return a :ref:`Texture2D<class_Texture2D>` in order to give it an icon.
  535. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
  536. Ideally, the plugin icon should be white with a transparent background and 16×16 pixels in size.
  537. .. tabs::
  538. .. code-tab:: gdscript
  539. func _get_plugin_icon():
  540. # You can use a custom icon:
  541. return preload("res://addons/my_plugin/my_plugin_icon.svg")
  542. # Or use a built-in icon:
  543. return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
  544. .. code-tab:: csharp
  545. public override Texture2D _GetPluginIcon()
  546. {
  547. // You can use a custom icon:
  548. return ResourceLoader.Load<Texture2D>("res://addons/my_plugin/my_plugin_icon.svg");
  549. // Or use a built-in icon:
  550. return EditorInterface.Singleton.GetEditorTheme().GetIcon("Node", "EditorIcons");
  551. }
  552. .. rst-class:: classref-item-separator
  553. ----
  554. .. _class_EditorPlugin_private_method__get_plugin_name:
  555. .. rst-class:: classref-method
  556. :ref:`String<class_String>` **_get_plugin_name**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_plugin_name>`
  557. Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor.
  558. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons.
  559. .. rst-class:: classref-item-separator
  560. ----
  561. .. _class_EditorPlugin_private_method__get_state:
  562. .. rst-class:: classref-method
  563. :ref:`Dictionary<class_Dictionary>` **_get_state**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_state>`
  564. 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.
  565. Use :ref:`_set_state()<class_EditorPlugin_private_method__set_state>` to restore your saved state.
  566. \ **Note:** This method should not be used to save important settings that should persist with the project.
  567. \ **Note:** You must implement :ref:`_get_plugin_name()<class_EditorPlugin_private_method__get_plugin_name>` for the state to be stored and restored correctly.
  568. ::
  569. func _get_state():
  570. var state = { "zoom": zoom, "preferred_color": my_color }
  571. return state
  572. .. rst-class:: classref-item-separator
  573. ----
  574. .. _class_EditorPlugin_private_method__get_unsaved_status:
  575. .. rst-class:: classref-method
  576. :ref:`String<class_String>` **_get_unsaved_status**\ (\ for_scene\: :ref:`String<class_String>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__get_unsaved_status>`
  577. 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.
  578. 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.
  579. If the user confirms saving, :ref:`_save_external_data()<class_EditorPlugin_private_method__save_external_data>` will be called, before closing the editor.
  580. ::
  581. func _get_unsaved_status(for_scene):
  582. if not unsaved:
  583. return ""
  584. if for_scene.is_empty():
  585. return "Save changes in MyCustomPlugin before closing?"
  586. else:
  587. return "Scene %s has changes from MyCustomPlugin. Save before closing?" % for_scene.get_file()
  588. func _save_external_data():
  589. unsaved = false
  590. If the plugin has no scene-specific changes, you can ignore the calls when closing scenes:
  591. ::
  592. func _get_unsaved_status(for_scene):
  593. if not for_scene.is_empty():
  594. return ""
  595. .. rst-class:: classref-item-separator
  596. ----
  597. .. _class_EditorPlugin_private_method__get_window_layout:
  598. .. rst-class:: classref-method
  599. |void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__get_window_layout>`
  600. 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.
  601. Use :ref:`_set_window_layout()<class_EditorPlugin_private_method__set_window_layout>` to restore your saved layout.
  602. ::
  603. func _get_window_layout(configuration):
  604. configuration.set_value("MyPlugin", "window_position", $Window.position)
  605. configuration.set_value("MyPlugin", "icon_color", $Icon.modulate)
  606. .. rst-class:: classref-item-separator
  607. ----
  608. .. _class_EditorPlugin_private_method__handles:
  609. .. rst-class:: classref-method
  610. :ref:`bool<class_bool>` **_handles**\ (\ object\: :ref:`Object<class_Object>`\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__handles>`
  611. 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.
  612. \ **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.
  613. .. rst-class:: classref-item-separator
  614. ----
  615. .. _class_EditorPlugin_private_method__has_main_screen:
  616. .. rst-class:: classref-method
  617. :ref:`bool<class_bool>` **_has_main_screen**\ (\ ) |virtual| |const| :ref:`🔗<class_EditorPlugin_private_method__has_main_screen>`
  618. Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script**, **Game**, and **AssetLib**).
  619. 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>`.
  620. 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.
  621. ::
  622. var plugin_control
  623. func _enter_tree():
  624. plugin_control = preload("my_plugin_control.tscn").instantiate()
  625. EditorInterface.get_editor_main_screen().add_child(plugin_control)
  626. plugin_control.hide()
  627. func _has_main_screen():
  628. return true
  629. func _make_visible(visible):
  630. plugin_control.visible = visible
  631. func _get_plugin_name():
  632. return "My Super Cool Plugin 3000"
  633. func _get_plugin_icon():
  634. return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")
  635. .. rst-class:: classref-item-separator
  636. ----
  637. .. _class_EditorPlugin_private_method__make_visible:
  638. .. rst-class:: classref-method
  639. |void| **_make_visible**\ (\ visible\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__make_visible>`
  640. This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type.
  641. Remember that you have to manage the visibility of all your editor controls manually.
  642. .. rst-class:: classref-item-separator
  643. ----
  644. .. _class_EditorPlugin_private_method__run_scene:
  645. .. rst-class:: classref-method
  646. :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>`
  647. 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.
  648. ::
  649. func _run_scene(scene, args):
  650. args.append("--an-extra-argument")
  651. return args
  652. \ **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``.
  653. .. rst-class:: classref-item-separator
  654. ----
  655. .. _class_EditorPlugin_private_method__save_external_data:
  656. .. rst-class:: classref-method
  657. |void| **_save_external_data**\ (\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__save_external_data>`
  658. 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.
  659. .. rst-class:: classref-item-separator
  660. ----
  661. .. _class_EditorPlugin_private_method__set_state:
  662. .. rst-class:: classref-method
  663. |void| **_set_state**\ (\ state\: :ref:`Dictionary<class_Dictionary>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_state>`
  664. 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.
  665. \ **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.
  666. ::
  667. func _set_state(data):
  668. zoom = data.get("zoom", 1.0)
  669. preferred_color = data.get("my_color", Color.WHITE)
  670. .. rst-class:: classref-item-separator
  671. ----
  672. .. _class_EditorPlugin_private_method__set_window_layout:
  673. .. rst-class:: classref-method
  674. |void| **_set_window_layout**\ (\ configuration\: :ref:`ConfigFile<class_ConfigFile>`\ ) |virtual| :ref:`🔗<class_EditorPlugin_private_method__set_window_layout>`
  675. 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.
  676. ::
  677. func _set_window_layout(configuration):
  678. $Window.position = configuration.get_value("MyPlugin", "window_position", Vector2())
  679. $Icon.modulate = configuration.get_value("MyPlugin", "icon_color", Color.WHITE)
  680. .. rst-class:: classref-item-separator
  681. ----
  682. .. _class_EditorPlugin_method_add_autoload_singleton:
  683. .. rst-class:: classref-method
  684. |void| **add_autoload_singleton**\ (\ name\: :ref:`String<class_String>`, path\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_add_autoload_singleton>`
  685. Adds a script at ``path`` to the Autoload list as ``name``.
  686. .. rst-class:: classref-item-separator
  687. ----
  688. .. _class_EditorPlugin_method_add_context_menu_plugin:
  689. .. rst-class:: classref-method
  690. |void| **add_context_menu_plugin**\ (\ slot\: :ref:`ContextMenuSlot<enum_EditorContextMenuPlugin_ContextMenuSlot>`, plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_context_menu_plugin>`
  691. Adds a plugin to the context menu. ``slot`` is the context menu where the plugin will be added.
  692. \ **Note:** A plugin instance can belong only to a single context menu slot.
  693. .. rst-class:: classref-item-separator
  694. ----
  695. .. _class_EditorPlugin_method_add_control_to_bottom_panel:
  696. .. rst-class:: classref-method
  697. :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>`
  698. Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel()<class_EditorPlugin_method_remove_control_from_bottom_panel>` and free it with :ref:`Node.queue_free()<class_Node_method_queue_free>`.
  699. 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.
  700. .. rst-class:: classref-item-separator
  701. ----
  702. .. _class_EditorPlugin_method_add_control_to_container:
  703. .. rst-class:: classref-method
  704. |void| **add_control_to_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_add_control_to_container>`
  705. Adds a custom control to a container in the editor UI.
  706. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it).
  707. 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>`.
  708. .. rst-class:: classref-item-separator
  709. ----
  710. .. _class_EditorPlugin_method_add_control_to_dock:
  711. .. rst-class:: classref-method
  712. |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>`
  713. **Deprecated:** Use :ref:`add_dock()<class_EditorPlugin_method_add_dock>` instead.
  714. Adds the control to a specific dock slot.
  715. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions.
  716. 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>`.
  717. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will open and focus the dock.
  718. .. rst-class:: classref-item-separator
  719. ----
  720. .. _class_EditorPlugin_method_add_custom_type:
  721. .. rst-class:: classref-method
  722. |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>`
  723. Adds a custom type, which will appear in the list of nodes or resources.
  724. 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.
  725. \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes.
  726. 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.
  727. During run-time, this will be a simple object with a script so this function does not need to be called then.
  728. \ **Note:** Custom types added this way are not true classes. They are just a helper to create a node with specific script.
  729. .. rst-class:: classref-item-separator
  730. ----
  731. .. _class_EditorPlugin_method_add_debugger_plugin:
  732. .. rst-class:: classref-method
  733. |void| **add_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_debugger_plugin>`
  734. Adds a :ref:`Script<class_Script>` as debugger plugin to the Debugger. The script must extend :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`.
  735. .. rst-class:: classref-item-separator
  736. ----
  737. .. _class_EditorPlugin_method_add_dock:
  738. .. rst-class:: classref-method
  739. |void| **add_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_add_dock>`
  740. Adds a new dock.
  741. 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>`.
  742. .. rst-class:: classref-item-separator
  743. ----
  744. .. _class_EditorPlugin_method_add_export_platform:
  745. .. rst-class:: classref-method
  746. |void| **add_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_platform>`
  747. Registers a new :ref:`EditorExportPlatform<class_EditorExportPlatform>`. Export platforms provides functionality of exporting to the specific platform.
  748. .. rst-class:: classref-item-separator
  749. ----
  750. .. _class_EditorPlugin_method_add_export_plugin:
  751. .. rst-class:: classref-method
  752. |void| **add_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_export_plugin>`
  753. Registers a new :ref:`EditorExportPlugin<class_EditorExportPlugin>`. Export plugins are used to perform tasks when the project is being exported.
  754. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  755. .. rst-class:: classref-item-separator
  756. ----
  757. .. _class_EditorPlugin_method_add_import_plugin:
  758. .. rst-class:: classref-method
  759. |void| **add_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`, first_priority\: :ref:`bool<class_bool>` = false\ ) :ref:`🔗<class_EditorPlugin_method_add_import_plugin>`
  760. 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.
  761. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  762. \ **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.
  763. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  764. .. rst-class:: classref-item-separator
  765. ----
  766. .. _class_EditorPlugin_method_add_inspector_plugin:
  767. .. rst-class:: classref-method
  768. |void| **add_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_inspector_plugin>`
  769. 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.
  770. \ **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.
  771. .. tabs::
  772. .. code-tab:: gdscript
  773. const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd")
  774. var inspector_plugin = MyInspectorPlugin.new()
  775. func _enter_tree():
  776. add_inspector_plugin(inspector_plugin)
  777. func _exit_tree():
  778. remove_inspector_plugin(inspector_plugin)
  779. .. rst-class:: classref-item-separator
  780. ----
  781. .. _class_EditorPlugin_method_add_node_3d_gizmo_plugin:
  782. .. rst-class:: classref-method
  783. |void| **add_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`
  784. 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>`.
  785. See :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>` for an example of how to register a plugin.
  786. .. rst-class:: classref-item-separator
  787. ----
  788. .. _class_EditorPlugin_method_add_resource_conversion_plugin:
  789. .. rst-class:: classref-method
  790. |void| **add_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_resource_conversion_plugin>`
  791. Registers a new :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`. Resource conversion plugins are used to add custom resource converters to the editor inspector.
  792. See :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>` for an example of how to create a resource conversion plugin.
  793. .. rst-class:: classref-item-separator
  794. ----
  795. .. _class_EditorPlugin_method_add_scene_format_importer_plugin:
  796. .. rst-class:: classref-method
  797. |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>`
  798. Registers a new :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`. Scene importers are used to import custom 3D asset formats as scenes.
  799. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  800. .. rst-class:: classref-item-separator
  801. ----
  802. .. _class_EditorPlugin_method_add_scene_post_import_plugin:
  803. .. rst-class:: classref-method
  804. |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>`
  805. Add an :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs.
  806. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins.
  807. .. rst-class:: classref-item-separator
  808. ----
  809. .. _class_EditorPlugin_method_add_tool_menu_item:
  810. .. rst-class:: classref-method
  811. |void| **add_tool_menu_item**\ (\ name\: :ref:`String<class_String>`, callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_menu_item>`
  812. Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the provided ``callable`` will be called.
  813. .. rst-class:: classref-item-separator
  814. ----
  815. .. _class_EditorPlugin_method_add_tool_submenu_item:
  816. .. rst-class:: classref-method
  817. |void| **add_tool_submenu_item**\ (\ name\: :ref:`String<class_String>`, submenu\: :ref:`PopupMenu<class_PopupMenu>`\ ) :ref:`🔗<class_EditorPlugin_method_add_tool_submenu_item>`
  818. 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.
  819. .. rst-class:: classref-item-separator
  820. ----
  821. .. _class_EditorPlugin_method_add_translation_parser_plugin:
  822. .. rst-class:: classref-method
  823. |void| **add_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_add_translation_parser_plugin>`
  824. Registers a custom translation parser plugin for extracting translatable strings from custom files.
  825. .. rst-class:: classref-item-separator
  826. ----
  827. .. _class_EditorPlugin_method_add_undo_redo_inspector_hook_callback:
  828. .. rst-class:: classref-method
  829. |void| **add_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`
  830. 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.
  831. 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.
  832. .. rst-class:: classref-item-separator
  833. ----
  834. .. _class_EditorPlugin_method_get_editor_interface:
  835. .. rst-class:: classref-method
  836. :ref:`EditorInterface<class_EditorInterface>` **get_editor_interface**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_editor_interface>`
  837. **Deprecated:** :ref:`EditorInterface<class_EditorInterface>` is a global singleton and can be accessed directly by its name.
  838. Returns the :ref:`EditorInterface<class_EditorInterface>` singleton instance.
  839. .. rst-class:: classref-item-separator
  840. ----
  841. .. _class_EditorPlugin_method_get_export_as_menu:
  842. .. rst-class:: classref-method
  843. :ref:`PopupMenu<class_PopupMenu>` **get_export_as_menu**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_export_as_menu>`
  844. Returns the :ref:`PopupMenu<class_PopupMenu>` under **Scene > Export As...**.
  845. .. rst-class:: classref-item-separator
  846. ----
  847. .. _class_EditorPlugin_method_get_plugin_version:
  848. .. rst-class:: classref-method
  849. :ref:`String<class_String>` **get_plugin_version**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_get_plugin_version>`
  850. Provide the version of the plugin declared in the ``plugin.cfg`` config file.
  851. .. rst-class:: classref-item-separator
  852. ----
  853. .. _class_EditorPlugin_method_get_script_create_dialog:
  854. .. rst-class:: classref-method
  855. :ref:`ScriptCreateDialog<class_ScriptCreateDialog>` **get_script_create_dialog**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_script_create_dialog>`
  856. Gets the Editor's dialog used for making scripts.
  857. \ **Note:** Users can configure it before use.
  858. \ **Warning:** Removing and freeing this node will render a part of the editor useless and may cause a crash.
  859. .. rst-class:: classref-item-separator
  860. ----
  861. .. _class_EditorPlugin_method_get_undo_redo:
  862. .. rst-class:: classref-method
  863. :ref:`EditorUndoRedoManager<class_EditorUndoRedoManager>` **get_undo_redo**\ (\ ) :ref:`🔗<class_EditorPlugin_method_get_undo_redo>`
  864. 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.
  865. .. rst-class:: classref-item-separator
  866. ----
  867. .. _class_EditorPlugin_method_hide_bottom_panel:
  868. .. rst-class:: classref-method
  869. |void| **hide_bottom_panel**\ (\ ) :ref:`🔗<class_EditorPlugin_method_hide_bottom_panel>`
  870. Minimizes the bottom panel.
  871. .. rst-class:: classref-item-separator
  872. ----
  873. .. _class_EditorPlugin_method_make_bottom_panel_item_visible:
  874. .. rst-class:: classref-method
  875. |void| **make_bottom_panel_item_visible**\ (\ item\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_make_bottom_panel_item_visible>`
  876. Makes a specific item in the bottom panel visible.
  877. .. rst-class:: classref-item-separator
  878. ----
  879. .. _class_EditorPlugin_method_queue_save_layout:
  880. .. rst-class:: classref-method
  881. |void| **queue_save_layout**\ (\ ) :ref:`🔗<class_EditorPlugin_method_queue_save_layout>`
  882. Queue save the project's editor layout.
  883. .. rst-class:: classref-item-separator
  884. ----
  885. .. _class_EditorPlugin_method_remove_autoload_singleton:
  886. .. rst-class:: classref-method
  887. |void| **remove_autoload_singleton**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_autoload_singleton>`
  888. Removes an Autoload ``name`` from the list.
  889. .. rst-class:: classref-item-separator
  890. ----
  891. .. _class_EditorPlugin_method_remove_context_menu_plugin:
  892. .. rst-class:: classref-method
  893. |void| **remove_context_menu_plugin**\ (\ plugin\: :ref:`EditorContextMenuPlugin<class_EditorContextMenuPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_context_menu_plugin>`
  894. Removes the specified context menu plugin.
  895. .. rst-class:: classref-item-separator
  896. ----
  897. .. _class_EditorPlugin_method_remove_control_from_bottom_panel:
  898. .. rst-class:: classref-method
  899. |void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_bottom_panel>`
  900. Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free()<class_Node_method_queue_free>` the control.
  901. .. rst-class:: classref-item-separator
  902. ----
  903. .. _class_EditorPlugin_method_remove_control_from_container:
  904. .. rst-class:: classref-method
  905. |void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer<enum_EditorPlugin_CustomControlContainer>`, control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_container>`
  906. Removes the control from the specified container. 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_docks:
  910. .. rst-class:: classref-method
  911. |void| **remove_control_from_docks**\ (\ control\: :ref:`Control<class_Control>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_control_from_docks>`
  912. **Deprecated:** Use :ref:`remove_dock()<class_EditorPlugin_method_remove_dock>` instead.
  913. Removes the control from the dock. You have to manually :ref:`Node.queue_free()<class_Node_method_queue_free>` the control.
  914. .. rst-class:: classref-item-separator
  915. ----
  916. .. _class_EditorPlugin_method_remove_custom_type:
  917. .. rst-class:: classref-method
  918. |void| **remove_custom_type**\ (\ type\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_custom_type>`
  919. Removes a custom type added by :ref:`add_custom_type()<class_EditorPlugin_method_add_custom_type>`.
  920. .. rst-class:: classref-item-separator
  921. ----
  922. .. _class_EditorPlugin_method_remove_debugger_plugin:
  923. .. rst-class:: classref-method
  924. |void| **remove_debugger_plugin**\ (\ script\: :ref:`EditorDebuggerPlugin<class_EditorDebuggerPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_debugger_plugin>`
  925. Removes the debugger plugin with given script from the Debugger.
  926. .. rst-class:: classref-item-separator
  927. ----
  928. .. _class_EditorPlugin_method_remove_dock:
  929. .. rst-class:: classref-method
  930. |void| **remove_dock**\ (\ dock\: :ref:`EditorDock<class_EditorDock>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_dock>`
  931. Removes ``dock`` from the available docks. You should manually call :ref:`Node.queue_free()<class_Node_method_queue_free>` to free it.
  932. .. rst-class:: classref-item-separator
  933. ----
  934. .. _class_EditorPlugin_method_remove_export_platform:
  935. .. rst-class:: classref-method
  936. |void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform<class_EditorExportPlatform>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_platform>`
  937. Removes an export platform registered by :ref:`add_export_platform()<class_EditorPlugin_method_add_export_platform>`.
  938. .. rst-class:: classref-item-separator
  939. ----
  940. .. _class_EditorPlugin_method_remove_export_plugin:
  941. .. rst-class:: classref-method
  942. |void| **remove_export_plugin**\ (\ plugin\: :ref:`EditorExportPlugin<class_EditorExportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_export_plugin>`
  943. Removes an export plugin registered by :ref:`add_export_plugin()<class_EditorPlugin_method_add_export_plugin>`.
  944. .. rst-class:: classref-item-separator
  945. ----
  946. .. _class_EditorPlugin_method_remove_import_plugin:
  947. .. rst-class:: classref-method
  948. |void| **remove_import_plugin**\ (\ importer\: :ref:`EditorImportPlugin<class_EditorImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_import_plugin>`
  949. Removes an import plugin registered by :ref:`add_import_plugin()<class_EditorPlugin_method_add_import_plugin>`.
  950. .. rst-class:: classref-item-separator
  951. ----
  952. .. _class_EditorPlugin_method_remove_inspector_plugin:
  953. .. rst-class:: classref-method
  954. |void| **remove_inspector_plugin**\ (\ plugin\: :ref:`EditorInspectorPlugin<class_EditorInspectorPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_inspector_plugin>`
  955. Removes an inspector plugin registered by :ref:`add_inspector_plugin()<class_EditorPlugin_method_add_inspector_plugin>`.
  956. .. rst-class:: classref-item-separator
  957. ----
  958. .. _class_EditorPlugin_method_remove_node_3d_gizmo_plugin:
  959. .. rst-class:: classref-method
  960. |void| **remove_node_3d_gizmo_plugin**\ (\ plugin\: :ref:`EditorNode3DGizmoPlugin<class_EditorNode3DGizmoPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_node_3d_gizmo_plugin>`
  961. Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin()<class_EditorPlugin_method_add_node_3d_gizmo_plugin>`.
  962. .. rst-class:: classref-item-separator
  963. ----
  964. .. _class_EditorPlugin_method_remove_resource_conversion_plugin:
  965. .. rst-class:: classref-method
  966. |void| **remove_resource_conversion_plugin**\ (\ plugin\: :ref:`EditorResourceConversionPlugin<class_EditorResourceConversionPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_resource_conversion_plugin>`
  967. Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin()<class_EditorPlugin_method_add_resource_conversion_plugin>`.
  968. .. rst-class:: classref-item-separator
  969. ----
  970. .. _class_EditorPlugin_method_remove_scene_format_importer_plugin:
  971. .. rst-class:: classref-method
  972. |void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter<class_EditorSceneFormatImporter>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_format_importer_plugin>`
  973. Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin()<class_EditorPlugin_method_add_scene_format_importer_plugin>`.
  974. .. rst-class:: classref-item-separator
  975. ----
  976. .. _class_EditorPlugin_method_remove_scene_post_import_plugin:
  977. .. rst-class:: classref-method
  978. |void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_scene_post_import_plugin>`
  979. Remove the :ref:`EditorScenePostImportPlugin<class_EditorScenePostImportPlugin>`, added with :ref:`add_scene_post_import_plugin()<class_EditorPlugin_method_add_scene_post_import_plugin>`.
  980. .. rst-class:: classref-item-separator
  981. ----
  982. .. _class_EditorPlugin_method_remove_tool_menu_item:
  983. .. rst-class:: classref-method
  984. |void| **remove_tool_menu_item**\ (\ name\: :ref:`String<class_String>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_tool_menu_item>`
  985. Removes a menu ``name`` from **Project > Tools**.
  986. .. rst-class:: classref-item-separator
  987. ----
  988. .. _class_EditorPlugin_method_remove_translation_parser_plugin:
  989. .. rst-class:: classref-method
  990. |void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin<class_EditorTranslationParserPlugin>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_translation_parser_plugin>`
  991. Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin()<class_EditorPlugin_method_add_translation_parser_plugin>`.
  992. .. rst-class:: classref-item-separator
  993. ----
  994. .. _class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback:
  995. .. rst-class:: classref-method
  996. |void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable<class_Callable>`\ ) :ref:`🔗<class_EditorPlugin_method_remove_undo_redo_inspector_hook_callback>`
  997. Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback()<class_EditorPlugin_method_add_undo_redo_inspector_hook_callback>`.
  998. .. rst-class:: classref-item-separator
  999. ----
  1000. .. _class_EditorPlugin_method_set_dock_tab_icon:
  1001. .. rst-class:: classref-method
  1002. |void| **set_dock_tab_icon**\ (\ control\: :ref:`Control<class_Control>`, icon\: :ref:`Texture2D<class_Texture2D>`\ ) :ref:`🔗<class_EditorPlugin_method_set_dock_tab_icon>`
  1003. **Deprecated:** Use :ref:`EditorDock.dock_icon<class_EditorDock_property_dock_icon>` instead.
  1004. Sets the tab icon for the given control in a dock slot. Setting to ``null`` removes the icon.
  1005. .. rst-class:: classref-item-separator
  1006. ----
  1007. .. _class_EditorPlugin_method_set_force_draw_over_forwarding_enabled:
  1008. .. rst-class:: classref-method
  1009. |void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_force_draw_over_forwarding_enabled>`
  1010. 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.
  1011. .. rst-class:: classref-item-separator
  1012. ----
  1013. .. _class_EditorPlugin_method_set_input_event_forwarding_always_enabled:
  1014. .. rst-class:: classref-method
  1015. |void| **set_input_event_forwarding_always_enabled**\ (\ ) :ref:`🔗<class_EditorPlugin_method_set_input_event_forwarding_always_enabled>`
  1016. 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.
  1017. .. rst-class:: classref-item-separator
  1018. ----
  1019. .. _class_EditorPlugin_method_update_overlays:
  1020. .. rst-class:: classref-method
  1021. :ref:`int<class_int>` **update_overlays**\ (\ ) |const| :ref:`🔗<class_EditorPlugin_method_update_overlays>`
  1022. 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.
  1023. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  1024. .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
  1025. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  1026. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  1027. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  1028. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  1029. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  1030. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  1031. .. |void| replace:: :abbr:`void (No return value.)`