Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2011-10-30 03:56:07 +0400
committerThomas Dinges <blender@dingto.org>2011-10-30 03:56:07 +0400
commitf837b46a2b561293660a0edf9d4de5ff16922f42 (patch)
tree1db91f74223cee5a678bc2d36011ccfd7da4064c /source/blender
parent15bd96efeb77cf33215613a53059f01db7242b31 (diff)
Modifier compilation tweaks (Blender conference commit)
* Fluid compilation: Inverse the compile flag from DISABLE_ELBEEM to WITH_MOD_FLUID for consistency. (scons/cmake) * Use WITH_BF_FLUID in your user config (scons) * Add support for scons to disable build with Decimate and Boolean modifier. (WITH_BF_DECIMATE and WITH_BF_BOOLEAN)
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/blenkernel/CMakeLists.txt4
-rw-r--r--source/blender/blenkernel/SConscript4
-rw-r--r--source/blender/blenkernel/intern/effect.c4
-rw-r--r--source/blender/blenkernel/intern/particle_system.c8
-rw-r--r--source/blender/editors/physics/CMakeLists.txt4
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
-rw-r--r--source/blender/makesrna/intern/CMakeLists.txt4
-rw-r--r--source/blender/makesrna/intern/rna_fluidsim.c4
-rw-r--r--source/blender/modifiers/CMakeLists.txt4
-rw-r--r--source/blender/modifiers/SConscript12
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim_util.c11
11 files changed, 34 insertions, 31 deletions
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 1930e7223f9..1b98dd914aa 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -323,8 +323,8 @@ if(WITH_OPENMP)
add_definitions(-DPARALLEL=1)
endif()
-if(NOT WITH_MOD_FLUID)
- add_definitions(-DDISABLE_ELBEEM)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_MOD_FLUID)
endif()
if(WITH_MOD_SMOKE)
diff --git a/source/blender/blenkernel/SConscript b/source/blender/blenkernel/SConscript
index 512eec4021f..ebb09352a55 100644
--- a/source/blender/blenkernel/SConscript
+++ b/source/blender/blenkernel/SConscript
@@ -79,8 +79,8 @@ if env['OURPLATFORM'] == 'darwin':
if env['WITH_BF_OPENMP']:
defs.append('PARALLEL=1')
-if env['BF_NO_ELBEEM']:
- defs.append('DISABLE_ELBEEM')
+if env['WITH_BF_FLUID']:
+ defs.append('WITH_MOD_FLUID')
if env['WITH_BF_LZO']:
incs += ' #/extern/lzo/minilzo'
diff --git a/source/blender/blenkernel/intern/effect.c b/source/blender/blenkernel/intern/effect.c
index c4543df0d16..bb14a1ddeaf 100644
--- a/source/blender/blenkernel/intern/effect.c
+++ b/source/blender/blenkernel/intern/effect.c
@@ -91,12 +91,12 @@
#include "RE_shader_ext.h"
/* fluid sim particle import */
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
#include "DNA_object_fluidsim.h"
#include "LBM_fluidsim.h"
#include <zlib.h>
#include <string.h>
-#endif // DISABLE_ELBEEM
+#endif // WITH_MOD_FLUID
//XXX #include "BIF_screen.h"
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index f904f246b65..ec058b23050 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -95,13 +95,13 @@
#include "RE_shader_ext.h"
/* fluid sim particle import */
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
#include "DNA_object_fluidsim.h"
#include "LBM_fluidsim.h"
#include <zlib.h>
#include <string.h>
-#endif // DISABLE_ELBEEM
+#endif // WITH_MOD_FLUID
/************************************************/
/* Reacting to system events */
@@ -3916,7 +3916,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
}
/* fluid sim particle import handling, actual loading of particles from file */
- #ifndef DISABLE_ELBEEM
+ #ifdef WITH_MOD_FLUID
{
FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(sim->ob, eModifierType_Fluidsim);
@@ -4009,7 +4009,7 @@ static void particles_fluid_step(ParticleSimulationData *sim, int UNUSED(cfra))
} // fluid sim particles done
}
- #endif // DISABLE_ELBEEM
+ #endif // WITH_MOD_FLUID
}
static int emit_particles(ParticleSimulationData *sim, PTCacheID *pid, float UNUSED(cfra))
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index f98122eccbd..382e12cce6c 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -45,8 +45,8 @@ set(SRC
physics_intern.h
)
-if(NOT WITH_MOD_FLUID)
- add_definitions(-DDISABLE_ELBEEM)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_MOD_FLUID)
endif()
if(WITH_OPENMP)
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index f0c327b9279..6e88d477d9c 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -85,7 +85,7 @@
#include "physics_intern.h" // own include
/* enable/disable overall compilation */
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
#include "WM_api.h"
@@ -1111,7 +1111,7 @@ void fluidsimFreeBake(Object *UNUSED(ob))
/* not implemented yet */
}
-#else /* DISABLE_ELBEEM */
+#else /* WITH_MOD_FLUID */
/* compile dummy functions for disabled fluid sim */
@@ -1135,7 +1135,7 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
return 0;
}
-#endif /* DISABLE_ELBEEM */
+#endif /* WITH_MOD_FLUID */
/***************************** Operators ******************************/
diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt
index 59b251317dc..ab69addbbdb 100644
--- a/source/blender/makesrna/intern/CMakeLists.txt
+++ b/source/blender/makesrna/intern/CMakeLists.txt
@@ -195,8 +195,8 @@ if(WITH_CODEC_FFMPEG)
add_definitions(-DWITH_FFMPEG)
endif()
-if(NOT WITH_MOD_FLUID)
- add_definitions(-DDISABLE_ELBEEM)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_MOD_FLUID)
endif()
if(WITH_FFTW3)
diff --git a/source/blender/makesrna/intern/rna_fluidsim.c b/source/blender/makesrna/intern/rna_fluidsim.c
index d2d24e083b1..a7eedf5f062 100644
--- a/source/blender/makesrna/intern/rna_fluidsim.c
+++ b/source/blender/makesrna/intern/rna_fluidsim.c
@@ -170,7 +170,7 @@ static void rna_FluidSettings_update_type(Main *bmain, Scene *scene, PointerRNA
static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *value)
{
-#ifdef DISABLE_ELBEEM
+#ifndef WITH_MOD_FLUID
(void)ptr;
value[0]= '\0';
#else
@@ -183,7 +183,7 @@ static void rna_DomainFluidSettings_memory_estimate_get(PointerRNA *ptr, char *v
static int rna_DomainFluidSettings_memory_estimate_length(PointerRNA *UNUSED(ptr))
{
-#ifdef DISABLE_ELBEEM
+#ifndef WITH_MOD_FLUID
return 0;
#else
return 31;
diff --git a/source/blender/modifiers/CMakeLists.txt b/source/blender/modifiers/CMakeLists.txt
index 7e06ef1d017..805cd913aa0 100644
--- a/source/blender/modifiers/CMakeLists.txt
+++ b/source/blender/modifiers/CMakeLists.txt
@@ -111,8 +111,8 @@ if(WITH_MOD_DECIMATE)
)
endif()
-if(NOT WITH_MOD_FLUID)
- add_definitions(-DDISABLE_ELBEEM)
+if(WITH_MOD_FLUID)
+ add_definitions(-DWITH_MOD_FLUID)
endif()
if(WITH_GAMEENGINE)
diff --git a/source/blender/modifiers/SConscript b/source/blender/modifiers/SConscript
index 77a2d577fb5..277ed2c3fb3 100644
--- a/source/blender/modifiers/SConscript
+++ b/source/blender/modifiers/SConscript
@@ -13,12 +13,14 @@ incs += ' ' + env['BF_ZLIB_INC']
defs = []
-# could be made optional
-defs += ['WITH_MOD_BOOLEAN']
-defs += ['WITH_MOD_DECIMATE']
+if env ['WITH_BF_BOOLEAN']:
+ defs.append('WITH_MOD_BOOLEAN')
-if env['BF_NO_ELBEEM']:
- defs.append('DISABLE_ELBEEM')
+if env ['WITH_BF_DECIMATE']:
+ defs.append('WITH_MOD_DECIMATE')
+
+if env['WITH_BF_FLUID']:
+ defs.append('WITH_MOD_FLUID')
if env['WITH_BF_GAMEENGINE']:
incs += ' #/extern/recastnavigation'
diff --git a/source/blender/modifiers/intern/MOD_fluidsim_util.c b/source/blender/modifiers/intern/MOD_fluidsim_util.c
index 0e9b71c3e6d..1baa03d2063 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim_util.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim_util.c
@@ -62,9 +62,10 @@
// headers for fluidsim bobj meshes
#include "LBM_fluidsim.h"
+
void fluidsim_init(FluidsimModifierData *fluidmd)
{
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
if(fluidmd)
{
FluidsimSettings *fss = MEM_callocN(sizeof(FluidsimSettings), "fluidsimsettings");
@@ -152,7 +153,7 @@ void fluidsim_init(FluidsimModifierData *fluidmd)
void fluidsim_free(FluidsimModifierData *fluidmd)
{
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
if(fluidmd)
{
if(fluidmd->fss->meshVelocities)
@@ -169,7 +170,7 @@ void fluidsim_free(FluidsimModifierData *fluidmd)
return;
}
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
/* read .bobj.gz file into a fluidsimDerivedMesh struct */
static DerivedMesh *fluidsim_read_obj(const char *filename)
{
@@ -534,14 +535,14 @@ static DerivedMesh *fluidsim_read_cache(DerivedMesh *orgdm, FluidsimModifierData
return dm;
}
-#endif // DISABLE_ELBEEM
+#endif // WITH_MOD_FLUID
DerivedMesh *fluidsimModifier_do(FluidsimModifierData *fluidmd, Scene *scene,
Object *UNUSED(ob),
DerivedMesh *dm,
int useRenderParams, int UNUSED(isFinalCalc))
{
-#ifndef DISABLE_ELBEEM
+#ifdef WITH_MOD_FLUID
DerivedMesh *result = NULL;
int framenr;
FluidsimSettings *fss = NULL;