Fix: editor crashes during simulation bake #107621

Merged
Lukas Tönne merged 2 commits from LukasTonne/blender:fix-simulation-bake-editor-crash into main 2023-05-08 14:34:28 +02:00

2 Commits

Author SHA1 Message Date
Lukas Tönne ffc7069f1b Fix crash in timeline during simulation cache bake.
Timeline accesses the cache to determine baked frames, which can collide
with the bake operator inserting new frames. The cache needs a mutex
to prevent concurrent access to the cache frame list.
2023-05-04 15:47:25 +02:00
Lukas Tönne a6a43b11fc Fix crash in spreadsheet while baking simulation cache.
The spreadsheet keeps a GVArray of the data during drawing, which is
shared with the cache. Baking operator can update the cached data,
making the spreadsheet copy invalid.

Typical approach here: disable all UI updates while `G.rendering` is
enabled, which also works as a "mutex" for baking.
2023-05-04 15:42:05 +02:00