diff options
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index 10889763638..3a6e710d68c 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -2397,6 +2397,11 @@ void psys_find_parents(ParticleSimulationData *sim) if ((sim->psys->renderdata || G.is_rendering) && part->child_nbr && part->ren_child_nbr) totparent *= (float)part->child_nbr / (float)part->ren_child_nbr; + /* hard limit, workaround for it being ignored above */ + if (sim->psys->totpart < totparent) { + totparent = sim->psys->totpart; + } + tree = BLI_kdtree_new(totparent); for (p = 0, cpa = sim->psys->child; p < totparent; p++, cpa++) { |