Particles: Interpolate size for interpolated children
This finally allows us to use Random factor to add variations to the interpolated children. This feature never worked since 2007L there was random factor slider in the interface, but it was only used by simple children. Now it has affect on interpolated children as well. Technically, this will break compatibility if older file had random factor set to something else than 0 (default value is 0 though). But we are leaving 2.7 series, so can accept such breackage in the name of supported features.
This commit is contained in:
parent
bc9e05599d
commit
0afe103269
|
@ -3724,10 +3724,17 @@ float psys_get_child_size(ParticleSystem *psys, ChildParticle *cpa, float UNUSED
|
|||
ParticleSettings *part = psys->part;
|
||||
float size; // time XXX
|
||||
|
||||
if (part->childtype == PART_CHILD_FACES)
|
||||
size = part->size;
|
||||
else
|
||||
if (part->childtype == PART_CHILD_FACES) {
|
||||
int w = 0;
|
||||
size = 0.0;
|
||||
while (w < 4 && cpa->pa[w] >= 0) {
|
||||
size += cpa->w[w] * (psys->particles + cpa->pa[w])->size;
|
||||
w++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
size = psys->particles[cpa->parent].size;
|
||||
}
|
||||
|
||||
size *= part->childsize;
|
||||
|
||||
|
|
Loading…
Reference in New Issue