forked from bartvdbraak/blender
Fix [#22504] Fluid is completely broken in latest 2.5 build (04.06.2010)
Silly typo - some other tweaks too.
This commit is contained in:
parent
a8acb22f6a
commit
e27756f0dc
@ -770,10 +770,10 @@ static void fluidbake_endjob(void *customdata)
|
|||||||
int runSimulationCallback(void *data, int status, int frame) {
|
int runSimulationCallback(void *data, int status, int frame) {
|
||||||
FluidBakeJob *fb = (FluidBakeJob *)data;
|
FluidBakeJob *fb = (FluidBakeJob *)data;
|
||||||
elbeemSimulationSettings *settings = fb->settings;
|
elbeemSimulationSettings *settings = fb->settings;
|
||||||
//printf("elbeem blender cb s%d, f%d, domainid:%d \n", status,frame, settings->domainId ); // DEBUG
|
|
||||||
|
|
||||||
if (status == FLUIDSIM_CBSTATUS_NEWFRAME) {
|
if (status == FLUIDSIM_CBSTATUS_NEWFRAME) {
|
||||||
fluidbake_updatejob(fb, frame / (float)settings->noOfFrames);
|
fluidbake_updatejob(fb, frame / (float)settings->noOfFrames);
|
||||||
|
//printf("elbeem blender cb s%d, f%d, domainid:%d noOfFrames: %d \n", status,frame, settings->domainId, settings->noOfFrames ); // DEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fluidbake_breakjob(fb)) {
|
if (fluidbake_breakjob(fb)) {
|
||||||
@ -794,8 +794,10 @@ static void fluidbake_free_data(FluidAnimChannels *channels, ListBase *fobjects,
|
|||||||
MEM_freeN(fobjects);
|
MEM_freeN(fobjects);
|
||||||
fobjects = NULL;
|
fobjects = NULL;
|
||||||
|
|
||||||
|
if (fsset) {
|
||||||
MEM_freeN(fsset);
|
MEM_freeN(fsset);
|
||||||
fsset = NULL;
|
fsset = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
if (fb) {
|
if (fb) {
|
||||||
MEM_freeN(fb);
|
MEM_freeN(fb);
|
||||||
@ -835,7 +837,7 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
|
|||||||
FluidBakeJob *fb;
|
FluidBakeJob *fb;
|
||||||
elbeemSimulationSettings *fsset= MEM_callocN(sizeof(elbeemSimulationSettings), "Fluid sim settings");
|
elbeemSimulationSettings *fsset= MEM_callocN(sizeof(elbeemSimulationSettings), "Fluid sim settings");
|
||||||
|
|
||||||
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Sim", WM_JOB_PROGRESS);
|
steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
|
||||||
fb= MEM_callocN(sizeof(FluidBakeJob), "fluid bake job");
|
fb= MEM_callocN(sizeof(FluidBakeJob), "fluid bake job");
|
||||||
|
|
||||||
if(getenv(strEnvName)) {
|
if(getenv(strEnvName)) {
|
||||||
@ -854,10 +856,10 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* check scene for sane object/modifier settings */
|
/* check scene for sane object/modifier settings */
|
||||||
if (!fluid_validate_scene(reports, scene, fsDomain))
|
if (!fluid_validate_scene(reports, scene, fsDomain)) {
|
||||||
fluidbake_free_data(channels, fobjects, fsset, fb);
|
fluidbake_free_data(channels, fobjects, fsset, fb);
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
/* these both have to be valid, otherwise we wouldnt be here */
|
/* these both have to be valid, otherwise we wouldnt be here */
|
||||||
fluidmd = (FluidsimModifierData *)modifiers_findByType(fsDomain, eModifierType_Fluidsim);
|
fluidmd = (FluidsimModifierData *)modifiers_findByType(fsDomain, eModifierType_Fluidsim);
|
||||||
@ -1041,7 +1043,7 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
|
|||||||
WM_jobs_start(CTX_wm_manager(C), steve);
|
WM_jobs_start(CTX_wm_manager(C), steve);
|
||||||
|
|
||||||
/* ******** free stored animation data ******** */
|
/* ******** free stored animation data ******** */
|
||||||
fluidbake_free_data(channels, fobjects, fsset, NULL);
|
fluidbake_free_data(channels, fobjects, NULL, NULL);
|
||||||
|
|
||||||
// elbeemFree();
|
// elbeemFree();
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user