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-10-08 11:25:17 +0300
committerSebastián Barschkis <sebbas@sebbas.org>2020-10-08 11:25:32 +0300
commitfdb2240e4d06e9e552d6cd9ce4ec8d1ab2a6a448 (patch)
treeec690067266939ad35497cebd6e5ef151c8c3dec /intern/mantaflow
parente1900ddcfa7c5468401838842a661d7bcdb17667 (diff)
Fluid: Fix particle helper grid export
Only export helper levelset and velocity (belonging to previous state) at the beginning of an (adaptive) frame.
Diffstat (limited to 'intern/mantaflow')
-rw-r--r--intern/mantaflow/intern/strings/liquid_script.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/mantaflow/intern/strings/liquid_script.h b/intern/mantaflow/intern/strings/liquid_script.h
index f26930b5d03..71f55a1d336 100644
--- a/intern/mantaflow/intern/strings/liquid_script.h
+++ b/intern/mantaflow/intern/strings/liquid_script.h
@@ -246,8 +246,10 @@ def liquid_step_$ID$():\n\
pushOutofObs(parts=pp_s$ID$, flags=flags_s$ID$, phiObs=phiObs_s$ID$)\n\
\n\
# save original states for later (used during mesh / secondary particle creation)\n\
- phiTmp_s$ID$.copyFrom(phi_s$ID$)\n\
- velTmp_s$ID$.copyFrom(vel_s$ID$)\n\
+ # but only save the state at the beginning of an adaptive frame\n\
+ if not s$ID$.timePerFrame:\n\
+ phiTmp_s$ID$.copyFrom(phi_s$ID$)\n\
+ velTmp_s$ID$.copyFrom(vel_s$ID$)\n\
\n\
mantaMsg('Advecting phi')\n\
advectSemiLagrange(flags=flags_s$ID$, vel=vel_s$ID$, grid=phi_s$ID$, order=1) # first order is usually enough\n\