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-08-01 00:27:51 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-08-01 00:27:51 +0300
commit106e7654e85760fe1170ec2ab0cbdb33e59fe8a8 (patch)
treefafe1cf38f3ff5baa492ef5c09c1eb248fe124f3
parent251ae108e7f5546d8fd2e6da33dbc6addc4895ae (diff)
Fluid: Another adjustment for Python pointers
Yet another update to ensure that pointer variables are always up to date, i.e. those referencing the memory allocated by Mantaflow. Outdated pointers usually show up through flickering in viewport.
-rw-r--r--source/blender/blenkernel/intern/fluid.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index 1629b07faf3..ad517fe1c23 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -1119,6 +1119,7 @@ static void ensure_obstaclefields(FluidDomainSettings *fds)
if (fds->active_fields & FLUID_DOMAIN_ACTIVE_GUIDE) {
manta_ensure_guiding(fds->fluid, fds->fmd);
}
+ manta_update_pointers(fds->fluid, fds->fmd);
}
static void update_obstacleflags(FluidDomainSettings *fds,
@@ -2605,6 +2606,7 @@ static void ensure_flowsfields(FluidDomainSettings *fds)
fds->particle_type & FLUID_DOMAIN_PARTICLE_TRACER)) {
manta_liquid_ensure_sndparts(fds->fluid, fds->fmd);
}
+ manta_update_pointers(fds->fluid, fds->fmd);
}
static void update_flowsflags(FluidDomainSettings *fds, Object **flowobjs, int numflowobj)
@@ -3627,11 +3629,7 @@ static int manta_step(
manta_smoke_calc_transparency(fds, DEG_get_evaluated_view_layer(depsgraph));
}
- /* Ensure that fluid data is always up to date. */
- manta_update_pointers(fds->fluid, fmd);
-
BLI_mutex_unlock(&object_update_lock);
-
return result;
}
@@ -4080,6 +4078,9 @@ static void BKE_fluid_modifier_processDomain(FluidModifierData *fmd,
}
}
+ /* Ensure that fluid pointers are always up to date at the end of modifier processing. */
+ manta_update_pointers(fds->fluid, fmd);
+
fds->flags &= ~FLUID_DOMAIN_FILE_LOAD;
fmd->time = scene_framenr;
}