diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-03-30 21:59:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-04-05 11:36:11 +0300 |
commit | e4b1b0088413cb912f7d8072935305e9100f426f (patch) | |
tree | 099e8a1fc649013c34ce7ea1e2dbe5c10e0cbce1 /source/blender/blenkernel/intern | |
parent | 96b9f45d7a104cce093da174a4b9d076250f326d (diff) |
Fix T47983: Particles - Emit from Verts emits double on one vert.
When non-random, particle distribution used a small start offset (to avoid
zero-weight faces), which is fine with "continuous" entities like faces, but not
for discrete ones like vertices - in that case it was generating some undesired
"jump" over a few verts in case step was small enough
(i.e. total number of verts/particles was big enough).
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/particle_distribute.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c index 2527ff5e0da..1c4099f45f6 100644 --- a/source/blender/blenkernel/intern/particle_distribute.c +++ b/source/blender/blenkernel/intern/particle_distribute.c @@ -1014,7 +1014,7 @@ static int psys_thread_context_init_distribute(ParticleThreadContext *ctx, Parti double step, pos; step= (totpart < 2) ? 0.5 : 1.0/(double)totpart; - pos= 1e-6; /* tiny offset to avoid zero weight face */ + pos = (from == PART_FROM_VERT) ? 0.0 : 1e-6; /* tiny offset to avoid zero weight face */ i= 0; for (p=0; p<totpart; p++, pos+=step) { |