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).
This commit is contained in:
parent
756ab5ee2c
commit
cb19948053
Notes:
blender-bot
2023-02-14 08:02:00 +01:00
Referenced by issue #47983, Particles - Emit from Verts emits double on one vert
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue