Bug fix: Fluidsim crashed after clicking "bake" multiple times
* Fluid baking didn't check if there was already an ongoing job before starting a new job.
This commit is contained in:
@@ -1081,9 +1081,11 @@ static int fluidsimBake(bContext *UNUSED(C), ReportList *UNUSED(reports), Object
|
||||
|
||||
static int fluid_bake_exec(bContext *C, wmOperator *op)
|
||||
{
|
||||
Object *ob= CTX_data_active_object(C);
|
||||
/* only one bake job at a time */
|
||||
if(WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)))
|
||||
return 0;
|
||||
|
||||
if(!fluidsimBake(C, op->reports, ob))
|
||||
if(!fluidsimBake(C, op->reports, CTX_data_active_object(C)))
|
||||
return OPERATOR_CANCELLED;
|
||||
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
Reference in New Issue
Block a user