From 5b6e0bad1bbc33faba2247602349942ce163b7df Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Tue, 1 Jun 2021 11:57:30 +0200 Subject: Fix T88715: particle size influence texture not working for 'keyed' or 'none' physics types This was reported for the special case of mapping with "Strand / Particle" coords, but was not working with other coordinates either. Dont see a reason for not supporting Size influence textures for these kinds of particles (and since these types of particles have an "age" like all others as well, even the "Strand / Particle" coords are supported here as well) Maniphest Tasks: T88715 Differential Revision: https://developer.blender.org/D11449 --- source/blender/blenkernel/intern/particle_system.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c index c727a144c87..ce4be411c9a 100644 --- a/source/blender/blenkernel/intern/particle_system.c +++ b/source/blender/blenkernel/intern/particle_system.c @@ -4912,9 +4912,12 @@ void particle_system_update(struct Depsgraph *depsgraph, sim.psmd->flag |= eParticleSystemFlag_Pars; } + ParticleTexture ptex; + LOOP_EXISTING_PARTICLES { - pa->size = part->size; + psys_get_texture(&sim, pa, &ptex, PAMAP_SIZE, cfra); + pa->size = part->size * ptex.size; if (part->randsize > 0.0f) { pa->size *= 1.0f - part->randsize * psys_frand(psys, p + 1); } -- cgit v1.2.3