[Bf-blender-cvs] [89cc5c2bd3b] master: Fix Particles: Keyed Physics crash when clicking on a particle slot without a valid target

Philipp Oeser noreply at git.blender.org
Fri Sep 13 22:23:22 CEST 2019


Commit: 89cc5c2bd3ba2424881cc02de2e820ac5353fc14
Author: Philipp Oeser
Date:   Fri Sep 13 10:40:42 2019 +0200
Branches: master
https://developer.blender.org/rB89cc5c2bd3ba2424881cc02de2e820ac5353fc14

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

===================================================================

M	source/blender/draw/intern/draw_cache_impl_particles.c

===================================================================

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) {



More information about the Bf-blender-cvs mailing list