class_editorplugin.rst 105 KB

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