option to build without remesh modifier for cmake and scons
This commit is contained in:
@@ -169,6 +169,7 @@ option(WITH_MOD_FLUID "Enable Elbeem Modifier (Fluid Simulation)" ON)
|
|||||||
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
|
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
|
||||||
option(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON)
|
option(WITH_MOD_DECIMATE "Enable Decimate Modifier" ON)
|
||||||
option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON)
|
option(WITH_MOD_BOOLEAN "Enable Boolean Modifier" ON)
|
||||||
|
option(WITH_MOD_REMESH "Enable Remesh Modifier" ON)
|
||||||
option(WITH_MOD_CLOTH_ELTOPO "Enable Experemental cloth solver" OFF)
|
option(WITH_MOD_CLOTH_ELTOPO "Enable Experemental cloth solver" OFF)
|
||||||
mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
|
mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
|
||||||
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
|
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
|
||||||
@@ -1570,6 +1571,7 @@ if(FIRST_RUN)
|
|||||||
|
|
||||||
info_cfg_text("Modifiers:")
|
info_cfg_text("Modifiers:")
|
||||||
info_cfg_option(WITH_MOD_BOOLEAN)
|
info_cfg_option(WITH_MOD_BOOLEAN)
|
||||||
|
info_cfg_option(WITH_MOD_REMESH)
|
||||||
info_cfg_option(WITH_MOD_DECIMATE)
|
info_cfg_option(WITH_MOD_DECIMATE)
|
||||||
info_cfg_option(WITH_MOD_FLUID)
|
info_cfg_option(WITH_MOD_FLUID)
|
||||||
info_cfg_option(WITH_MOD_OCEANSIM)
|
info_cfg_option(WITH_MOD_OCEANSIM)
|
||||||
|
@@ -264,6 +264,7 @@ if 'blenderlite' in B.targets:
|
|||||||
target_env_defs['WITH_BF_OCEANSIM'] = False
|
target_env_defs['WITH_BF_OCEANSIM'] = False
|
||||||
target_env_defs['WITH_BF_DECIMATE'] = False
|
target_env_defs['WITH_BF_DECIMATE'] = False
|
||||||
target_env_defs['WITH_BF_BOOLEAN'] = False
|
target_env_defs['WITH_BF_BOOLEAN'] = False
|
||||||
|
target_env_defs['WITH_BF_REMESH'] = False
|
||||||
target_env_defs['WITH_BF_PYTHON'] = False
|
target_env_defs['WITH_BF_PYTHON'] = False
|
||||||
target_env_defs['WITH_BF_3DMOUSE'] = False
|
target_env_defs['WITH_BF_3DMOUSE'] = False
|
||||||
|
|
||||||
|
@@ -152,6 +152,7 @@ def validate_arguments(args, bc):
|
|||||||
'WITH_BF_FLUID',
|
'WITH_BF_FLUID',
|
||||||
'WITH_BF_DECIMATE',
|
'WITH_BF_DECIMATE',
|
||||||
'WITH_BF_BOOLEAN',
|
'WITH_BF_BOOLEAN',
|
||||||
|
'WITH_BF_REMESH',
|
||||||
'WITH_BF_OCEANSIM',
|
'WITH_BF_OCEANSIM',
|
||||||
'WITH_BF_CXX_GUARDEDALLOC',
|
'WITH_BF_CXX_GUARDEDALLOC',
|
||||||
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
|
'WITH_BF_JEMALLOC', 'WITH_BF_STATICJEMALLOC', 'BF_JEMALLOC', 'BF_JEMALLOC_INC', 'BF_JEMALLOC_LIBPATH', 'BF_JEMALLOC_LIB', 'BF_JEMALLOC_LIB_STATIC',
|
||||||
@@ -261,6 +262,7 @@ def read_opts(env, cfg, args):
|
|||||||
(BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
|
(BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
|
||||||
(BoolVariable('WITH_BF_DECIMATE', 'Build with decimate modifier', True)),
|
(BoolVariable('WITH_BF_DECIMATE', 'Build with decimate modifier', True)),
|
||||||
(BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
|
(BoolVariable('WITH_BF_BOOLEAN', 'Build with boolean modifier', True)),
|
||||||
|
(BoolVariable('WITH_BF_REMESH', 'Build with remesh modifier', True)),
|
||||||
(BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
|
(BoolVariable('WITH_BF_OCEANSIM', 'Build with ocean simulation', False)),
|
||||||
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
|
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
|
||||||
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
|
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
|
||||||
|
@@ -31,12 +31,15 @@ add_subdirectory(memutil)
|
|||||||
add_subdirectory(iksolver)
|
add_subdirectory(iksolver)
|
||||||
add_subdirectory(opennl)
|
add_subdirectory(opennl)
|
||||||
add_subdirectory(mikktspace)
|
add_subdirectory(mikktspace)
|
||||||
add_subdirectory(dualcon)
|
|
||||||
|
|
||||||
if(WITH_AUDASPACE)
|
if(WITH_AUDASPACE)
|
||||||
add_subdirectory(audaspace)
|
add_subdirectory(audaspace)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_MOD_REMESH)
|
||||||
|
add_subdirectory(dualcon)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_MOD_FLUID)
|
if(WITH_MOD_FLUID)
|
||||||
add_subdirectory(elbeem)
|
add_subdirectory(elbeem)
|
||||||
endif()
|
endif()
|
||||||
|
@@ -9,7 +9,6 @@ SConscript(['audaspace/SConscript',
|
|||||||
'container/SConscript',
|
'container/SConscript',
|
||||||
'memutil/SConscript/',
|
'memutil/SConscript/',
|
||||||
'decimation/SConscript',
|
'decimation/SConscript',
|
||||||
'dualcon/SConscript',
|
|
||||||
'iksolver/SConscript',
|
'iksolver/SConscript',
|
||||||
'itasc/SConscript',
|
'itasc/SConscript',
|
||||||
'boolop/SConscript',
|
'boolop/SConscript',
|
||||||
@@ -23,6 +22,9 @@ SConscript(['audaspace/SConscript',
|
|||||||
# perhaps get rid of intern/csg?
|
# perhaps get rid of intern/csg?
|
||||||
NEW_CSG='false'
|
NEW_CSG='false'
|
||||||
|
|
||||||
|
if env ['WITH_BF_REMESH']:
|
||||||
|
SConscript(['dualcon/SConscript'])
|
||||||
|
|
||||||
if env['WITH_BF_FLUID']:
|
if env['WITH_BF_FLUID']:
|
||||||
SConscript(['elbeem/SConscript'])
|
SConscript(['elbeem/SConscript'])
|
||||||
|
|
||||||
|
@@ -36,7 +36,6 @@ set(INC
|
|||||||
../render/extern/include
|
../render/extern/include
|
||||||
../../../intern/elbeem/extern
|
../../../intern/elbeem/extern
|
||||||
../../../intern/guardedalloc
|
../../../intern/guardedalloc
|
||||||
../../../intern/dualcon
|
|
||||||
)
|
)
|
||||||
|
|
||||||
set(INC_SYS
|
set(INC_SYS
|
||||||
@@ -108,6 +107,13 @@ if(WITH_MOD_BOOLEAN)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(WITH_MOD_REMESH)
|
||||||
|
add_definitions(-DWITH_MOD_REMESH)
|
||||||
|
list(APPEND INC
|
||||||
|
../../../intern/dualcon
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(WITH_MOD_DECIMATE)
|
if(WITH_MOD_DECIMATE)
|
||||||
add_definitions(-DWITH_MOD_DECIMATE)
|
add_definitions(-DWITH_MOD_DECIMATE)
|
||||||
list(APPEND INC
|
list(APPEND INC
|
||||||
|
@@ -4,7 +4,7 @@ Import ('env')
|
|||||||
sources = env.Glob('intern/*.c')
|
sources = env.Glob('intern/*.c')
|
||||||
|
|
||||||
incs = '. ./intern'
|
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 += ' ../render/extern/include ../blenloader'
|
||||||
incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern'
|
incs += ' ../include ../blenlib ../makesdna ../makesrna ../blenkernel ../blenkernel/intern'
|
||||||
incs += ' ../gpu'
|
incs += ' ../gpu'
|
||||||
@@ -14,8 +14,12 @@ incs += ' ' + env['BF_ZLIB_INC']
|
|||||||
defs = []
|
defs = []
|
||||||
|
|
||||||
if env ['WITH_BF_BOOLEAN']:
|
if env ['WITH_BF_BOOLEAN']:
|
||||||
|
incs += ' #/intern/dualcon'
|
||||||
defs.append('WITH_MOD_BOOLEAN')
|
defs.append('WITH_MOD_BOOLEAN')
|
||||||
|
|
||||||
|
if env['WITH_BF_REMESH']:
|
||||||
|
defs.append('WITH_MOD_REMESH')
|
||||||
|
|
||||||
if env ['WITH_BF_DECIMATE']:
|
if env ['WITH_BF_DECIMATE']:
|
||||||
defs.append('WITH_MOD_DECIMATE')
|
defs.append('WITH_MOD_DECIMATE')
|
||||||
|
|
||||||
|
@@ -46,7 +46,9 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifdef WITH_MOD_REMESH
|
||||||
# include "dualcon.h"
|
# include "dualcon.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
static void initData(ModifierData *md)
|
static void initData(ModifierData *md)
|
||||||
{
|
{
|
||||||
@@ -73,7 +75,9 @@ static void copyData(ModifierData *md, ModifierData *target)
|
|||||||
trmd->mode = rmd->mode;
|
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));
|
memset(mesh, 0, sizeof(DualConInput));
|
||||||
|
|
||||||
@@ -96,7 +100,7 @@ typedef struct {
|
|||||||
} DualConOutput;
|
} DualConOutput;
|
||||||
|
|
||||||
/* allocate and initialize a 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;
|
DualConOutput *output;
|
||||||
|
|
||||||
@@ -108,7 +112,7 @@ void *dualcon_alloc_output(int totvert, int totquad)
|
|||||||
return output;
|
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;
|
DualConOutput *output = output_v;
|
||||||
DerivedMesh *dm = output->dm;
|
DerivedMesh *dm = output->dm;
|
||||||
@@ -119,7 +123,7 @@ void dualcon_add_vert(void *output_v, const float co[3])
|
|||||||
output->curvert++;
|
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;
|
DualConOutput *output = output_v;
|
||||||
DerivedMesh *dm = output->dm;
|
DerivedMesh *dm = output->dm;
|
||||||
@@ -189,6 +193,18 @@ static DerivedMesh *applyModifier(ModifierData *md,
|
|||||||
return result;
|
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 = {
|
ModifierTypeInfo modifierType_Remesh = {
|
||||||
/* name */ "Remesh",
|
/* name */ "Remesh",
|
||||||
/* structName */ "RemeshModifierData",
|
/* structName */ "RemeshModifierData",
|
||||||
|
Reference in New Issue
Block a user