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:
authorSebastián Barschkis <sebbas@sebbas.org>2020-03-17 15:49:47 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-03-17 15:49:57 +0300
commitb2851dbe784ea82238720a27a0942128fe8158c2 (patch)
tree0ebb9a93d77c49a6c3837b49f81f49a1575ce99e /source/blender/editors/physics/physics_fluid.c
parent54c877069245ab41f74c9d545b040355a2cf0937 (diff)
Fluid: Abort baking jobs faster
With this change baking jobs will be aborted faster. The user will not have to wait for the current frame to finish baking. The bake job will exit early and discard the incomplete frame.
Diffstat (limited to 'source/blender/editors/physics/physics_fluid.c')
-rw-r--r--source/blender/editors/physics/physics_fluid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/physics/physics_fluid.c b/source/blender/editors/physics/physics_fluid.c
index 147c765143e..2db5eb784c0 100644
--- a/source/blender/editors/physics/physics_fluid.c
+++ b/source/blender/editors/physics/physics_fluid.c
@@ -305,6 +305,12 @@ static void fluid_bake_sequence(FluidJob *job)
/* Update animation system */
ED_update_for_newframe(job->bmain, job->depsgraph);
+
+ /* If user requested stop, quit baking */
+ if (G.is_break) {
+ job->success = 0;
+ return;
+ }
}
/* Restore frame position that we were on before bake */