diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-12-31 07:34:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-12-31 07:34:44 +0400 |
commit | ba8d1b940f1b462dd86f01dfb88478b64572a258 (patch) | |
tree | 3cc5f0770370418608f2d51fc6b4a66735d6aea3 /source/blender/modifiers | |
parent | 65c74f1570b845ea3be9fc17bec2655392ca38f8 (diff) |
option to build without remesh modifier for cmake and scons
Diffstat (limited to 'source/blender/modifiers')
-rw-r--r-- | source/blender/modifiers/CMakeLists.txt | 8 | ||||
-rw-r--r-- | source/blender/modifiers/SConscript | 6 | ||||
-rw-r--r-- | source/blender/modifiers/intern/MOD_remesh.c | 26 |
3 files changed, 33 insertions, 7 deletions
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt index c04bc06be9e..c6cb6584973 100644 --- a/source/blender/modifiers/CMakeLists.txt +++ b/source/blender/modifiers/CMakeLists.txt @@ -36,7 +36,6 @@ set(INC ../render/extern/include ../../../intern/elbeem/extern ../../../intern/guardedalloc - ../../../intern/dualcon ) set(INC_SYS @@ -108,6 +107,13 @@ if(WITH_MOD_BOOLEAN) ) endif() +if(WITH_MOD_REMESH) + add_definitions(-DWITH_MOD_REMESH) + list(APPEND INC + ../../../intern/dualcon + ) +endif() + if(WITH_MOD_DECIMATE) add_definitions(-DWITH_MOD_DECIMATE) list(APPEND INC diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript index a93ee8523f9..ce413faec86 100644 --- a/source/blender/modifiers/SConscript +++ b/source/blender/modifiers/SConscript @@ -4,7 +4,7 @@ Import ('env') sources = env.Glob('intern/*.c') incs = '. ./intern' -incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern #/extern/glew/include #/intern/dualcon' +incs += ' #/intern/guardedalloc #/intern/decimation/extern #/intern/bsp/extern #/intern/elbeem/extern #/extern/glew/include' incs += ' ../render/extern/include ../blenloader' incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern' incs += ' ../gpu' @@ -14,8 +14,12 @@ incs += ' ' + env['BF_ZLIB_INC'] defs = [] if env ['WITH_BF_BOOLEAN']: + incs += ' #/intern/dualcon' defs.append('WITH_MOD_BOOLEAN') +if env['WITH_BF_REMESH']: + defs.append('WITH_MOD_REMESH') + if env ['WITH_BF_DECIMATE']: defs.append('WITH_MOD_DECIMATE') diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index a58c0416163..c698985efc3 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -46,7 +46,9 @@ #include <stdlib.h> #include <string.h> -#include "dualcon.h" +#ifdef WITH_MOD_REMESH +# include "dualcon.h" +#endif static void initData(ModifierData *md) { @@ -73,7 +75,9 @@ static void copyData(ModifierData *md, ModifierData *target) trmd->mode = rmd->mode; } -void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm) +#ifdef WITH_MOD_REMESH + +static void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm) { memset(mesh, 0, sizeof(DualConInput)); @@ -96,7 +100,7 @@ typedef struct { } DualConOutput; /* allocate and initialize a DualConOutput */ -void *dualcon_alloc_output(int totvert, int totquad) +static void *dualcon_alloc_output(int totvert, int totquad) { DualConOutput *output; @@ -108,7 +112,7 @@ void *dualcon_alloc_output(int totvert, int totquad) return output; } -void dualcon_add_vert(void *output_v, const float co[3]) +static void dualcon_add_vert(void *output_v, const float co[3]) { DualConOutput *output = output_v; DerivedMesh *dm = output->dm; @@ -119,7 +123,7 @@ void dualcon_add_vert(void *output_v, const float co[3]) output->curvert++; } -void dualcon_add_quad(void *output_v, const int vert_indices[4]) +static void dualcon_add_quad(void *output_v, const int vert_indices[4]) { DualConOutput *output = output_v; DerivedMesh *dm = output->dm; @@ -189,6 +193,18 @@ static DerivedMesh *applyModifier(ModifierData *md, return result; } +#else /* !WITH_MOD_REMESH */ + +static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob), + DerivedMesh *derivedData, + int UNUSED(useRenderParams), + int UNUSED(isFinalCalc)) +{ + return derivedData; +} + +#endif /* !WITH_MOD_REMESH */ + ModifierTypeInfo modifierType_Remesh = { /* name */ "Remesh", /* structName */ "RemeshModifierData", |