diff --git a/SConstruct b/SConstruct index b9698601c35c..7578a7c38569 100644 --- a/SConstruct +++ b/SConstruct @@ -118,7 +118,6 @@ opts.Add(BoolVariable('use_precise_math_checks', 'Math checks use very precise e # Components opts.Add(BoolVariable('deprecated', "Enable deprecated features", True)) -opts.Add(BoolVariable('gdscript', "Enable GDScript support", True)) opts.Add(BoolVariable('minizip', "Enable ZIP archive support using minizip", True)) opts.Add(BoolVariable('xaudio2', "Enable the XAudio2 audio driver", False)) @@ -477,8 +476,6 @@ if selected_platform in platform_list: sys.exit(255) else: env.Append(CPPDEFINES=['_3D_DISABLED']) - if env['gdscript']: - env.Append(CPPDEFINES=['GDSCRIPT_ENABLED']) if env['disable_advanced_gui']: if env['tools']: print("Build option 'disable_advanced_gui=yes' cannot be used with 'tools=yes' (editor), only with 'tools=no' (export template).") diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 8037045e7733..28bc20a9574f 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -35,7 +35,11 @@ #include "editor_icons.gen.h" #include "editor_scale.h" #include "editor_settings.h" + +#include "modules/modules_enabled.gen.h" +#ifdef MODULE_SVG_ENABLED #include "modules/svg/image_loader_svg.h" +#endif static Ref make_stylebox(Ref p_texture, float p_left, float p_top, float p_right, float p_botton, float p_margin_left = -1, float p_margin_top = -1, float p_margin_right = -1, float p_margin_botton = -1, bool p_draw_center = true) { Ref style(memnew(StyleBoxTexture)); @@ -109,7 +113,7 @@ Ref editor_generate_icon(int p_index, bool p_convert_color, float void editor_register_and_generate_icons(Ref p_theme, bool p_dark_theme = true, int p_thumb_size = 32, bool p_only_thumbs = false) { -#ifdef SVG_ENABLED +#ifdef MODULE_SVG_ENABLED // The default icon theme is designed to be used for a dark theme. // This dictionary stores color codes to convert to other colors // for better readability on a light theme. diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp index fc9c877ac756..d4664e1bb933 100644 --- a/editor/import/editor_scene_importer_gltf.cpp +++ b/editor/import/editor_scene_importer_gltf.cpp @@ -29,6 +29,7 @@ /*************************************************************************/ #include "editor_scene_importer_gltf.h" + #include "core/crypto/crypto_core.h" #include "core/io/json.h" #include "core/math/disjoint_set.h" diff --git a/editor/plugin_config_dialog.cpp b/editor/plugin_config_dialog.cpp index 07b87633a923..1506ba319c4c 100644 --- a/editor/plugin_config_dialog.cpp +++ b/editor/plugin_config_dialog.cpp @@ -35,9 +35,13 @@ #include "editor/editor_plugin.h" #include "editor/editor_scale.h" #include "editor/project_settings_editor.h" -#include "modules/gdscript/gdscript.h" #include "scene/gui/grid_container.h" +#include "modules/modules_enabled.gen.h" +#ifdef MODULE_GDSCRIPT_ENABLED +#include "modules/gdscript/gdscript.h" +#endif + void PluginConfigDialog::_clear_fields() { name_edit->set_text(""); subfolder_edit->set_text(""); @@ -75,6 +79,9 @@ void PluginConfigDialog::_on_confirmed() { // TODO Use script templates. Right now, this code won't add the 'tool' annotation to other languages. // TODO Better support script languages with named classes (has_named_classes). + // FIXME: It's hacky to have hardcoded access to the GDScript module here. + // The editor code should not have to know what languages are enabled. +#ifdef MODULE_GDSCRIPT_ENABLED if (lang_name == GDScriptLanguage::get_singleton()->get_name()) { // Hard-coded GDScript template to keep usability until we use script templates. Ref