Merged changes in the trunk up to revision 41387.
This commit is contained in:
@@ -302,6 +302,9 @@ set(PLATFORM_CFLAGS)
|
||||
set(C_WARNINGS)
|
||||
set(CXX_WARNINGS)
|
||||
|
||||
# for gcc -Wno-blah-blah
|
||||
set(CC_REMOVE_STRICT_FLAGS)
|
||||
|
||||
# libraries to link the binary with passed to target_link_libraries()
|
||||
# known as LLIBS to scons
|
||||
set(PLATFORM_LINKLIBS "")
|
||||
@@ -1250,6 +1253,9 @@ if(CMAKE_COMPILER_IS_GNUCC)
|
||||
# # this causes too many warnings, disable
|
||||
# ADD_CHECK_CXX_COMPILER_FLAG(CXX_WARNINGS CXX_WARN_UNDEFINED -Wundef)
|
||||
|
||||
# flags to undo strict flags
|
||||
ADD_CHECK_C_COMPILER_FLAG(CC_REMOVE_STRICT_FLAGS C_WARN_NO_DEPRECATED_DECLARATIONS -Wno-deprecated-declarations)
|
||||
|
||||
elseif(CMAKE_C_COMPILER_ID MATCHES "Intel")
|
||||
|
||||
ADD_CHECK_C_COMPILER_FLAG(C_WARNINGS C_WARN_ALL -Wall)
|
||||
|
||||
10
SConstruct
10
SConstruct
@@ -253,7 +253,9 @@ if 'blenderlite' in B.targets:
|
||||
target_env_defs['WITH_BF_BULLET'] = False
|
||||
target_env_defs['WITH_BF_BINRELOC'] = False
|
||||
target_env_defs['BF_BUILDINFO'] = False
|
||||
target_env_defs['BF_NO_ELBEEM'] = True
|
||||
target_env_defs['WITH_BF_FLUID'] = False
|
||||
target_env_defs['WITH_BF_DECIMATE'] = False
|
||||
target_env_defs['WITH_BF_BOOLEAN'] = False
|
||||
target_env_defs['WITH_BF_PYTHON'] = False
|
||||
target_env_defs['WITH_BF_3DMOUSE'] = False
|
||||
|
||||
@@ -323,9 +325,9 @@ if 'blenderplayer' in B.targets:
|
||||
if 'blendernogame' in B.targets:
|
||||
env['WITH_BF_GAMEENGINE'] = False
|
||||
|
||||
# disable elbeem (fluidsim) compilation?
|
||||
if env['BF_NO_ELBEEM'] == 1:
|
||||
env['CPPFLAGS'].append('-DDISABLE_ELBEEM')
|
||||
# build without elbeem (fluidsim)?
|
||||
if env['WITH_BF_FLUID'] == 1:
|
||||
env['CPPFLAGS'].append('-DWITH_MOD_FLUID')
|
||||
|
||||
|
||||
if btools.ENDIAN == "big":
|
||||
|
||||
@@ -434,7 +434,7 @@ macro(remove_strict_flags_file
|
||||
if(CMAKE_COMPILER_IS_GNUCC)
|
||||
set_source_files_properties(${_SOURCE}
|
||||
PROPERTIES
|
||||
COMPILE_FLAGS "-Wno-deprecated-declarations"
|
||||
COMPILE_FLAGS "${CC_REMOVE_STRICT_FLAGS}"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
||||
@@ -150,7 +150,9 @@ def validate_arguments(args, bc):
|
||||
'BF_GHOST_DEBUG',
|
||||
'WITH_BF_RAYOPTIMIZATION',
|
||||
'BF_RAYOPTIMIZATION_SSE_FLAGS',
|
||||
'BF_NO_ELBEEM',
|
||||
'WITH_BF_FLUID',
|
||||
'WITH_BF_DECIMATE',
|
||||
'WITH_BF_BOOLEAN',
|
||||
'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',
|
||||
'BUILDBOT_BRANCH', 'WITH_BF_3DMOUSE', 'WITH_BF_STATIC3DMOUSE', 'BF_3DMOUSE', 'BF_3DMOUSE_INC', 'BF_3DMOUSE_LIB', 'BF_3DMOUSE_LIBPATH', 'BF_3DMOUSE_LIB_STATIC'
|
||||
@@ -250,7 +252,9 @@ def read_opts(env, cfg, args):
|
||||
(BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)),
|
||||
('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
|
||||
|
||||
(BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),
|
||||
(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)),
|
||||
('BF_PROFILE_FLAGS', 'Profiling compiler flags', ''),
|
||||
(BoolVariable('WITH_BF_OPENAL', 'Use OpenAL if true', False)),
|
||||
('BF_OPENAL', 'base path for OpenAL', ''),
|
||||
|
||||
@@ -22,7 +22,7 @@ SConscript(['audaspace/SConscript',
|
||||
# perhaps get rid of intern/csg?
|
||||
NEW_CSG='false'
|
||||
|
||||
if not env['BF_NO_ELBEEM']:
|
||||
if env['WITH_BF_FLUID']:
|
||||
SConscript(['elbeem/SConscript'])
|
||||
|
||||
if NEW_CSG=='false':
|
||||
|
||||
@@ -326,8 +326,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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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"
|
||||
|
||||
|
||||
@@ -1317,7 +1317,6 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
|
||||
UvVertMap *vmap;
|
||||
UvMapVert *buf;
|
||||
MFace *mf;
|
||||
MTFace *tf;
|
||||
unsigned int a;
|
||||
int i, totuv, nverts;
|
||||
|
||||
@@ -1325,8 +1324,7 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
|
||||
|
||||
/* generate UvMapVert array */
|
||||
mf= mface;
|
||||
tf= tface;
|
||||
for(a=0; a<totface; a++, mf++, tf++)
|
||||
for(a=0; a<totface; a++, mf++)
|
||||
if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL)))
|
||||
totuv += (mf->v4)? 4: 3;
|
||||
|
||||
@@ -1346,8 +1344,7 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
|
||||
}
|
||||
|
||||
mf= mface;
|
||||
tf= tface;
|
||||
for(a=0; a<totface; a++, mf++, tf++) {
|
||||
for(a=0; a<totface; a++, mf++) {
|
||||
if(!selected || (!(mf->flag & ME_HIDE) && (mf->flag & ME_FACE_SEL))) {
|
||||
nverts= (mf->v4)? 4: 3;
|
||||
|
||||
@@ -1363,7 +1360,6 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
|
||||
}
|
||||
|
||||
/* sort individual uvs for each vert */
|
||||
tf= tface;
|
||||
for(a=0; a<totvert; a++) {
|
||||
UvMapVert *newvlist= NULL, *vlist=vmap->vert[a];
|
||||
UvMapVert *iterv, *v, *lastv, *next;
|
||||
@@ -1375,14 +1371,14 @@ UvVertMap *make_uv_vert_map(struct MFace *mface, struct MTFace *tface, unsigned
|
||||
v->next= newvlist;
|
||||
newvlist= v;
|
||||
|
||||
uv= (tf+v->f)->uv[v->tfindex];
|
||||
uv= tface[v->f].uv[v->tfindex];
|
||||
lastv= NULL;
|
||||
iterv= vlist;
|
||||
|
||||
while(iterv) {
|
||||
next= iterv->next;
|
||||
|
||||
uv2= (tf+iterv->f)->uv[iterv->tfindex];
|
||||
uv2= tface[iterv->f].uv[iterv->tfindex];
|
||||
sub_v2_v2v2(uvdiff, uv2, uv);
|
||||
|
||||
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -1844,7 +1844,7 @@ void BLI_where_is_temp(char *fullname, const size_t maxlen, char *userdir)
|
||||
/* add a trailing slash if needed */
|
||||
BLI_add_slash(fullname);
|
||||
#ifdef WIN32
|
||||
if(userdir != fullname) {
|
||||
if(userdir && userdir != fullname) {
|
||||
BLI_strncpy(userdir, fullname, maxlen); /* also set user pref to show %TEMP%. /tmp/ is just plain confusing for Windows users. */
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 ******************************/
|
||||
|
||||
|
||||
@@ -196,8 +196,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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -410,7 +410,7 @@ void RNA_api_ui_layout(StructRNA *srna)
|
||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||
parm= RNA_def_string(func, "prop_list", "", 0, "",
|
||||
"Identifier of a string property in each data member, specifying which "
|
||||
"of its properties should have a widget displayed in its row.");
|
||||
"of its properties should have a widget displayed in its row");
|
||||
RNA_def_int(func, "rows", 5, 0, INT_MAX, "", "Number of rows to display", 0, INT_MAX);
|
||||
RNA_def_int(func, "maxrows", 5, 0, INT_MAX, "", "Maximum number of rows to display", 0, INT_MAX);
|
||||
RNA_def_enum(func, "type", list_type_items, 0, "Type", "Type of list to use");
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -33,9 +33,9 @@
|
||||
|
||||
/* **************** MIX RGB ******************** */
|
||||
static bNodeSocketTemplate cmp_node_mix_rgb_in[]= {
|
||||
{ SOCK_FLOAT, 1, "Fac", 0.5f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR},
|
||||
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
|
||||
{ SOCK_RGBA, 1, "Image", 0.8f, 0.8f, 0.8f, 1.0f},
|
||||
{ SOCK_FLOAT, 1, "Fac", 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 5.0f, PROP_FACTOR},
|
||||
{ SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
|
||||
{ SOCK_RGBA, 1, "Image", 1.0f, 1.0f, 1.0f, 1.0f},
|
||||
{ -1, 0, "" }
|
||||
};
|
||||
static bNodeSocketTemplate cmp_node_mix_rgb_out[]= {
|
||||
|
||||
Reference in New Issue
Block a user