[Bf-blender-cvs] [4a132ab] master: Fix for crash when using virtual parent hairs and clumping.
Lukas Tönne
noreply at git.blender.org
Tue Jan 20 11:43:53 CET 2015
Commit: 4a132abd9d916041b18f51209d54a55914cb79ff
Author: Lukas Tönne
Date: Tue Jan 20 11:42:33 2015 +0100
Branches: master
https://developer.blender.org/rB4a132abd9d916041b18f51209d54a55914cb79ff
Fix for crash when using virtual parent hairs and clumping.
The paths for parents and children are generated using the same function
with a rather obscure test to distinguish them. Modifiers (clump, kink,
roughness) should not be applied to parents though.
===================================================================
M source/blender/blenkernel/intern/particle.c
===================================================================
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index c489dce..94fd30d 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2287,17 +2287,17 @@ static void psys_thread_create_path(ParticleTask *task, struct ChildParticle *cp
par = pcache[cpa->parent];
}
- if (pa)
- psys_particle_on_emitter(ctx->sim.psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset,
- par_co, NULL, NULL, NULL, par_orco, NULL);
- else
- zero_v3(par_orco);
-
- {
+ if (pa) {
ListBase modifiers;
BLI_listbase_clear(&modifiers);
+
+ psys_particle_on_emitter(ctx->sim.psmd, part->from, pa->num, pa->num_dmcache, pa->fuv, pa->foffset,
+ par_co, NULL, NULL, NULL, par_orco, NULL);
+
psys_apply_child_modifiers(ctx, &modifiers, cpa, &ptex, orco, ornor, hairmat, child_keys, par, par_orco);
}
+ else
+ zero_v3(par_orco);
}
/* Hide virtual parents */
More information about the Bf-blender-cvs
mailing list