[Bf-blender-cvs] [cb19948] master: Fix T47983: Particles - Emit from Verts emits double on one vert.
Bastien Montagne
noreply at git.blender.org
Wed Mar 30 21:05:04 CEST 2016
Commit: cb1994805373c627c4aaf803dc9bffa0a7d24fcb
Author: Bastien Montagne
Date: Wed Mar 30 20:59:07 2016 +0200
Branches: master
https://developer.blender.org/rBcb1994805373c627c4aaf803dc9bffa0a7d24fcb
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).
===================================================================
M source/blender/blenkernel/intern/particle_distribute.c
===================================================================
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c
index 0f1f240..ccbc239 100644
--- a/source/blender/blenkernel/intern/particle_distribute.c
+++ b/source/blender/blenkernel/intern/particle_distribute.c
@@ -1030,7 +1030,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) {
More information about the Bf-blender-cvs
mailing list