From 89cc5c2bd3ba2424881cc02de2e820ac5353fc14 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Fri, 13 Sep 2019 10:40:42 +0200 Subject: Fix Particles: Keyed Physics crash when clicking on a particle slot without a valid target rB95b9680597f5 introduced code that would skip creation of GPUVertBuf for ParticlePointCache if the keyed physics would not have a valid target. Missing vertex buffer would lead to assert/crash. This code is now removed (dont see a reason why this was done? afaict 2.79 also just displayed the particles without physics in this case and this seems to be working just fine in 2.8 as well) part of T69741 Reviewers: fclem Maniphest Tasks: T69741 Differential Revision: https://developer.blender.org/D5781 --- source/blender/draw/intern/draw_cache_impl_particles.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/source/blender/draw/intern/draw_cache_impl_particles.c b/source/blender/draw/intern/draw_cache_impl_particles.c index ed78f7d07f9..3c586e6daec 100644 --- a/source/blender/draw/intern/draw_cache_impl_particles.c +++ b/source/blender/draw/intern/draw_cache_impl_particles.c @@ -1335,15 +1335,6 @@ static void particle_batch_cache_ensure_pos(Object *object, sim.psmd = psys_get_modifier(object, psys); sim.psys->lattice_deform_data = psys_create_lattice_deform_data(&sim); - if (psys->part->phystype == PART_PHYS_KEYED) { - if (psys->flag & PSYS_KEYED) { - psys_count_keyed_targets(&sim); - if (psys->totkeyed == 0) { - return; - } - } - } - GPU_VERTBUF_DISCARD_SAFE(point_cache->pos); if (format.attr_len == 0) { -- cgit v1.2.3