Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index f4d31ee5bb5..b2f62f21cf1 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -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;