Undoing an operation while baking fluids freezes Blender
Closed, ResolvedPublic


Simple steps to recreate freeze:

While baking a fluid simulation, make any modification to anything in the scene (move, rotate, add/remove keyframe etc) then hit undo. Blender should freeze.


Verbose steps to recreate freeze:

1. Create a cube mesh.

2. Hit Space, type Make Fluid and run the command (or make your own domain and turn the cube mesh into a fluid).

3. Set the resolution of the domain to 250, or something equally high to get it to bake long enough to give you a chance to test this bug.

4. Bake fluid simulation

5. While simulation is baking, make an adjustment anything in the scene, ie move or rotate the light/domain/fluid... anything

6. Hit ctrl+z to undo while still baking.

7. Blender should freeze

Blender 2.57.1 r36339 64bit
Windows 7 64bit
Intel Core2 Duo E8500 3.61ghz
AMD Radeon HD4860



Yeah... fluid sim is not resistant to our undo system.

Not sure what to do with it, need advice from Janne if there's a way to detect bake-in-progress and disable 3d editing then.
janne: give me some info and assign to me to add code for it :)

The fluid bake is a job just like rendering (bake operator in editors/physics/physics_fluid.c), so you can check if a bake is running with WM_jobs_test(CTX_wm_manager(C), CTX_data_scene(C)). In theory 3d editing could be allowed during a fluid bake as the fluidsim creates an internal representation of all needed data before starting the bake, but undo seems to mess things up.

I'll gladly leave the decision of how to handle this to you Ton :)

Should be fixed in svn rev42257. Thanks for the report, closing.

Sergey Sharybin (sergey) closed this task as "Resolved".Nov 29 2011, 4:28 PM