From 2fb4a37baaac6c7045ea0d7ace2826f1112714c5 Mon Sep 17 00:00:00 2001 From: Janne Karhu Date: Sun, 10 Jul 2011 17:30:31 +0000 Subject: Fix for [#27289] Hair: Render Option - Object does not point objects to end of "hair path" * Objects are now always rotated in the directions of the hair paths * Secondary fix: particle size wasn't updated for hair particles, so dupliobject size couldn't be change after the hair was edited --- source/blender/blenkernel/intern/particle_system.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to '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 50f39704488..63a9c224971 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -3510,11 +3510,15 @@ static void do_hair_dynamics(ParticleSimulationData *sim) static void hair_step(ParticleSimulationData *sim, float cfra) { ParticleSystem *psys = sim->psys; -/* ParticleSettings *part = psys->part; */ + ParticleSettings *part = psys->part; PARTICLE_P; float disp = (float)psys_get_current_display_percentage(psys)/100.0f; LOOP_PARTICLES { + pa->size = part->size; + if(part->randsize > 0.0f) + pa->size *= 1.0f - part->randsize * PSYS_FRAND(p + 1); + if(PSYS_FRAND(p) > disp) pa->flag |= PARS_NO_DISP; else -- cgit v1.2.3