diff options
author | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-20 17:52:03 +0300 |
---|---|---|
committer | Sebastián Barschkis <sebbas@sebbas.org> | 2020-05-20 17:52:03 +0300 |
commit | aa0e98d7079cedbe6c536b29f1ff01474d9a3925 (patch) | |
tree | 32c91f431a37bce48462b72dd570ec55ba8b2fcc /extern/mantaflow/preprocessed/particle.h | |
parent | 717577d5fc6019764c301f11db6f235b567c4b9f (diff) | |
parent | c1545c9a9d18cc7088ffff01b4b40efeab3efc8d (diff) |
Merge branch 'blender-v2.83-release'
Diffstat (limited to 'extern/mantaflow/preprocessed/particle.h')
-rw-r--r-- | extern/mantaflow/preprocessed/particle.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extern/mantaflow/preprocessed/particle.h b/extern/mantaflow/preprocessed/particle.h index 74c565593fd..d9dd3f49c38 100644 --- a/extern/mantaflow/preprocessed/particle.h +++ b/extern/mantaflow/preprocessed/particle.h @@ -2468,15 +2468,15 @@ template<class S> void ParticleSystem<S>::compress() //! insert buffered positions as new particles, update additional particle data template<class S> void ParticleSystem<S>::insertBufferedParticles() { + // clear new flag everywhere + for (IndexInt i = 0; i < (IndexInt)mData.size(); ++i) + mData[i].flag &= ~PNEW; + if (mNewBufferPos.size() == 0) return; IndexInt newCnt = mData.size(); resizeAll(newCnt + mNewBufferPos.size()); - // clear new flag everywhere - for (IndexInt i = 0; i < (IndexInt)mData.size(); ++i) - mData[i].flag &= ~PNEW; - for (IndexInt i = 0; i < (IndexInt)mNewBufferPos.size(); ++i) { int flag = (mNewBufferFlag.size() > 0) ? mNewBufferFlag[i] : 0; // note, other fields are not initialized here... |