1
0
mirror of https://github.com/godotengine/godot.git synced 2025-12-03 16:55:53 +00:00

Cleanup EditorPluginList

- Removes unused / unnecessary methods.
- Removes the `Object` parent. No `Object` features are used by this class.
- Makes the actual list a `LocalVector` instead of a `Vector`. It's not shared.
- Moves the class into a separate file. `editor_node.{h,cpp}` are bloated.
- Simplify some call sites of `EditorPluginList` methods.
This commit is contained in:
Haoyu Qiu
2025-07-26 14:20:34 +08:00
parent 3bf0f771ee
commit fb476d0b0c
7 changed files with 181 additions and 158 deletions

View File

@@ -47,6 +47,7 @@
#include "editor/import/3d/resource_importer_scene.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/inspector/editor_inspector.h"
#include "editor/plugins/editor_plugin_list.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "editor/scene/3d/node_3d_editor_plugin.h"
#include "editor/scene/canvas_item_editor_plugin.h"
@@ -223,14 +224,12 @@ PopupMenu *EditorPlugin::get_export_as_menu() {
void EditorPlugin::set_input_event_forwarding_always_enabled() {
input_event_forwarding_always_enabled = true;
EditorPluginList *always_input_forwarding_list = EditorNode::get_singleton()->get_editor_plugins_force_input_forwarding();
always_input_forwarding_list->add_plugin(this);
EditorNode::get_singleton()->get_editor_plugins_force_input_forwarding()->add_plugin(this);
}
void EditorPlugin::set_force_draw_over_forwarding_enabled() {
force_draw_over_forwarding_enabled = true;
EditorPluginList *always_draw_over_forwarding_list = EditorNode::get_singleton()->get_editor_plugins_force_over();
always_draw_over_forwarding_list->add_plugin(this);
EditorNode::get_singleton()->get_editor_plugins_force_over()->add_plugin(this);
}
void EditorPlugin::notify_scene_changed(const Node *scn_root) {