[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43020] trunk/blender: option to build without remesh modifier for cmake and scons
Campbell Barton
ideasman42 at gmail.com
Sat Dec 31 04:34:50 CET 2011
Revision: 43020
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43020
Author: campbellbarton
Date: 2011-12-31 03:34:44 +0000 (Sat, 31 Dec 2011)
Log Message:
-----------
option to build without remesh modifier for cmake and scons
Modified Paths:
--------------
trunk/blender/CMakeLists.txt
trunk/blender/SConstruct
trunk/blender/build_files/scons/tools/btools.py
trunk/blender/intern/CMakeLists.txt
trunk/blender/intern/SConscript
trunk/blender/source/blender/modifiers/CMakeLists.txt
trunk/blender/source/blender/modifiers/SConscript
trunk/blender/source/blender/modifiers/intern/MOD_remesh.c
Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/CMakeLists.txt 2011-12-31 03:34:44 UTC (rev 43020)
@@ -169,6 +169,7 @@
option(WITH_MOD_SMOKE "Enable Smoke Modifier (Smoke Simulation)" ON)
option(WITH_MOD_DECIMATE "Enable Decimate 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)
mark_as_advanced(WITH_MOD_CLOTH_ELTOPO)
option(WITH_MOD_OCEANSIM "Enable Ocean Modifier" OFF)
@@ -1570,6 +1571,7 @@
info_cfg_text("Modifiers:")
info_cfg_option(WITH_MOD_BOOLEAN)
+ info_cfg_option(WITH_MOD_REMESH)
info_cfg_option(WITH_MOD_DECIMATE)
info_cfg_option(WITH_MOD_FLUID)
info_cfg_option(WITH_MOD_OCEANSIM)
Modified: trunk/blender/SConstruct
===================================================================
--- trunk/blender/SConstruct 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/SConstruct 2011-12-31 03:34:44 UTC (rev 43020)
@@ -264,6 +264,7 @@
target_env_defs['WITH_BF_OCEANSIM'] = False
target_env_defs['WITH_BF_DECIMATE'] = 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_3DMOUSE'] = False
Modified: trunk/blender/build_files/scons/tools/btools.py
===================================================================
--- trunk/blender/build_files/scons/tools/btools.py 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/build_files/scons/tools/btools.py 2011-12-31 03:34:44 UTC (rev 43020)
@@ -152,6 +152,7 @@
'WITH_BF_FLUID',
'WITH_BF_DECIMATE',
'WITH_BF_BOOLEAN',
+ 'WITH_BF_REMESH',
'WITH_BF_OCEANSIM',
'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',
@@ -261,6 +262,7 @@
(BoolVariable('WITH_BF_FLUID', 'Build with Fluid simulation (Elbeem)', True)),
(BoolVariable('WITH_BF_DECIMATE', 'Build with decimate 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)),
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
Modified: trunk/blender/intern/CMakeLists.txt
===================================================================
--- trunk/blender/intern/CMakeLists.txt 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/intern/CMakeLists.txt 2011-12-31 03:34:44 UTC (rev 43020)
@@ -31,12 +31,15 @@
add_subdirectory(iksolver)
add_subdirectory(opennl)
add_subdirectory(mikktspace)
-add_subdirectory(dualcon)
if(WITH_AUDASPACE)
add_subdirectory(audaspace)
endif()
+if(WITH_MOD_REMESH)
+ add_subdirectory(dualcon)
+endif()
+
if(WITH_MOD_FLUID)
add_subdirectory(elbeem)
endif()
Modified: trunk/blender/intern/SConscript
===================================================================
--- trunk/blender/intern/SConscript 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/intern/SConscript 2011-12-31 03:34:44 UTC (rev 43020)
@@ -9,7 +9,6 @@
'container/SConscript',
'memutil/SConscript/',
'decimation/SConscript',
- 'dualcon/SConscript',
'iksolver/SConscript',
'itasc/SConscript',
'boolop/SConscript',
@@ -23,6 +22,9 @@
# perhaps get rid of intern/csg?
NEW_CSG='false'
+if env ['WITH_BF_REMESH']:
+ SConscript(['dualcon/SConscript'])
+
if env['WITH_BF_FLUID']:
SConscript(['elbeem/SConscript'])
Modified: trunk/blender/source/blender/modifiers/CMakeLists.txt
===================================================================
--- trunk/blender/source/blender/modifiers/CMakeLists.txt 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/source/blender/modifiers/CMakeLists.txt 2011-12-31 03:34:44 UTC (rev 43020)
@@ -36,7 +36,6 @@
../render/extern/include
../../../intern/elbeem/extern
../../../intern/guardedalloc
- ../../../intern/dualcon
)
set(INC_SYS
@@ -108,6 +107,13 @@
)
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
Modified: trunk/blender/source/blender/modifiers/SConscript
===================================================================
--- trunk/blender/source/blender/modifiers/SConscript 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/source/blender/modifiers/SConscript 2011-12-31 03:34:44 UTC (rev 43020)
@@ -4,7 +4,7 @@
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 @@
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')
Modified: trunk/blender/source/blender/modifiers/intern/MOD_remesh.c
===================================================================
--- trunk/blender/source/blender/modifiers/intern/MOD_remesh.c 2011-12-31 03:12:33 UTC (rev 43019)
+++ trunk/blender/source/blender/modifiers/intern/MOD_remesh.c 2011-12-31 03:34:44 UTC (rev 43020)
@@ -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 @@
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 @@
} 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 @@
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 @@
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 @@
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",
More information about the Bf-blender-cvs
mailing list