Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.x] Modules: Make sure to include modules_enabled.gen.h where needed #54911

Merged
merged 1 commit into from
Nov 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion editor/editor_themes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include "editor_scale.h"
#include "editor_settings.h"

#include "modules/modules_enabled.gen.h"
#include "modules/modules_enabled.gen.h" // For svg.
#ifdef MODULE_SVG_ENABLED
#include "modules/svg/image_loader_svg.h"
#endif
Expand Down
3 changes: 2 additions & 1 deletion editor/plugin_config_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
/*************************************************************************/

#include "plugin_config_dialog.h"

#include "core/io/config_file.h"
#include "core/os/dir_access.h"
#include "editor/editor_node.h"
Expand All @@ -37,7 +38,7 @@
#include "editor/project_settings_editor.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
#include "modules/gdscript/gdscript.h"
#endif
Expand Down
1 change: 1 addition & 0 deletions editor/rename_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include "rename_dialog.h"

#include "modules/modules_enabled.gen.h" // For regex.
#ifdef MODULE_REGEX_ENABLED

#include "core/print_string.h"
Expand Down
2 changes: 1 addition & 1 deletion editor/rename_dialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#ifndef 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

#include "scene/gui/check_box.h"
Expand Down
2 changes: 2 additions & 0 deletions editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include "scene/property_utils.h"
#include "scene/resources/packed_scene.h"

#include "modules/modules_enabled.gen.h" // For regex.

void SceneTreeDock::_nodes_drag_begin() {
if (restore_script_editor_on_drag) {
EditorNode::get_singleton()->set_visible_editor(EditorNode::EDITOR_SCRIPT);
Expand Down
4 changes: 2 additions & 2 deletions editor/scene_tree_dock.h
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,14 @@
#include "scene/gui/tree.h"
#include "scene_tree_editor.h"

#include "modules/modules_enabled.gen.h" // For regex.

class EditorNode;

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

enum Tool {

TOOL_NEW,
TOOL_INSTANCE,
TOOL_EXPAND_COLLAPSE,
Expand Down Expand Up @@ -96,7 +97,6 @@ class SceneTreeDock : public VBoxContainer {
TOOL_CREATE_3D_SCENE,
TOOL_CREATE_USER_INTERFACE,
TOOL_CREATE_FAVORITE,

};

enum {
Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_gdscript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "core/os/main_loop.h"
#include "core/os/os.h"

#include "modules/modules_enabled.gen.h"
#include "modules/modules_enabled.gen.h" // For gdscript.
#ifdef MODULE_GDSCRIPT_ENABLED

#include "modules/gdscript/gdscript.h"
Expand Down
2 changes: 1 addition & 1 deletion main/tests/test_string.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "core/os/os.h"
#include "core/ustring.h"

#include "modules/modules_enabled.gen.h"
#include "modules/modules_enabled.gen.h" // For regex.
#ifdef MODULE_REGEX_ENABLED
#include "modules/regex/regex.h"
#endif
Expand Down
38 changes: 20 additions & 18 deletions modules/gltf/gltf_document.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
/*************************************************************************/

#include "gltf_document.h"
#include "core/error_list.h"
#include "core/error_macros.h"
#include "core/variant.h"

#include "gltf_accessor.h"
#include "gltf_animation.h"
#include "gltf_camera.h"
Expand All @@ -44,11 +42,9 @@
#include "gltf_state.h"
#include "gltf_texture.h"

#include <stdio.h>
#include <stdlib.h>

#include "core/bind/core_bind.h"
#include "core/crypto/crypto_core.h"
#include "core/error_list.h"
#include "core/error_macros.h"
#include "core/io/json.h"
#include "core/math/disjoint_set.h"
Expand All @@ -58,15 +54,6 @@
#include "core/version_hash.gen.h"
#include "drivers/png/png_driver_common.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/3d/bone_attachment.h"
#include "scene/3d/camera.h"
Expand All @@ -77,6 +64,21 @@
#include "scene/animation/animation_player.h"
#include "scene/main/node.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>

Error GLTFDocument::serialize(Ref<GLTFState> state, Node *p_root, const String &p_path) {
Expand Down Expand Up @@ -5424,18 +5426,18 @@ void GLTFDocument::_convert_grid_map_to_gltf(GridMap *p_grid_map, GLTFNodeIndex
state->nodes.push_back(new_gltf_node);
Vector3 cell_location = cells[k];
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);
import_mesh_node->set_mesh(p_grid_map->get_mesh_library()->get_item_mesh(cell));
Transform cell_xform;
cell_xform.basis.set_orthogonal_index(
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(),
p_grid_map->get_cell_scale(),
p_grid_map->get_cell_scale()));
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;
gltf_mesh.instance();
gltf_mesh = import_mesh_node;
Expand Down
3 changes: 2 additions & 1 deletion modules/gltf/gltf_document.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#ifndef GLTF_DOCUMENT_H
#define GLTF_DOCUMENT_H

#include "editor/import/resource_importer_scene.h"
#include "gltf_animation.h"
#include "scene/2d/node_2d.h"
#include "scene/3d/bone_attachment.h"
Expand All @@ -43,6 +42,8 @@
#include "scene/resources/material.h"
#include "scene/resources/texture.h"

#include "modules/modules_enabled.gen.h" // For csg, gridmap.

class GLTFState;
class GLTFSkin;
class GLTFNode;
Expand Down
2 changes: 1 addition & 1 deletion modules/recast/navigation_mesh_generator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
#include "scene/resources/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
#include "modules/csg/csg_shape.h"
#endif
Expand Down
2 changes: 1 addition & 1 deletion scene/3d/room_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include "editor/plugins/spatial_editor_plugin.h"
#endif

#include "modules/modules_enabled.gen.h"
#include "modules/modules_enabled.gen.h" // For csg.
#ifdef MODULE_CSG_ENABLED
#include "modules/csg/csg_shape.h"
#endif
Expand Down
10 changes: 5 additions & 5 deletions scene/gui/rich_text_label.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@
#include "core/os/os.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
#include "editor/editor_scale.h"
#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) {
if (p_free) {
if (p_item->subitems.size()) {
Expand Down
4 changes: 2 additions & 2 deletions scene/main/scene_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@

#include "scene_tree.h"

#include "modules/modules_enabled.gen.h"

#include "core/io/marshalls.h"
#include "core/io/resource_loader.h"
#include "core/message_queue.h"
Expand All @@ -52,6 +50,8 @@
#include "servers/physics_server.h"
#include "viewport.h"

#include "modules/modules_enabled.gen.h" // For freetype.

#include <stdio.h>
#include <stdlib.h>

Expand Down
2 changes: 2 additions & 0 deletions scene/register_scene_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@
#include "scene/resources/occluder_shape.h"
#endif

#include "modules/modules_enabled.gen.h" // For freetype.

static Ref<ResourceFormatSaverText> resource_saver_text;
static Ref<ResourceFormatLoaderText> resource_loader_text;

Expand Down
2 changes: 1 addition & 1 deletion scene/resources/dynamic_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/* 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

#include "dynamic_font.h"
Expand Down
2 changes: 1 addition & 1 deletion scene/resources/dynamic_font.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#ifndef 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

#include "core/io/resource_loader.h"
Expand Down