diff options
author | Matt Ebb <matt@mke3.net> | 2010-06-07 07:02:47 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2010-06-07 07:02:47 +0400 |
commit | e27756f0dcce28bd026fc35a66dde85fa491d569 (patch) | |
tree | 0fa82b5681dbc88659766b8d169f62389e244c23 /source/blender/editors/physics | |
parent | a8acb22f6a969a3db3dd1e4049c84dd8baf99379 (diff) |
Fix [#22504] Fluid is completely broken in latest 2.5 build (04.06.2010)
Silly typo - some other tweaks too.
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r-- | source/blender/editors/physics/physics_fluid.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c index 4d62d823345..23f604d8c12 100644 --- a/source/blender/editors/physics/physics_fluid.c +++ b/source/blender/editors/physics/physics_fluid.c @@ -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; |