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-04-07 15:22:56 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-04-07 15:31:33 +0300
commit4a83832120647044908898a9afc5e54028d78617 (patch)
treefd7724aaab62630b776026b5ab6c178a861410bf /source/blender/blenkernel/intern/fluid.c
parentea78f9922eff794858983cdb5bf3cf59e6b52b39 (diff)
Fix T74828: Fluid: Crash with Fire/Smoke Noise
Issue was that the noise simulation was trying to bake with a minimized domain size (adaptive domain initializes domain with size (1,1,1)). Similarly to the base resolution bake, there should be no noise baking happening at those domain sizes - a domain at this size is considered empty.
Diffstat (limited to 'source/blender/blenkernel/intern/fluid.c')
-rw-r--r--source/blender/blenkernel/intern/fluid.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index cbb933725eb..985d0a79b23 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -3999,7 +3999,11 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *mmd,
}
if (has_data || baking_data) {
if (baking_noise && with_smoke && with_noise) {
- manta_bake_noise(mds->fluid, mmd, scene_framenr);
+ /* Ensure that no bake occurs if domain was minimized by adaptive domain. */
+ if (mds->total_cells > 1) {
+ manta_bake_noise(mds->fluid, mmd, scene_framenr);
+ }
+ manta_write_noise(mds->fluid, mmd, scene_framenr);
}
if (baking_mesh && with_liquid && with_mesh) {
manta_bake_mesh(mds->fluid, mmd, scene_framenr);