diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-08-03 13:40:06 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-08-03 13:40:06 +0300 |
commit | 3c9cb62d823243f7460119db64f068ca7bc9e717 (patch) | |
tree | 1bf3f34181ee9bb86c899e0d55aede549713cfd9 /source | |
parent | db5915d86353a16f6d6634ae3dba0acbc4553505 (diff) | |
parent | 33e6562a8a1ab84b0de92857dcd7decbffe3f263 (diff) |
Merge branch 'blender-v2.90-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesrna/intern/rna_fluid.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_fluid.c b/source/blender/makesrna/intern/rna_fluid.c index 3af783f1bb1..8d8a9620466 100644 --- a/source/blender/makesrna/intern/rna_fluid.c +++ b/source/blender/makesrna/intern/rna_fluid.c @@ -1024,14 +1024,18 @@ static void rna_Fluid_flowtype_set(struct PointerRNA *ptr, int value) FluidFlowSettings *settings = (FluidFlowSettings *)ptr->data; if (value != settings->type) { + short prev_value = settings->type; settings->type = value; - /* Force flow source to mesh */ + /* Force flow source to mesh for liquids. + * Also use different surface emission. Liquids should by default not emit around surface. */ if (value == FLUID_FLOW_TYPE_LIQUID) { rna_Fluid_flowsource_set(ptr, FLUID_FLOW_SOURCE_MESH); settings->surface_distance = 0.0f; } - else { + /* Use some surface emission when switching to a gas emitter. Gases should by default emit a + * bit around surface. */ + if (prev_value == FLUID_FLOW_TYPE_LIQUID) { settings->surface_distance = 1.5f; } } |