Also mvoed away from the TERRAMAN_PRESENT define.

This commit is contained in:
Relintai 2022-10-05 11:54:21 +02:00
parent 14c44e5727
commit 73742e947d
4 changed files with 7 additions and 9 deletions

View File

@ -4,9 +4,6 @@ Import('env')
module_env = env.Clone() module_env = env.Clone()
if os.path.isdir('../terraman'):
module_env.Append(CPPDEFINES=['TERRAMAN_PRESENT'])
sources = [ sources = [
"register_types.cpp", "register_types.cpp",

View File

@ -9,9 +9,6 @@ import version
if os.path.isdir('../mesh_data_resource'): if os.path.isdir('../mesh_data_resource'):
module_env.Append(CPPDEFINES=['MESH_DATA_RESOURCE_PRESENT']) 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'): if os.path.isdir('../mesh_utils'):
module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT']) module_env.Append(CPPDEFINES=['MESH_UTILS_PRESENT'])

View File

@ -28,6 +28,8 @@ SOFTWARE.
#include "material_cache/prop_material_cache.h" #include "material_cache/prop_material_cache.h"
#include "tiled_wall/tiled_wall_data.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"; const String PropMesher::BINDING_STRING_BUILD_FLAGS = "Use Lighting,Use AO,Use RAO,Bake Lights";
bool PropMesher::Vertex::operator==(const Vertex &p_vertex) const { 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<Ref<TerrainLight>> &lights) { void PropMesher::bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &lights) {
ERR_FAIL_COND(node == NULL); ERR_FAIL_COND(node == NULL);

View File

@ -35,11 +35,13 @@ SOFTWARE.
#include "scene/resources/material.h" #include "scene/resources/material.h"
#include "scene/resources/mesh.h" #include "scene/resources/mesh.h"
#include "modules/modules_enabled.gen.h"
#ifdef MESH_DATA_RESOURCE_PRESENT #ifdef MESH_DATA_RESOURCE_PRESENT
#include "../mesh_data_resource/mesh_data_resource.h" #include "../mesh_data_resource/mesh_data_resource.h"
#endif #endif
#ifdef TERRAMAN_PRESENT #ifdef MODULE_TERRAMAN_ENABLED
#include "../terraman/data/terrain_light.h" #include "../terraman/data/terrain_light.h"
#endif #endif
@ -157,7 +159,7 @@ public:
void bake_colors_lights_rao(); void bake_colors_lights_rao();
void bake_colors_lights(); void bake_colors_lights();
#ifdef TERRAMAN_PRESENT #ifdef MODULE_TERRAMAN_ENABLED
void bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &lights); void bake_lights(MeshInstance *node, Vector<Ref<TerrainLight>> &lights);
#endif #endif