svn merge -r41335:41371

This commit is contained in:
2011-10-30 01:27:49 +00:00
26 changed files with 134 additions and 69 deletions

View File

@@ -65,7 +65,7 @@ set(CMAKE_BUILD_TYPE_INIT "Release")
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_DEBUG DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELEASE NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL NDEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO DEBUG _DEBUG)
set_property(DIRECTORY APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO NDEBUG)
#-----------------------------------------------------------------------------

View File

@@ -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":

View File

@@ -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', ''),

View File

@@ -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':

View File

@@ -327,8 +327,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)

View File

@@ -80,8 +80,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'

View File

@@ -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"

View File

@@ -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))

View File

@@ -132,7 +132,6 @@ int BLI_strcasecmp(const char *s1, const char *s2);
int BLI_strncasecmp(const char *s1, const char *s2, size_t len);
int BLI_natstrcmp(const char *s1, const char *s2);
size_t BLI_strnlen(const char *str, size_t maxlen);
void BLI_timestr(double _time, char *str); /* time var is global */
void BLI_ascii_strtolower(char *str, int len);

View File

@@ -325,8 +325,7 @@ static int rewrite_path_fixed_dirfile(char path_dir[FILE_MAXDIR], char path_file
}
if (visit_cb(userdata, path_dst, (const char *)path_src)) {
BLI_split_dirfile(path_dst, path_dir, path_file,
sizeof(path_dir), sizeof(path_file));
BLI_split_dirfile(path_dst, path_dir, path_file, FILE_MAXDIR, FILE_MAXFILE);
return TRUE;
}
else {

View File

@@ -2267,7 +2267,7 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
static void write_libraries(WriteData *wd, Main *main)
{
ListBase *lbarray[30];
ListBase *lbarray[MAX_LIBARRAY];
ID *id;
int a, tot, foundone;

View File

@@ -749,7 +749,7 @@ void uiTemplateTextureImage(uiLayout *layout, struct bContext *C, struct Tex *te
void uiTemplateReportsBanner(uiLayout *layout, struct bContext *C);
void uiTemplateKeymapItemProperties(uiLayout *layout, struct PointerRNA *ptr);
void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, int rows, int maxrows, int type);
void uiTemplateList(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *activeptr, const char *activeprop, const char *prop_list, int rows, int maxrows, int type);
/* items */
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname);

View File

@@ -2059,7 +2059,7 @@ static int list_item_icon_get(bContext *C, PointerRNA *itemptr, int rnaicon, int
return rnaicon;
}
static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop)
static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *itemptr, int i, int rnaicon, PointerRNA *activeptr, PropertyRNA *activeprop, const char *prop_list_id)
{
uiBlock *block= uiLayoutGetBlock(layout);
uiBut *but;
@@ -2164,6 +2164,54 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
/* nothing else special to do... */
uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */
}
/* There is a last chance to display custom controls (in addition to the name/label):
* If the given item property group features a string property named as prop_list,
* this tries to add controls for all properties of the item listed in that string property.
* (colon-separated names).
*
* This is especially useful for python. E.g., if you list a collection of this property
* group:
*
* class TestPropertyGroup(bpy.types.PropertyGroup):
* bool = BoolProperty(default=False)
* integer = IntProperty()
* string = StringProperty()
*
* # A string of all identifiers (colon-separated) which propertys controls should be
* # displayed in a template_list.
* template_list_controls = StringProperty(default="integer:bool:string", options={"HIDDEN"})
*
* … youll get a numfield for the integer prop, a check box for the bool prop, and a textfield
* for the string prop, after the name of each item of the collection.
*/
else if (prop_list_id) {
row = uiLayoutRow(sub, 1);
uiItemL(row, name, icon);
/* XXX: Check, as sometimes we get an itemptr looking like
* {id = {data = 0x0}, type = 0x0, data = 0x0}
* which would obviously produce a sigsev… */
if (itemptr->type) {
/* If the special property is set for the item, and it is a collection… */
PropertyRNA *prop_list= RNA_struct_find_property(itemptr, prop_list_id);
if(prop_list && RNA_property_type(prop_list) == PROP_STRING) {
int prop_names_len;
char *prop_names = RNA_property_string_get_alloc(itemptr, prop_list, NULL, 0, &prop_names_len);
char *prop_names_end= prop_names + prop_names_len;
char *id= prop_names;
char *id_next;
while (id < prop_names_end) {
if ((id_next= strchr(id, ':'))) *id_next++= '\0';
else id_next= prop_names_end;
uiItemR(row, itemptr, id, 0, NULL, 0);
id= id_next;
}
MEM_freeN(prop_names);
}
}
}
else
uiItemL(sub, name, icon); /* fails, backdrop LISTROW... */
@@ -2172,7 +2220,7 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
MEM_freeN(namebuf);
}
void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, int rows, int maxrows, int listtype)
void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *activeptr, const char *activepropname, const char *prop_list, int rows, int maxrows, int listtype)
{
//Scene *scene= CTX_data_scene(C);
PropertyRNA *prop= NULL, *activeprop;
@@ -2326,7 +2374,7 @@ void uiTemplateList(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *
/* create list items */
RNA_PROP_BEGIN(ptr, itemptr, prop) {
if(i >= pa->list_scroll && i<pa->list_scroll+items)
list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop);
list_item_row(C, col, ptr, &itemptr, i, rnaicon, activeptr, activeprop, prop_list);
i++;
}

View File

@@ -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)

