summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuele Panzeri <samuele.panzeri@gmail.com>2023-04-19 11:00:11 +0200
committerSamuele Panzeri <samuele.panzeri@gmail.com>2023-04-19 11:00:11 +0200
commita2be742f97cb9f027082483dc56ec0822b23aceb (patch)
treeb5734855cd6def1b91099cf131c1e0951f378f6f
parent27253f3eb2c78a9ad5114c92eae2036b10e1d7e0 (diff)
downloadredot-engine-a2be742f97cb9f027082483dc56ec0822b23aceb.tar.gz
Fix editor lock on sdf collision bake on error
-rw-r--r--scene/3d/gpu_particles_collision_3d.cpp9
1 files changed, 7 insertions, 2 deletions
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<Image> GPUParticlesCollisionSDF3D::bake() {
}
//compute bvh
-
- ERR_FAIL_COND_V_MSG(faces.size() <= 1, Ref<Image>(), "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<Image>();
+ }
LocalVector<FacePos> face_pos;