[Bf-blender-cvs] [7e64f6cee42] master: Fluid: Fix for Python pointer update (flickering in smoke/fire issue)

Sebastián Barschkis noreply at git.blender.org
Fri Jul 31 17:42:31 CEST 2020


Commit: 7e64f6cee4226f8b4b488b15f37b6088af274b6b
Author: Sebastián Barschkis
Date:   Fri Jul 31 17:42:00 2020 +0200
Branches: master
https://developer.blender.org/rB7e64f6cee4226f8b4b488b15f37b6088af274b6b

Fluid: Fix for Python pointer update (flickering in smoke/fire issue)

In f2b04302cdec the pointer update was refactored. It was sufficient to update pointers just in replay mode at the end of a step since the 'ensure()' functions from manta_fluid_API.cpp had their own pointer update call. These were removed in 51f4bee5a5d7, however, and so in order to still have some sort of update, the given update call needs to be available to all cache types.

===================================================================

M	source/blender/blenkernel/intern/fluid.c

===================================================================

diff --git a/source/blender/blenkernel/intern/fluid.c b/source/blender/blenkernel/intern/fluid.c
index b2ce66a6d89..1629b07faf3 100644
--- a/source/blender/blenkernel/intern/fluid.c
+++ b/source/blender/blenkernel/intern/fluid.c
@@ -3619,17 +3619,17 @@ static int manta_step(
     fds->time_total = time_total;
   }
 
-  /* Replay mode does not lock the UI. Ensure that fluid data is always up to date. */
-  if (mode_replay) {
-    manta_update_pointers(fds->fluid, fmd);
-  }
-
   /* Total time must not exceed framecount times framelength. Correct tiny errors here. */
   CLAMP(fds->time_total, fds->time_total, time_total_old + fds->frame_length);
 
+  /* Compute shadow grid for gas simulations. Make sure to skip if bake job was canceled early. */
   if (fds->type == FLUID_DOMAIN_TYPE_GAS && result) {
     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;



More information about the Bf-blender-cvs mailing list