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:
Matt Ebb 2010-06-07 03:02:47 +00:00
parent a8acb22f6a
commit e27756f0dc

@ -770,10 +770,10 @@ static void fluidbake_endjob(void *customdata)
int runSimulationCallback(void *data, int status, int frame) {
FluidBakeJob *fb = (FluidBakeJob *)data;
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) {
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)) {
@ -794,8 +794,10 @@ static void fluidbake_free_data(FluidAnimChannels *channels, ListBase *fobjects,
MEM_freeN(fobjects);
fobjects = NULL;
MEM_freeN(fsset);
fsset = NULL;
if (fsset) {
MEM_freeN(fsset);
fsset = NULL;
}
if (fb) {
MEM_freeN(fb);
@ -835,7 +837,7 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
FluidBakeJob *fb;
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");
if(getenv(strEnvName)) {
@ -854,10 +856,10 @@ int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain)
}
/* 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);
return 0;
}
/* these both have to be valid, otherwise we wouldnt be here */
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);
/* ******** free stored animation data ******** */
fluidbake_free_data(channels, fobjects, fsset, NULL);
fluidbake_free_data(channels, fobjects, NULL, NULL);
// elbeemFree();
return 1;