Browse Source

Modules: Make sure to include `modules_enabled.gen.h` where needed

Fixes #51677.

Co-authored-by: Arkadiusz Marcin Kołek <[email protected]>
Rémi Verschelde 3 years ago
parent
commit
6f4858f184

+ 1 - 1
editor/editor_themes.cpp

@@ -36,7 +36,7 @@
 #include "editor_scale.h"
 #include "editor_scale.h"
 #include "editor_settings.h"
 #include "editor_settings.h"
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For svg.
 #ifdef MODULE_SVG_ENABLED
 #ifdef MODULE_SVG_ENABLED
 #include "modules/svg/image_loader_svg.h"
 #include "modules/svg/image_loader_svg.h"
 #endif
 #endif

+ 2 - 1
editor/plugin_config_dialog.cpp

@@ -29,6 +29,7 @@
 /*************************************************************************/
 /*************************************************************************/
 
 
 #include "plugin_config_dialog.h"
 #include "plugin_config_dialog.h"
+
 #include "core/io/config_file.h"
 #include "core/io/config_file.h"
 #include "core/os/dir_access.h"
 #include "core/os/dir_access.h"
 #include "editor/editor_node.h"
 #include "editor/editor_node.h"
@@ -37,7 +38,7 @@
 #include "editor/project_settings_editor.h"
 #include "editor/project_settings_editor.h"
 #include "scene/gui/grid_container.h"
 #include "scene/gui/grid_container.h"
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For gdscript.
 #ifdef MODULE_GDSCRIPT_ENABLED
 #ifdef MODULE_GDSCRIPT_ENABLED
 #include "modules/gdscript/gdscript.h"
 #include "modules/gdscript/gdscript.h"
 #endif
 #endif

+ 1 - 0
editor/rename_dialog.cpp

@@ -30,6 +30,7 @@
 
 
 #include "rename_dialog.h"
 #include "rename_dialog.h"
 
 
+#include "modules/modules_enabled.gen.h" // For regex.
 #ifdef MODULE_REGEX_ENABLED
 #ifdef MODULE_REGEX_ENABLED
 
 
 #include "core/print_string.h"
 #include "core/print_string.h"

+ 1 - 1
editor/rename_dialog.h

@@ -31,7 +31,7 @@
 #ifndef RENAME_DIALOG_H
 #ifndef RENAME_DIALOG_H
 #define RENAME_DIALOG_H
 #define RENAME_DIALOG_H
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For regex.
 #ifdef MODULE_REGEX_ENABLED
 #ifdef MODULE_REGEX_ENABLED
 
 
 #include "scene/gui/check_box.h"
 #include "scene/gui/check_box.h"

+ 2 - 0
editor/scene_tree_dock.cpp

@@ -48,6 +48,8 @@
 #include "scene/property_utils.h"
 #include "scene/property_utils.h"
 #include "scene/resources/packed_scene.h"
 #include "scene/resources/packed_scene.h"
 
 
