From a8836ba28d09e2fa99693c09889a8bbba0e3a106 Mon Sep 17 00:00:00 2001 From: Marcel Admiraal Date: Wed, 9 Oct 2019 16:11:04 +0200 Subject: [PATCH] Remove dependency on the editor directory being in the build's include path. - Add or remove the necessary subdirectorires to the includes to remove dependency on the editor directory being in the build's include path. - Ensure includes in modified files conform to style guideline. - Remove editor from the build include path. --- SConstruct | 2 +- editor/import/resource_importer_obj.h | 2 +- editor/plugins/asset_library_editor_plugin.cpp | 4 ++-- editor/plugins/asset_library_editor_plugin.h | 14 ++++++-------- editor/plugins/text_editor.cpp | 2 +- modules/assimp/editor_scene_importer_assimp.cpp | 5 +++-- .../visual_script_property_selector.cpp | 2 +- .../visual_script_property_selector.h | 2 +- platform/javascript/export/export.cpp | 2 +- scene/gui/color_picker.cpp | 4 ++-- 10 files changed, 19 insertions(+), 20 deletions(-) diff --git a/SConstruct b/SConstruct index 128c5b0e926..cdbb47faead 100644 --- a/SConstruct +++ b/SConstruct @@ -189,7 +189,7 @@ Help(opts.GenerateHelpText(env_base)) # generate help # add default include paths -env_base.Prepend(CPPPATH=['#', '#editor']) +env_base.Prepend(CPPPATH=['#']) # configure ENV for platform env_base.platform_exporters = platform_exporters diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h index b96bc1b6568..adad21da61c 100644 --- a/editor/import/resource_importer_obj.h +++ b/editor/import/resource_importer_obj.h @@ -31,7 +31,7 @@ #ifndef RESOURCEIMPORTEROBJ_H #define RESOURCEIMPORTEROBJ_H -#include "import/resource_importer_scene.h" +#include "resource_importer_scene.h" class EditorOBJImporter : public EditorSceneImporter { diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp index 3d161dc5b9c..d5b1f46333e 100644 --- a/editor/plugins/asset_library_editor_plugin.cpp +++ b/editor/plugins/asset_library_editor_plugin.cpp @@ -32,8 +32,8 @@ #include "core/io/json.h" #include "core/version.h" -#include "editor_node.h" -#include "editor_settings.h" +#include "editor/editor_node.h" +#include "editor/editor_settings.h" void EditorAssetLibraryItem::configure(const String &p_title, int p_asset_id, const String &p_category, int p_category_id, const String &p_author, int p_author_id, const String &p_cost) { diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h index 7e934ac6cba..94289f3b49f 100644 --- a/editor/plugins/asset_library_editor_plugin.h +++ b/editor/plugins/asset_library_editor_plugin.h @@ -31,24 +31,22 @@ #ifndef ASSET_LIBRARY_EDITOR_PLUGIN_H #define ASSET_LIBRARY_EDITOR_PLUGIN_H -#include "editor_plugin.h" +#include "editor/editor_asset_installer.h" +#include "editor/editor_plugin.h" +#include "editor/editor_plugin_settings.h" #include "scene/gui/box_container.h" #include "scene/gui/check_box.h" +#include "scene/gui/grid_container.h" #include "scene/gui/line_edit.h" #include "scene/gui/link_button.h" #include "scene/gui/option_button.h" #include "scene/gui/panel_container.h" #include "scene/gui/progress_bar.h" -#include "scene/gui/separator.h" -#include "scene/gui/tab_container.h" - -#include "editor_plugin_settings.h" -#include "scene/gui/grid_container.h" #include "scene/gui/rich_text_label.h" #include "scene/gui/scroll_container.h" +#include "scene/gui/separator.h" +#include "scene/gui/tab_container.h" #include "scene/gui/texture_button.h" - -#include "editor_asset_installer.h" #include "scene/main/http_request.h" class EditorAssetLibraryItem : public PanelContainer { diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp index d0320bcd8b4..0cef5a8b6fe 100644 --- a/editor/plugins/text_editor.cpp +++ b/editor/plugins/text_editor.cpp @@ -31,7 +31,7 @@ #include "text_editor.h" #include "core/os/keyboard.h" -#include "editor_node.h" +#include "editor/editor_node.h" void TextEditor::add_syntax_highlighter(SyntaxHighlighter *p_highlighter) { highlighters[p_highlighter->get_name()] = p_highlighter; diff --git a/modules/assimp/editor_scene_importer_assimp.cpp b/modules/assimp/editor_scene_importer_assimp.cpp index f2f51d9dd3b..1ea9399c026 100644 --- a/modules/assimp/editor_scene_importer_assimp.cpp +++ b/modules/assimp/editor_scene_importer_assimp.cpp @@ -29,11 +29,12 @@ /*************************************************************************/ #include "editor_scene_importer_assimp.h" + #include "core/bind/core_bind.h" #include "core/io/image_loader.h" #include "editor/editor_file_system.h" +#include "editor/editor_settings.h" #include "editor/import/resource_importer_scene.h" -#include "editor_settings.h" #include "import_utils.h" #include "scene/3d/camera.h" #include "scene/3d/light.h" @@ -1350,4 +1351,4 @@ void EditorSceneImporterAssimp::_generate_node( _generate_node(state, recursive_state.skeleton, recursive_state.assimp_node->mChildren[i], recursive_state.new_node != NULL ? recursive_state.new_node : recursive_state.parent_node); } -} \ No newline at end of file +} diff --git a/modules/visual_script/visual_script_property_selector.cpp b/modules/visual_script/visual_script_property_selector.cpp index 42d4c5e209b..62b818150cd 100644 --- a/modules/visual_script/visual_script_property_selector.cpp +++ b/modules/visual_script/visual_script_property_selector.cpp @@ -32,7 +32,7 @@ #include "core/os/keyboard.h" #include "editor/editor_node.h" -#include "editor_scale.h" +#include "editor/editor_scale.h" #include "modules/visual_script/visual_script.h" #include "modules/visual_script/visual_script_builtin_funcs.h" #include "modules/visual_script/visual_script_flow_control.h" diff --git a/modules/visual_script/visual_script_property_selector.h b/modules/visual_script/visual_script_property_selector.h index 13ce9bdca23..405949e8c1a 100644 --- a/modules/visual_script/visual_script_property_selector.h +++ b/modules/visual_script/visual_script_property_selector.h @@ -31,8 +31,8 @@ #ifndef VISUALSCRIPT_PROPERTYSELECTOR_H #define VISUALSCRIPT_PROPERTYSELECTOR_H +#include "editor/editor_help.h" #include "editor/property_editor.h" -#include "editor_help.h" #include "scene/gui/rich_text_label.h" class VisualScriptPropertySelector : public ConfirmationDialog { diff --git a/platform/javascript/export/export.cpp b/platform/javascript/export/export.cpp index 69dd0387092..4de98f7039d 100644 --- a/platform/javascript/export/export.cpp +++ b/platform/javascript/export/export.cpp @@ -29,8 +29,8 @@ /*************************************************************************/ #include "core/io/zip_io.h" +#include "editor/editor_export.h" #include "editor/editor_node.h" -#include "editor_export.h" #include "main/splash.gen.h" #include "platform/javascript/logo.gen.h" #include "platform/javascript/run_icon.gen.h" diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index ffe011e5f7e..96b62b97f93 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -35,8 +35,8 @@ #include "core/os/os.h" #ifdef TOOLS_ENABLED -#include "editor_scale.h" -#include "editor_settings.h" +#include "editor/editor_scale.h" +#include "editor/editor_settings.h" #endif #include "scene/main/viewport.h"