From f8124d6db776d146854f95cf9589ceeca2dcc6fb Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 10 Apr 2011 11:24:29 +0000 Subject: [PATCH] [#26848] Keyed Particles seems to be broken * Explode modifier wasn't updated properly when keyed particles were used. * Explode modifier didn't get correct locations for grid distributed particles. --- source/blender/blenkernel/intern/particle_system.c | 3 +++ source/blender/modifiers/intern/MOD_explode.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index 13f5d619daa..1c05b854ef7 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4311,6 +4311,9 @@ void particle_system_update(Scene *scene, Object *ob, ParticleSystem *psys) free_keyed_keys(psys); distribute_particles(&sim, part->from); initialize_all_particles(&sim); + + /* flag for possible explode modifiers after this system */ + sim.psmd->flag |= eParticleSystemFlag_Pars; } LOOP_EXISTING_PARTICLES { diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 36e804607cf..924035538da 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -148,7 +148,7 @@ static void createFacepa(ExplodeModifierData *emd, /* make tree of emitter locations */ tree=BLI_kdtree_new(totpart); for(p=0,pa=psys->particles; pdm,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,NULL,NULL,NULL,NULL,NULL); + psys_particle_on_emitter(psmd,psys->part->from,pa->num,pa->num_dmcache,pa->fuv,pa->foffset,co,NULL,NULL,NULL,NULL,NULL); BLI_kdtree_insert(tree, p, co, NULL); } BLI_kdtree_balance(tree);