+#include "modules/modules_enabled.gen.h" // For regex.
+
 void SceneTreeDock::_nodes_drag_begin() {
 void SceneTreeDock::_nodes_drag_begin() {
 	if (restore_script_editor_on_drag) {
 	if (restore_script_editor_on_drag) {
 		EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
 		EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);

+ 2 - 2
editor/scene_tree_dock.h

@@ -50,13 +50,14 @@
 #include "scene/gui/tree.h"
 #include "scene/gui/tree.h"
 #include "scene_tree_editor.h"
 #include "scene_tree_editor.h"
 
 
+#include "modules/modules_enabled.gen.h" // For regex.
+
 class EditorNode;
 class EditorNode;
 
 
 class SceneTreeDock : public VBoxContainer {
 class SceneTreeDock : public VBoxContainer {
 	GDCLASS(SceneTreeDock, VBoxContainer);
 	GDCLASS(SceneTreeDock, VBoxContainer);
 
 
 	enum Tool {
 	enum Tool {
-
 		TOOL_NEW,
 		TOOL_NEW,
 		TOOL_INSTANCE,
 		TOOL_INSTANCE,
 		TOOL_EXPAND_COLLAPSE,
 		TOOL_EXPAND_COLLAPSE,
@@ -96,7 +97,6 @@ class SceneTreeDock : public VBoxContainer {
 		TOOL_CREATE_3D_SCENE,
 		TOOL_CREATE_3D_SCENE,
 		TOOL_CREATE_USER_INTERFACE,
 		TOOL_CREATE_USER_INTERFACE,
 		TOOL_CREATE_FAVORITE,
 		TOOL_CREATE_FAVORITE,
-
 	};
 	};
 
 
 	enum {
 	enum {

+ 1 - 1
main/tests/test_gdscript.cpp

@@ -34,7 +34,7 @@
 #include "core/os/main_loop.h"
 #include "core/os/main_loop.h"
 #include "core/os/os.h"
 #include "core/os/os.h"
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For gdscript.
 #ifdef MODULE_GDSCRIPT_ENABLED
 #ifdef MODULE_GDSCRIPT_ENABLED
 
 
 #include "modules/gdscript/gdscript.h"
 #include "modules/gdscript/gdscript.h"

+ 1 - 1
main/tests/test_string.cpp

@@ -34,7 +34,7 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "core/ustring.h"
 #include "core/ustring.h"
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For regex.
 #ifdef MODULE_REGEX_ENABLED
 #ifdef MODULE_REGEX_ENABLED
 #include "modules/regex/regex.h"
 #include "modules/regex/regex.h"
 #endif
 #endif

+ 20 - 18
modules/gltf/gltf_document.cpp

@@ -29,9 +29,7 @@
 /*************************************************************************/
 /*************************************************************************/
 
 
 #include "gltf_document.h"
 #include "gltf_document.h"
-#include "core/error_list.h"
-#include "core/error_macros.h"
-#include "core/variant.h"
+
 #include "gltf_accessor.h"
 #include "gltf_accessor.h"
 #include "gltf_animation.h"
 #include "gltf_animation.h"
 #include "gltf_camera.h"
 #include "gltf_camera.h"
@@ -44,11 +42,9 @@
 #include "gltf_state.h"
 #include "gltf_state.h"
 #include "gltf_texture.h"
 #include "gltf_texture.h"
 
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "core/bind/core_bind.h"
 #include "core/bind/core_bind.h"
 #include "core/crypto/crypto_core.h"
 #include "core/crypto/crypto_core.h"
+#include "core/error_list.h"
 #include "core/error_macros.h"
 #include "core/error_macros.h"
 #include "core/io/json.h"
 #include "core/io/json.h"
 #include "core/math/disjoint_set.h"
 #include "core/math/disjoint_set.h"
@@ -58,15 +54,6 @@
 #include "core/version_hash.gen.h"
 #include "core/version_hash.gen.h"
 #include "drivers/png/png_driver_common.h"
 #include "drivers/png/png_driver_common.h"
 #include "editor/import/resource_importer_scene.h"
 #include "editor/import/resource_importer_scene.h"
-#ifdef MODULE_CSG_ENABLED
-#include "modules/csg/csg_shape.h"
-#endif // MODULE_CSG_ENABLED
-#ifdef MODULE_GRIDMAP_ENABLED
-#include "modules/gridmap/grid_map.h"
-#endif // MODULE_GRIDMAP_ENABLED
-#ifdef MODULE_REGEX_ENABLED
-#include "modules/regex/regex.h"
-#endif // MODULE_REGEX_ENABLED
 #include "scene/2d/node_2d.h"
 #include "scene/2d/node_2d.h"
 #include "scene/3d/bone_attachment.h"
 #include "scene/3d/bone_attachment.h"
 #include "scene/3d/camera.h"
 #include "scene/3d/camera.h"
@@ -77,6 +64,21 @@
 #include "scene/animation/animation_player.h"
 #include "scene/animation/animation_player.h"
 #include "scene/main/node.h"
 #include "scene/main/node.h"
 #include "scene/resources/surface_tool.h"
 #include "scene/resources/surface_tool.h"
+
+#include "modules/modules_enabled.gen.h" // For csg, gridmap, regex.
+
+#ifdef MODULE_CSG_ENABLED
+#include "modules/csg/csg_shape.h"
+#endif // MODULE_CSG_ENABLED
+#ifdef MODULE_GRIDMAP_ENABLED
+#include "modules/gridmap/grid_map.h"
+#endif // MODULE_GRIDMAP_ENABLED
+#ifdef MODULE_REGEX_ENABLED
+#include "modules/regex/regex.h"
+#endif // MODULE_REGEX_ENABLED
+
+#include <stdio.h>
+#include <stdlib.h>
 #include <limits>
 #include <limits>
 
 
 Error GLTFDocument::serialize(Ref<GLTFState> state, Node *p_root, const String &p_path) {
 Error GLTFDocument::serialize(Ref<GLTFState> state, Node *p_root, const String &p_path) {
@@ -5424,18 +5426,18 @@ void GLTFDocument::_convert_grid_map_to_gltf(GridMap *p_grid_map, GLTFNodeIndex
 		state->nodes.push_back(new_gltf_node);
 		state->nodes.push_back(new_gltf_node);
 		Vector3 cell_location = cells[k];
 		Vector3 cell_location = cells[k];
 		int32_t cell = p_grid_map->get_cell_item(
 		int32_t cell = p_grid_map->get_cell_item(
-				Vector3(cell_location.x, cell_location.y, cell_location.z));
+				cell_location.x, cell_location.y, cell_location.z);
 		MeshInstance *import_mesh_node = memnew(MeshInstance);
 		MeshInstance *import_mesh_node = memnew(MeshInstance);
 		import_mesh_node->set_mesh(p_grid_map->get_mesh_library()->get_item_mesh(cell));
 		import_mesh_node->set_mesh(p_grid_map->get_mesh_library()->get_item_mesh(cell));
 		Transform cell_xform;
 		Transform cell_xform;
 		cell_xform.basis.set_orthogonal_index(
 		cell_xform.basis.set_orthogonal_index(
 				p_grid_map->get_cell_item_orientation(
 				p_grid_map->get_cell_item_orientation(
-						Vector3(cell_location.x, cell_location.y, cell_location.z)));
+						cell_location.x, cell_location.y, cell_location.z));
 		cell_xform.basis.scale(Vector3(p_grid_map->get_cell_scale(),
 		cell_xform.basis.scale(Vector3(p_grid_map->get_cell_scale(),
 				p_grid_map->get_cell_scale(),
 				p_grid_map->get_cell_scale(),
 				p_grid_map->get_cell_scale()));
 				p_grid_map->get_cell_scale()));
 		cell_xform.set_origin(p_grid_map->map_to_world(
 		cell_xform.set_origin(p_grid_map->map_to_world(
-				Vector3(cell_location.x, cell_location.y, cell_location.z)));
+				cell_location.x, cell_location.y, cell_location.z));
 		Ref<GLTFMesh> gltf_mesh;
 		Ref<GLTFMesh> gltf_mesh;
 		gltf_mesh.instance();
 		gltf_mesh.instance();
 		gltf_mesh = import_mesh_node;
 		gltf_mesh = import_mesh_node;

+ 2 - 1
modules/gltf/gltf_document.h

@@ -31,7 +31,6 @@
 #ifndef GLTF_DOCUMENT_H
 #ifndef GLTF_DOCUMENT_H
 #define GLTF_DOCUMENT_H
 #define GLTF_DOCUMENT_H
 
 
-#include "editor/import/resource_importer_scene.h"
 #include "gltf_animation.h"
 #include "gltf_animation.h"
 #include "scene/2d/node_2d.h"
 #include "scene/2d/node_2d.h"
 #include "scene/3d/bone_attachment.h"
 #include "scene/3d/bone_attachment.h"
@@ -43,6 +42,8 @@
 #include "scene/resources/material.h"
 #include "scene/resources/material.h"
 #include "scene/resources/texture.h"
 #include "scene/resources/texture.h"
 
 
+#include "modules/modules_enabled.gen.h" // For csg, gridmap.
+
 class GLTFState;
 class GLTFState;
 class GLTFSkin;
 class GLTFSkin;
 class GLTFNode;
 class GLTFNode;

+ 1 - 1
modules/recast/navigation_mesh_generator.cpp

@@ -46,7 +46,7 @@
 #include "scene/resources/shape.h"
 #include "scene/resources/shape.h"
 #include "scene/resources/sphere_shape.h"
 #include "scene/resources/sphere_shape.h"
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For csg, gridmap.
 #ifdef MODULE_CSG_ENABLED
 #ifdef MODULE_CSG_ENABLED
 #include "modules/csg/csg_shape.h"
 #include "modules/csg/csg_shape.h"
 #endif
 #endif

+ 1 - 1
scene/3d/room_manager.cpp

@@ -48,7 +48,7 @@
 #include "editor/plugins/spatial_editor_plugin.h"
 #include "editor/plugins/spatial_editor_plugin.h"
 #endif
 #endif
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For csg.
 #ifdef MODULE_CSG_ENABLED
 #ifdef MODULE_CSG_ENABLED
 #include "modules/csg/csg_shape.h"
 #include "modules/csg/csg_shape.h"
 #endif
 #endif

+ 5 - 5
scene/gui/rich_text_label.cpp

@@ -35,15 +35,15 @@
 #include "core/os/os.h"
 #include "core/os/os.h"
 #include "scene/scene_string_names.h"
 #include "scene/scene_string_names.h"
 
 
-#include "modules/modules_enabled.gen.h"
-#ifdef MODULE_REGEX_ENABLED
-#include "modules/regex/regex.h"
-#endif
-
 #ifdef TOOLS_ENABLED
 #ifdef TOOLS_ENABLED
 #include "editor/editor_scale.h"
 #include "editor/editor_scale.h"
 #endif
 #endif
 
 
+#include "modules/modules_enabled.gen.h" // For regex.
+#ifdef MODULE_REGEX_ENABLED
+#include "modules/regex/regex.h"
+#endif
+
 RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) {
 RichTextLabel::Item *RichTextLabel::_get_next_item(Item *p_item, bool p_free) {
 	if (p_free) {
 	if (p_free) {
 		if (p_item->subitems.size()) {
 		if (p_item->subitems.size()) {

+ 2 - 2
scene/main/scene_tree.cpp

@@ -30,8 +30,6 @@
 
 
 #include "scene_tree.h"
 #include "scene_tree.h"
 
 
-#include "modules/modules_enabled.gen.h"
-
 #include "core/io/marshalls.h"
 #include "core/io/marshalls.h"
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"
 #include "core/message_queue.h"
 #include "core/message_queue.h"
@@ -52,6 +50,8 @@
 #include "servers/physics_server.h"
 #include "servers/physics_server.h"
 #include "viewport.h"
 #include "viewport.h"
 
 
+#include "modules/modules_enabled.gen.h" // For freetype.
+
 #include <stdio.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdlib.h>
 
 

+ 2 - 0
scene/register_scene_types.cpp

@@ -218,6 +218,8 @@
 #include "scene/resources/occluder_shape.h"
 #include "scene/resources/occluder_shape.h"
 #endif
 #endif
 
 
+#include "modules/modules_enabled.gen.h" // For freetype.
+
 static Ref<ResourceFormatSaverText> resource_saver_text;
 static Ref<ResourceFormatSaverText> resource_saver_text;
 static Ref<ResourceFormatLoaderText> resource_loader_text;
 static Ref<ResourceFormatLoaderText> resource_loader_text;
 
 

+ 1 - 1
scene/resources/dynamic_font.cpp

@@ -28,7 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For freetype.
 #ifdef MODULE_FREETYPE_ENABLED
 #ifdef MODULE_FREETYPE_ENABLED
 
 
 #include "dynamic_font.h"
 #include "dynamic_font.h"

+ 1 - 1
scene/resources/dynamic_font.h

@@ -31,7 +31,7 @@
 #ifndef DYNAMIC_FONT_H
 #ifndef DYNAMIC_FONT_H
 #define DYNAMIC_FONT_H
 #define DYNAMIC_FONT_H
 
 
-#include "modules/modules_enabled.gen.h"
+#include "modules/modules_enabled.gen.h" // For freetype.
 #ifdef MODULE_FREETYPE_ENABLED
 #ifdef MODULE_FREETYPE_ENABLED
 
 
 #include "core/io/resource_loader.h"
 #include "core/io/resource_loader.h"