Skip to content

Commit

Permalink
Merge pull request #60684 from trollodel/lightweight_editor_plugin
Browse files Browse the repository at this point in the history
Use forward-declarations in EditorPlugin where possible
  • Loading branch information
akien-mga committed Nov 13, 2022
2 parents 9e97bc5 + ba9e619 commit d75018b
Show file tree
Hide file tree
Showing 61 changed files with 151 additions and 37 deletions.
1 change: 1 addition & 0 deletions editor/editor_audio_buses.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
#include "scene/gui/tree.h"

class EditorAudioBuses;
class EditorFileDialog;

class EditorAudioBus : public PanelContainer {
GDCLASS(EditorAudioBus, PanelContainer);
Expand Down
1 change: 1 addition & 0 deletions editor/editor_build_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ class EditorBuildProfile : public RefCounted {
VARIANT_ENUM_CAST(EditorBuildProfile::BuildOption)
VARIANT_ENUM_CAST(EditorBuildProfile::BuildOptionCategory)

class EditorFileDialog;
class EditorFileSystemDirectory;

class EditorBuildProfileManager : public AcceptDialog {
Expand Down
2 changes: 2 additions & 0 deletions editor/editor_feature_profile.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
#include "scene/gui/split_container.h"
#include "scene/gui/tree.h"

class EditorFileDialog;

class EditorFeatureProfile : public RefCounted {
GDCLASS(EditorFeatureProfile, RefCounted);

Expand Down
1 change: 1 addition & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@
#include "editor/import/audio_stream_import_settings.h"
#include "editor/import/dynamic_font_import_settings.h"
#include "editor/import/editor_import_collada.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_bitmask.h"
#include "editor/import/resource_importer_bmfont.h"
#include "editor/import/resource_importer_csv_translation.h"
Expand Down
4 changes: 4 additions & 0 deletions editor/editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@

#include "editor_plugin.h"

#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_command_palette.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
#include "editor/editor_resource_preview.h"
#include "editor/editor_settings.h"
#include "editor/editor_translation_parser.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/export/editor_export.h"
#include "editor/filesystem_dock.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "editor/plugins/node_3d_editor_plugin.h"
#include "editor/plugins/script_editor_plugin.h"
Expand Down
31 changes: 16 additions & 15 deletions editor/editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,33 @@
#define EDITOR_PLUGIN_H

#include "core/io/config_file.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_inspector.h"
#include "editor/editor_translation_parser.h"
#include "editor/import/editor_import_plugin.h"
#include "editor/import/resource_importer_scene.h"
#include "editor/script_create_dialog.h"
#include "scene/3d/camera_3d.h"
#include "scene/main/node.h"
#include "scene/resources/texture.h"
#include "scene/gui/control.h"

class Node3D;
class Camera3D;
class Button;
class PopupMenu;
class EditorCommandPalette;
class EditorSelection;
class EditorExport;
class EditorSettings;
class EditorImportPlugin;
class EditorExportPlugin;
class EditorFileSystem;
class EditorImportPlugin;
class EditorInspector;
class EditorInspectorPlugin;
class EditorNode3DGizmoPlugin;
class EditorPaths;
class EditorResourcePreview;
class EditorUndoRedoManager;
class EditorFileSystem;
class EditorSceneFormatImporter;
class EditorScenePostImportPlugin;
class EditorSelection;
class EditorSettings;
class EditorToolAddons;
class EditorPaths;
class EditorTranslationParserPlugin;
class EditorUndoRedoManager;
class FileSystemDock;
class ScriptCreateDialog;
class ScriptEditor;
class VBoxContainer;

class EditorInterface : public Node {
GDCLASS(EditorInterface, Node);
Expand Down
1 change: 1 addition & 0 deletions editor/editor_run.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "editor_run.h"

#include "core/config/project_settings.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "main/main.h"
Expand Down
1 change: 1 addition & 0 deletions editor/editor_undo_redo_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "core/io/resource.h"
#include "core/os/os.h"
#include "core/templates/local_vector.h"
#include "editor/debugger/editor_debugger_node.h"
#include "editor/editor_log.h"
#include "editor/editor_node.h"
#include "scene/main/node.h"
Expand Down
1 change: 1 addition & 0 deletions editor/filesystem_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "editor/editor_resource_preview.h"
#include "editor/editor_scale.h"
#include "editor/editor_settings.h"
#include "editor/import/resource_importer_scene.h"
#include "editor/import_dock.h"
#include "editor/scene_create_dialog.h"
#include "editor/scene_tree_dock.h"
Expand Down
1 change: 1 addition & 0 deletions editor/import/audio_stream_import_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "editor/audio_stream_preview.h"
#include "editor/editor_file_system.h"
#include "editor/editor_scale.h"
#include "scene/gui/check_box.h"

AudioStreamImportSettings *AudioStreamImportSettings::singleton = nullptr;

Expand Down
3 changes: 3 additions & 0 deletions editor/import/audio_stream_import_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@
#include "editor/editor_plugin.h"
#include "scene/audio/audio_stream_player.h"
#include "scene/gui/color_rect.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/spin_box.h"
#include "scene/resources/texture.h"

class CheckBox;

class AudioStreamImportSettings : public ConfirmationDialog {
GDCLASS(AudioStreamImportSettings, ConfirmationDialog);

Expand Down
1 change: 1 addition & 0 deletions editor/plugin_config_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "editor/editor_plugin.h"
#include "editor/editor_scale.h"
#include "editor/project_settings_editor.h"
#include "scene/gui/grid_container.h"

void PluginConfigDialog::_clear_fields() {
name_edit->set_text("");
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/abstract_polygon_2d_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "scene/gui/box_container.h"

class CanvasItemEditor;
class ConfirmationDialog;

class AbstractPolygon2DEditor : public HBoxContainer {
GDCLASS(AbstractPolygon2DEditor, HBoxContainer);
Expand Down
3 changes: 2 additions & 1 deletion editor/plugins/animation_blend_space_1d_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"

class EditorUndoRedoManager;
class CheckBox;
class PanelContainer;

class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendSpace1DEditor, AnimationTreeNodeEditorPlugin);
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/animation_blend_space_2d_editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
#include "editor/editor_undo_redo_manager.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/animation/animation_player.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/panel.h"
#include "scene/main/window.h"
Expand Down
4 changes: 4 additions & 0 deletions editor/plugins/animation_blend_space_2d_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@
#include "scene/gui/separator.h"
#include "scene/gui/tree.h"

class CheckBox;
class OptionButton;
class PanelContainer;

class EditorUndoRedoManager;

class AnimationNodeBlendSpace2DEditor : public AnimationTreeNodeEditorPlugin {
Expand Down
7 changes: 6 additions & 1 deletion editor/plugins/animation_blend_tree_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,22 @@
#ifndef ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H
#define ANIMATION_BLEND_TREE_EDITOR_PLUGIN_H

#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "scene/animation/animation_blend_tree.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/panel_container.h"
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"

class AcceptDialog;
class CheckBox;
class ProgressBar;
class EditorFileDialog;
class EditorProperty;
class EditorUndoRedoManager;
class MenuButton;
class PanelContainer;

class AnimationNodeBlendTreeEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeBlendTreeEditor, AnimationTreeNodeEditorPlugin);
Expand Down
5 changes: 3 additions & 2 deletions editor/plugins/animation_state_machine_editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@
#ifndef ANIMATION_STATE_MACHINE_EDITOR_H
#define ANIMATION_STATE_MACHINE_EDITOR_H

#include "editor/editor_plugin.h"
#include "editor/plugins/animation_tree_editor_plugin.h"
#include "scene/animation/animation_node_state_machine.h"
#include "scene/gui/button.h"
#include "scene/gui/graph_edit.h"
#include "scene/gui/popup.h"
#include "scene/gui/tree.h"

class ConfirmationDialog;
class EditorFileDialog;
class EditorUndoRedoManager;
class OptionButton;
class PanelContainer;

class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
GDCLASS(AnimationNodeStateMachineEditor, AnimationTreeNodeEditorPlugin);
Expand Down
3 changes: 3 additions & 0 deletions editor/plugins/asset_library_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@
#include "scene/gui/texture_button.h"
#include "scene/main/http_request.h"

class EditorFileDialog;
class MenuButton;

class EditorAssetLibraryItem : public PanelContainer {
GDCLASS(EditorAssetLibraryItem, PanelContainer);

Expand Down
3 changes: 3 additions & 0 deletions editor/plugins/bit_map_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@
#ifndef BIT_MAP_EDITOR_PLUGIN_H
#define BIT_MAP_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/resources/bit_map.h"

class TextureRect;

class BitMapEditor : public VBoxContainer {
GDCLASS(BitMapEditor, VBoxContainer);

Expand Down
3 changes: 3 additions & 0 deletions editor/plugins/canvas_item_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,11 @@
#include "scene/gui/texture_rect.h"
#include "scene/main/canvas_item.h"

class AcceptDialog;
class ConfirmationDialog;
class EditorData;
class CanvasItemEditorViewport;
class MenuButton;
class ViewPanner;

class CanvasItemEditorSelectedItem : public Object {
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/control_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include "editor/editor_settings.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/plugins/canvas_item_editor_plugin.h"
#include "scene/gui/grid_container.h"
#include "scene/gui/separator.h"

// Inspector controls.
Expand Down
2 changes: 2 additions & 0 deletions editor/plugins/control_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef CONTROL_EDITOR_PLUGIN_H
#define CONTROL_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
Expand All @@ -45,6 +46,7 @@
#include "scene/gui/texture_rect.h"

class EditorUndoRedoManager;
class GridContainer;

// Inspector controls.
class ControlPositioningWarning : public MarginContainer {
Expand Down
5 changes: 4 additions & 1 deletion editor/plugins/cpu_particles_2d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,13 @@
#include "scene/2d/cpu_particles_2d.h"
#include "scene/gui/box_container.h"

class EditorPlugin;
class CheckBox;
class ConfirmationDialog;
class SpinBox;
class EditorFileDialog;
class EditorUndoRedoManager;
class MenuButton;
class OptionButton;

class CPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(CPUParticles2DEditorPlugin, EditorPlugin);
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/curve_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef CURVE_EDITOR_PLUGIN_H
#define CURVE_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/editor_resource_preview.h"
#include "scene/resources/curve.h"
Expand Down
4 changes: 4 additions & 0 deletions editor/plugins/gpu_particles_2d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@
#include "scene/gui/box_container.h"
#include "scene/gui/spin_box.h"

class CheckBox;
class ConfirmationDialog;
class EditorFileDialog;
class EditorUndoRedoManager;
class MenuButton;
class OptionButton;

class GPUParticles2DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticles2DEditorPlugin, EditorPlugin);
Expand Down
4 changes: 4 additions & 0 deletions editor/plugins/gpu_particles_3d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
#include "scene/3d/gpu_particles_3d.h"
#include "scene/gui/spin_box.h"

class ConfirmationDialog;
class HBoxContainer;
class MenuButton;
class OptionButton;
class SceneTreeDialog;

class GPUParticles3DEditorBase : public Control {
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/gpu_particles_collision_sdf_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

struct EditorProgress;
class EditorFileDialog;
class HBoxContainer;

class GPUParticlesCollisionSDF3DEditorPlugin : public EditorPlugin {
GDCLASS(GPUParticlesCollisionSDF3DEditorPlugin, EditorPlugin);
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/gradient_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef GRADIENT_EDITOR_PLUGIN_H
#define GRADIENT_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "gradient_editor.h"

Expand Down
1 change: 1 addition & 0 deletions editor/plugins/gradient_texture_2d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef GRADIENT_TEXTURE_2D_EDITOR_PLUGIN_H
#define GRADIENT_TEXTURE_2D_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/editor_spin_slider.h"

Expand Down
1 change: 1 addition & 0 deletions editor/plugins/material_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef MATERIAL_EDITOR_PLUGIN_H
#define MATERIAL_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "editor/plugins/editor_resource_conversion_plugin.h"
#include "scene/3d/camera_3d.h"
Expand Down
1 change: 1 addition & 0 deletions editor/plugins/mesh_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#ifndef MESH_EDITOR_PLUGIN_H
#define MESH_EDITOR_PLUGIN_H

#include "editor/editor_inspector.h"
#include "editor/editor_plugin.h"
#include "scene/3d/camera_3d.h"
#include "scene/3d/light_3d.h"
Expand Down
4 changes: 4 additions & 0 deletions editor/plugins/mesh_instance_3d_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@
#include "scene/3d/mesh_instance_3d.h"
#include "scene/gui/spin_box.h"

class AcceptDialog;
class ConfirmationDialog;
class MenuButton;

class MeshInstance3DEditor : public Control {
GDCLASS(MeshInstance3DEditor, Control);

Expand Down
Loading

0 comments on commit d75018b

Please sign in to comment.