Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2015-01-20 13:42:33 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 13:42:33 +0300
commit4a132abd9d916041b18f51209d54a55914cb79ff (patch)
tree515fae2a01b9f5507d88b222653164bce8bda7a8 /source/blender/blenkernel/intern/particle.c
parent6e44e4181fc1cb77997889c6414524deeb07e083 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index c489dced9df..94fd30db899 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 */