[Bf-blender-cvs] [5b6e0bad1bb] master: Fix T88715: particle size influence texture not working for 'keyed' or 'none' physics types
Philipp Oeser
noreply at git.blender.org
Tue Jun 1 17:58:33 CEST 2021
Commit: 5b6e0bad1bbc33faba2247602349942ce163b7df
Author: Philipp Oeser
Date: Tue Jun 1 11:57:30 2021 +0200
Branches: master
https://developer.blender.org/rB5b6e0bad1bbc33faba2247602349942ce163b7df
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
===================================================================
M source/blender/blenkernel/intern/particle_system.c
===================================================================
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);
}
More information about the Bf-blender-cvs
mailing list