diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-07-10 21:30:31 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-07-10 21:30:31 +0400 |
commit | 2fb4a37baaac6c7045ea0d7ace2826f1112714c5 (patch) | |
tree | aafe83a34adc1501a7bfe0d0176a70d0f0b388ed /source/blender/blenkernel/intern/particle_system.c | |
parent | 301e5b4ea0bbcb2129528265b95e7247920a88da (diff) |
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
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle_system.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |