diff options
author | Bad Sector <badsector@runtimeterror.com> | 2024-11-21 03:00:21 +0200 |
---|---|---|
committer | Bad Sector <badsector@runtimeterror.com> | 2024-11-21 21:31:02 +0200 |
commit | 5bca028e2bd5cde8a9a06fc1a4469cafa28d362b (patch) | |
tree | 746a80ea3d514ba711a0834de8d9df292d151162 /scene/3d | |
parent | 9e6098432aac35bae42c9089a29ba2a80320d823 (diff) | |
download | redot-engine-5bca028e2bd5cde8a9a06fc1a4469cafa28d362b.tar.gz |
Add lightmap bake cancelling
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/lightmap_gi.cpp | 2 | ||||
-rw-r--r-- | scene/3d/lightmapper.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/scene/3d/lightmap_gi.cpp b/scene/3d/lightmap_gi.cpp index cdbd95d930..aa4445a7ba 100644 --- a/scene/3d/lightmap_gi.cpp +++ b/scene/3d/lightmap_gi.cpp @@ -1189,6 +1189,8 @@ LightmapGI::BakeError LightmapGI::bake(Node *p_from_node, String p_image_data_pa return BAKE_ERROR_MESHES_INVALID; } else if (bake_err == Lightmapper::BAKE_ERROR_ATLAS_TOO_SMALL) { return BAKE_ERROR_ATLAS_TOO_SMALL; + } else if (bake_err == Lightmapper::BAKE_ERROR_USER_ABORTED) { + return BAKE_ERROR_USER_ABORTED; } // POSTBAKE: Save Textures. diff --git a/scene/3d/lightmapper.h b/scene/3d/lightmapper.h index 9aa8ef8ccb..1228c63edc 100644 --- a/scene/3d/lightmapper.h +++ b/scene/3d/lightmapper.h @@ -147,6 +147,7 @@ public: BAKE_ERROR_TEXTURE_EXCEEDS_MAX_SIZE, BAKE_ERROR_LIGHTMAP_CANT_PRE_BAKE_MESHES, BAKE_ERROR_ATLAS_TOO_SMALL, + BAKE_ERROR_USER_ABORTED, }; enum BakeQuality { |