From a27dd86755178744fd7487a8a2170d7bb6fe6f22 Mon Sep 17 00:00:00 2001 From: Samuele Panzeri Date: Wed, 19 Apr 2023 11:00:11 +0200 Subject: Fix editor lock on sdf collision bake on error (cherry picked from commit a2be742f97cb9f027082483dc56ec0822b23aceb) --- scene/3d/gpu_particles_collision_3d.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'scene') diff --git a/scene/3d/gpu_particles_collision_3d.cpp b/scene/3d/gpu_particles_collision_3d.cpp index 137d578291..cbc75801b0 100644 --- a/scene/3d/gpu_particles_collision_3d.cpp +++ b/scene/3d/gpu_particles_collision_3d.cpp @@ -469,8 +469,13 @@ Ref GPUParticlesCollisionSDF3D::bake() { } //compute bvh - - ERR_FAIL_COND_V_MSG(faces.size() <= 1, Ref(), "No faces detected during GPUParticlesCollisionSDF3D bake. Check whether there are visible meshes matching the bake mask within its extents."); + if (faces.size() <= 1) { + ERR_PRINT("No faces detected during GPUParticlesCollisionSDF3D bake. Check whether there are visible meshes matching the bake mask within its extents."); + if (bake_end_function) { + bake_end_function(); + } + return Ref(); + } LocalVector face_pos; -- cgit v1.2.3