diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_node.cpp | 2 | ||||
-rw-r--r-- | editor/editor_plugin.h | 11 |
2 files changed, 6 insertions, 7 deletions
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 781b35d15b..43100ebf12 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -7033,7 +7033,7 @@ EditorNode::EditorNode() { add_editor_plugin(memnew(ControlEditorPlugin)); for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) { - add_editor_plugin(EditorPlugins::create(i, this)); + add_editor_plugin(EditorPlugins::create(i)); } for (int i = 0; i < plugin_init_callback_count; i++) { diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h index f23c5f40f6..1a5be7a89b 100644 --- a/editor/editor_plugin.h +++ b/editor/editor_plugin.h @@ -43,7 +43,6 @@ #include "scene/main/node.h" #include "scene/resources/texture.h" -class EditorNode; class Node3D; class Camera3D; class EditorCommandPalette; @@ -312,7 +311,7 @@ public: VARIANT_ENUM_CAST(EditorPlugin::CustomControlContainer); VARIANT_ENUM_CAST(EditorPlugin::DockSlot); -typedef EditorPlugin *(*EditorPluginCreateFunc)(EditorNode *); +typedef EditorPlugin *(*EditorPluginCreateFunc)(); class EditorPlugins { enum { @@ -323,15 +322,15 @@ class EditorPlugins { static int creation_func_count; template <class T> - static EditorPlugin *creator(EditorNode *p_node) { - return memnew(T(p_node)); + static EditorPlugin *creator() { + return memnew(T); } public: static int get_plugin_count() { return creation_func_count; } - static EditorPlugin *create(int p_idx, EditorNode *p_editor) { + static EditorPlugin *create(int p_idx) { ERR_FAIL_INDEX_V(p_idx, creation_func_count, nullptr); - return creation_funcs[p_idx](p_editor); + return creation_funcs[p_idx](); } template <class T> |