From 173bdfe05eba14a4e2cf06c6aed03afe46b24c7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Fri, 3 Oct 2014 16:46:08 +0200 Subject: Guide hair drawing for hair particles. Without this the particle system only shows the actual non-simulated hairs ("guide hairs") during edit mode. These hairs are used for goals as well, so showing them in the regular viewport is pretty important. Also the usual hair curves are interpolated along the entire length, which makes it very difficult to see exact vertex positions, unless using exact powers of 2 for the segment number and match the display steps. Conflicts: source/blender/blenkernel/intern/particle.c --- source/blender/blenkernel/intern/particle.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel/intern/particle.c') diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 62c0358210f..ed2d5d2cf02 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3046,7 +3046,15 @@ void psys_cache_paths(ParticleSimulationData *sim, float cfra) copy_v3_v3(ca->col, col); } - + + if (part->type == PART_HAIR) { + HairKey *hkey; + + for (k = 0, hkey = pa->hair; k < pa->totkey; ++k, ++hkey) { + mul_v3_m4v3(hkey->world_co, hairmat, hkey->co); + } + } + /*--modify paths and calculate rotation & velocity--*/ if (!(psys->flag & PSYS_GLOBAL_HAIR)) { -- cgit v1.2.3