From 8c36f6becff2e53e8d545c4c82f3334588140c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastia=CC=81n=20Barschkis?= Date: Tue, 2 Feb 2021 17:50:08 +0100 Subject: Fix T84649: Quick liquid causing crash on scale operation This commit makes use of the updated fluid sources files (previous commit rB9ad828dbad94d279521875db47a3472a38cc9b29) --- source/blender/blenkernel/intern/fluid.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/intern/fluid.c') diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c index 0f8a11a40b2..59248e5f9f8 100644 --- a/source/blender/blenkernel/intern/fluid.c +++ b/source/blender/blenkernel/intern/fluid.c @@ -4001,8 +4001,11 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *fmd, has_config = manta_read_config(fds->fluid, fmd, mesh_frame); } - /* Update mesh data from file is faster than via Python (manta_read_mesh()). */ - has_mesh = manta_read_mesh(fds->fluid, fmd, mesh_frame); + /* Only load the mesh at the resolution it ways originally simulated at. + * The mesh files don't have a header, i.e. the don't store the grid resolution. */ + if (!manta_needs_realloc(fds->fluid, fmd)) { + has_mesh = manta_read_mesh(fds->fluid, fmd, mesh_frame); + } } /* Read particles cache. */ -- cgit v1.2.3