View File

@@ -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 ******************************/

View File

@@ -154,7 +154,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
if((scene->r.mode & R_OSA) == 0) {
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, rr->rectf);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, rr->rectf);
}
else {
/* simple accumulation, less hassle then FSAA FBO's */
@@ -167,7 +167,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
/* first sample buffer, also initializes 'rv3d->persmat' */
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat);
glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, accum_buffer);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_buffer);
/* skip the first sample */
for(j=1; j < SAMPLES; j++) {
@@ -175,7 +175,7 @@ static void screen_opengl_render_apply(OGLRender *oglrender)
window_translate_m4(winmat_jitter, rv3d->persmat, jit_ofs[j][0] / sizex, jit_ofs[j][1] / sizey);
ED_view3d_draw_offscreen(scene, v3d, ar, sizex, sizey, NULL, winmat_jitter);
glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, accum_tmp);
GPU_offscreen_read_pixels(oglrender->ofs, GL_FLOAT, accum_tmp);
add_vn_vn(accum_buffer, accum_tmp, sizex*sizey*sizeof(float));
}
@@ -278,7 +278,7 @@ static int screen_opengl_render_init(bContext *C, wmOperator *op)
sizey= (scene->r.size*scene->r.ysch)/100;
/* corrects render size with actual size, not every card supports non-power-of-two dimensions */
ofs= GPU_offscreen_create(&sizex, &sizey, err_out);
ofs= GPU_offscreen_create(sizex, sizey, err_out);
if(!ofs) {
BKE_reportf(op->reports, RPT_ERROR, "Failed to create OpenGL offscreen buffer, %s", err_out);

View File

@@ -2379,7 +2379,7 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
glPushAttrib(GL_LIGHTING_BIT);
/* bind */
ofs= GPU_offscreen_create(&sizex, &sizey, err_out);
ofs= GPU_offscreen_create(sizex, sizey, err_out);
if(ofs == NULL)
return NULL;
@@ -2403,9 +2403,9 @@ ImBuf *ED_view3d_draw_offscreen_imbuf(Scene *scene, View3D *v3d, ARegion *ar, in
ibuf= IMB_allocImBuf(sizex, sizey, 32, flag);
if(ibuf->rect_float)
glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_FLOAT, ibuf->rect_float);
GPU_offscreen_read_pixels(ofs, GL_FLOAT, ibuf->rect_float);
else if(ibuf->rect)
glReadPixels(0, 0, sizex, sizey, GL_RGBA, GL_UNSIGNED_BYTE, ibuf->rect);
GPU_offscreen_read_pixels(ofs, GL_UNSIGNED_BYTE, ibuf->rect);
//if((scene->r.stamp & R_STAMP_ALL) && (scene->r.stamp & R_STAMP_DRAW))
// BKE_stamp_buf(scene, NULL, rr->rectf, rr->rectx, rr->recty, 4);

View File

@@ -136,7 +136,7 @@ int GPU_texture_opengl_bindcode(GPUTexture *tex);
GPUFrameBuffer *GPU_framebuffer_create(void);
int GPU_framebuffer_texture_attach(GPUFrameBuffer *fb, GPUTexture *tex, char err_out[256]);
void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex);
void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex);
void GPU_framebuffer_texture_bind(GPUFrameBuffer *fb, GPUTexture *tex, int w, int h);
void GPU_framebuffer_texture_unbind(GPUFrameBuffer *fb, GPUTexture *tex);
void GPU_framebuffer_free(GPUFrameBuffer *fb);
@@ -146,10 +146,11 @@ void GPU_framebuffer_restore(void);
- wrapper around framebuffer and texture for simple offscreen drawing
- changes size if graphics card can't support it */
GPUOffScreen *GPU_offscreen_create(int *width, int *height, char err_out[256]);
GPUOffScreen *GPU_offscreen_create(int width, int height, char err_out[256]);
void GPU_offscreen_free(GPUOffScreen *ofs);
void GPU_offscreen_bind(GPUOffScreen *ofs);
void GPU_offscreen_unbind(GPUOffScreen *ofs);
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels);
/* GPU Shader
- only for fragment shaders now

View File

@@ -790,7 +790,7 @@ void GPU_framebuffer_texture_detach(GPUFrameBuffer *fb, GPUTexture *tex)
tex->fb = NULL;
}
void GPU_framebuffer_texture_bind(GPUFrameBuffer *UNUSED(fb), GPUTexture *tex)
void GPU_framebuffer_texture_bind(GPUFrameBuffer *UNUSED(fb), GPUTexture *tex, int w, int h)
{
/* push attributes */
glPushAttrib(GL_ENABLE_BIT);
@@ -801,7 +801,7 @@ void GPU_framebuffer_texture_bind(GPUFrameBuffer *UNUSED(fb), GPUTexture *tex)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, tex->fb->object);
/* push matrices and set default viewport and matrix */
glViewport(0, 0, tex->w, tex->h);
glViewport(0, 0, w, h);
GG.currentfb = tex->fb->object;
glMatrixMode(GL_PROJECTION);
@@ -859,13 +859,19 @@ struct GPUOffScreen {
GPUFrameBuffer *fb;
GPUTexture *color;
GPUTexture *depth;
/* requested width/height, may be smaller than actual texture size due
to missing non-power of two support, so we compensate for that */
int w, h;
};
GPUOffScreen *GPU_offscreen_create(int *width, int *height, char err_out[256])
GPUOffScreen *GPU_offscreen_create(int width, int height, char err_out[256])
{
GPUOffScreen *ofs;
ofs= MEM_callocN(sizeof(GPUOffScreen), "GPUOffScreen");
ofs->w= width;
ofs->h= height;
ofs->fb = GPU_framebuffer_create();
if(!ofs->fb) {
@@ -873,24 +879,18 @@ GPUOffScreen *GPU_offscreen_create(int *width, int *height, char err_out[256])
return NULL;
}
ofs->depth = GPU_texture_create_depth(*width, *height, err_out);
ofs->depth = GPU_texture_create_depth(width, height, err_out);
if(!ofs->depth) {
GPU_offscreen_free(ofs);
return NULL;
}
if(*width!=ofs->depth->w || *height!=ofs->depth->h) {
*width= ofs->depth->w;
*height= ofs->depth->h;
printf("Offscreen size differs from given size!\n");
}
if(!GPU_framebuffer_texture_attach(ofs->fb, ofs->depth, err_out)) {
GPU_offscreen_free(ofs);
return NULL;
}
ofs->color = GPU_texture_create_2D(*width, *height, NULL, err_out);
ofs->color = GPU_texture_create_2D(width, height, NULL, err_out);
if(!ofs->color) {
GPU_offscreen_free(ofs);
return NULL;
@@ -921,7 +921,7 @@ void GPU_offscreen_free(GPUOffScreen *ofs)
void GPU_offscreen_bind(GPUOffScreen *ofs)
{
glDisable(GL_SCISSOR_TEST);
GPU_framebuffer_texture_bind(ofs->fb, ofs->color);
GPU_framebuffer_texture_bind(ofs->fb, ofs->color, ofs->w, ofs->h);
}
void GPU_offscreen_unbind(GPUOffScreen *ofs)
@@ -931,6 +931,11 @@ void GPU_offscreen_unbind(GPUOffScreen *ofs)
glEnable(GL_SCISSOR_TEST);
}
void GPU_offscreen_read_pixels(GPUOffScreen *ofs, int type, void *pixels)
{
glReadPixels(0, 0, ofs->w, ofs->h, GL_RGBA, type, pixels);
}
/* GPUShader */
struct GPUShader {

View File

@@ -1661,7 +1661,8 @@ void GPU_lamp_shadow_buffer_bind(GPULamp *lamp, float viewmat[][4], int *winsize
/* opengl */
glDisable(GL_SCISSOR_TEST);
GPU_framebuffer_texture_bind(lamp->fb, lamp->tex);
GPU_framebuffer_texture_bind(lamp->fb, lamp->tex,
GPU_texture_opengl_width(lamp->tex), GPU_texture_opengl_height(lamp->tex));
/* set matrices */
copy_m4_m4(viewmat, lamp->viewmat);

View File

@@ -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)

View File

@@ -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;

View File

@@ -408,6 +408,9 @@ void RNA_api_ui_layout(StructRNA *srna)
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL);
parm= RNA_def_string(func, "active_property", "", 0, "", "Identifier of property in data, for the active element");
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.");
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");

View File

@@ -113,8 +113,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)

View File

@@ -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'

View File

@@ -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;