[Bf-blender-cvs] [6bf0e9dbb1c] blender-v2.82-release: Fix particle instance modifier generating NaN polygons in some cases

Miguel Pozo noreply at git.blender.org
Mon Jan 27 17:53:14 CET 2020


Commit: 6bf0e9dbb1c68c183cf48ee2c7c0ca10c53f9075
Author: Miguel Pozo
Date:   Mon Jan 27 17:36:50 2020 +0100
Branches: blender-v2.82-release
https://developer.blender.org/rB6bf0e9dbb1c68c183cf48ee2c7c0ca10c53f9075

Fix particle instance modifier generating NaN polygons in some cases

Particles that don't exist should not be used, for example due to a
density texture.

Differential Revision: https://developer.blender.org/D6561

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

M	source/blender/modifiers/intern/MOD_particleinstance.c

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

diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index 49bb8691764..f4c2e78d1ac 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -164,6 +164,9 @@ static bool particle_skip(ParticleInstanceModifierData *pimd, ParticleSystem *ps
     if (pa->alive == PARS_DEAD && (pimd->flag & eParticleInstanceFlag_Dead) == 0) {
       return true;
     }
+    if (pa->flag & (PARS_UNEXIST | PARS_NO_DISP)) {
+      return true;
+    }
   }
 
   if (pimd->particle_amount == 1.0f) {



More information about the Bf-blender-cvs mailing list