Commit: 106e7654e85760fe1170ec2ab0cbdb33e59fe8a8
Author: Sebastián Barschkis
Date: Fri Jul 31 23:27:51 2020 +0200
Branches: master
https://developer.blender.org/rB106e7654e85760fe1170ec2ab0cbdb33e59fe8a8
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.
===================================================================
M source/blender/blenkernel/intern/fluid.c
===================================================================
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;
}
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs