diff --git a/modules/broken_seals_module/SCsub b/modules/broken_seals_module/SCsub index 6e5ebb868..c25c19dfc 100644 --- a/modules/broken_seals_module/SCsub +++ b/modules/broken_seals_module/SCsub @@ -4,9 +4,6 @@ Import('env') module_env = env.Clone() -if os.path.isdir('../terraman'): - module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT']) - sources = [ "register_types.cpp", diff --git a/modules/props/SCsub b/modules/props/SCsub index 795b9cca5..db771abf4 100644 --- a/modules/props/SCsub +++ b/modules/props/SCsub @@ -9,9 +9,6 @@ import version if os.path.isdir('../mesh_data_resource'): module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT']) -if os.path.isdir('../terraman'): - module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT']) - if os.path.isdir('../mesh_utils'): module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT']) diff --git a/modules/props/prop_mesher.cpp b/modules/props/prop_mesher.cpp index aa5c1c9f8..1b5c9380c 100644 --- a/modules/props/prop_mesher.cpp +++ b/modules/props/prop_mesher.cpp @@ -28,6 +28,8 @@ SOFTWARE. #include "material_cache/prop_material_cache.h" #include "tiled_wall/tiled_wall_data.h" +#include "modules/modules_enabled.gen.h" + const String PropMesher::BINDING_STRING_BUILD_FLAGS = "Use Lighting,Use AO,Use RAO,Bake Lights"; bool PropMesher::Vertex::operator==(const Vertex &p_vertex) const { @@ -1101,7 +1103,7 @@ void PropMesher::bake_colors_lights() { } } -#ifdef TERRAMAN_PRESENT +#ifdef MODULE_TERRAMAN_ENABLED void PropMesher::bake_lights(MeshInstance *node, Vector> &lights) { ERR_FAIL_COND(node == NULL); diff --git a/modules/props/prop_mesher.h b/modules/props/prop_mesher.h index 3ce5dd243..2fc67c7ca 100644 --- a/modules/props/prop_mesher.h +++ b/modules/props/prop_mesher.h @@ -35,11 +35,13 @@ SOFTWARE. #include "scene/resources/material.h" #include "scene/resources/mesh.h" +#include "modules/modules_enabled.gen.h" + #ifdef MESH_DATA_RESOURCE_PRESENT #include "../mesh_data_resource/mesh_data_resource.h" #endif -#ifdef TERRAMAN_PRESENT +#ifdef MODULE_TERRAMAN_ENABLED #include "../terraman/data/terrain_light.h" #endif @@ -157,7 +159,7 @@ public: void bake_colors_lights_rao(); void bake_colors_lights(); -#ifdef TERRAMAN_PRESENT +#ifdef MODULE_TERRAMAN_ENABLED void bake_lights(MeshInstance *node, Vector> &lights); #endif