Fix T51774: Children particles hair interpolation not correct with textures or dp.
Children where always getting at least one segment of fixed length... Now fully hidden ones (zero length) get no segment at all. Note that even very short ones keep getting one 'unit' length segment - would rather avoid changing that at this point, given how complex children particles 'length' can get with all kind of modifiers... Think we can live with that for now anyway.
This commit is contained in:
parent
f158a206f2
commit
3190eaf109
Notes:
blender-bot
2023-02-14 06:53:23 +01:00
Referenced by issue #51774, Children particles hair interpolation not correct with textures or dp
|
@ -355,9 +355,13 @@ void psys_apply_child_modifiers(ParticleThreadContext *ctx, struct ListBase *mod
|
|||
|
||||
{
|
||||
const float step_length = 1.0f / (float)(totkeys - 1);
|
||||
|
||||
float cur_length = 0.0f;
|
||||
|
||||
|
||||
if (max_length <= 0.0f) {
|
||||
keys->segments = -1;
|
||||
totkeys = 0;
|
||||
}
|
||||
|
||||
/* we have to correct velocity because of kink & clump */
|
||||
for (k = 0, key = keys; k < totkeys; ++k, ++key) {
|
||||
if (k >= 2) {
|
||||
|
|
Loading…
Reference in New Issue