[Bf-blender-cvs] [4916e0b] fracture_modifier: particles, only suppress unborn particles when density vgroup is empty / has zero weight

Martin Felke noreply at git.blender.org
Fri Dec 23 20:25:26 CET 2016


Commit: 4916e0b79b10b881d1e9a6964ef2b2372f687e98
Author: Martin Felke
Date:   Fri Dec 23 20:23:28 2016 +0100
Branches: fracture_modifier
https://developer.blender.org/rB4916e0b79b10b881d1e9a6964ef2b2372f687e98

particles, only suppress unborn particles when density vgroup is empty / has zero weight

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

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

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

diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 6bc99a0..6bc50c2 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -3917,7 +3917,9 @@ static void system_step(ParticleSimulationData *sim, float cfra, const bool use_
 			int i;
 			for (i = 0; i < sim->psys->totpart; i++)
 			{
-				sim->psys->particles[i].flag |= PARS_UNEXIST;
+				if (sim->psys->particles[i].alive == PARS_UNBORN) {
+					sim->psys->particles[i].flag |= PARS_UNEXIST;
+				}
 			}
 		}
 		free_unexisting_particles(sim);
@@ -4287,7 +4289,9 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys, cons
 							int i;
 							for (i = 0; i < sim.psys->totpart; i++)
 							{
-								sim.psys->particles[i].flag |= PARS_UNEXIST;
+								if (sim.psys->particles[i].alive == PARS_UNBORN) {
+									sim.psys->particles[i].flag |= PARS_UNEXIST;
+								}
 							}
 						}




More information about the Bf-blender-cvs mailing list