Fix T39319: Particle System Bug on Cycles Render.
Crashes due to bad dm face calculation in particle RNA/cycles hair. This stuff is a total mess, but this kind of check is used in other places and prevents crashing at least.
This commit is contained in:
parent
b7dbb2f48e
commit
a7ed1db51f
Notes:
blender-bot
2023-02-14 10:56:49 +01:00
Referenced by issue #39432, Cycles Hair (Density controlled by texture) Referenced by issue #39319, Particle System Bug on Cycles Render
|
@ -475,7 +475,8 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Rep
|
|||
if (particle_no < totpart) {
|
||||
|
||||
/* get uvco & mcol */
|
||||
num = particle->num_dmcache;
|
||||
num = (ELEM(particle->num_dmcache, DMCACHE_ISCHILD, DMCACHE_NOTFOUND)) ?
|
||||
particle->num : particle->num_dmcache;
|
||||
|
||||
if (num == DMCACHE_NOTFOUND)
|
||||
if (particle->num < modifier->dm->getNumTessFaces(modifier->dm))
|
||||
|
|
Loading…
Reference in New Issue