summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorJFonS <JFonS@users.noreply.github.com>2022-03-01 10:23:25 +0100
committerGitHub <noreply@github.com>2022-03-01 10:23:25 +0100
commit73f92a6e4d9d29e479d57583a6317081499f5cb4 (patch)
tree4a40b146fd7e477e2fcbe31dfe56e70d1ae04e80 /editor
parent1b446ebcd4922f48e5d0e2cfbb53062ce58b060e (diff)
parentab1526709666a35d11e848415504a3af77e90a68 (diff)
Merge pull request #58548 from V-Sekai/lod_lightmaps
Allow automatic lod when importing 3D scenes with Static Lightmaps
Diffstat (limited to 'editor')
-rw-r--r--editor/import/resource_importer_scene.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 3eb12353b5..e7c605aaf0 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -1649,14 +1649,6 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m
}
}
- if (generate_lods) {
- src_mesh_node->get_mesh()->generate_lods(merge_angle, split_angle);
- }
-
- if (create_shadow_meshes) {
- src_mesh_node->get_mesh()->create_shadow_mesh();
- }
-
if (bake_lightmaps) {
Transform3D xf;
Node3D *n = src_mesh_node;
@@ -1689,6 +1681,14 @@ void ResourceImporterScene::_generate_meshes(Node *p_node, const Dictionary &p_m
}
}
+ if (generate_lods) {
+ src_mesh_node->get_mesh()->generate_lods(merge_angle, split_angle);
+ }
+
+ if (create_shadow_meshes) {
+ src_mesh_node->get_mesh()->create_shadow_mesh();
+ }
+
if (!save_to_file.is_empty()) {
Ref<Mesh> existing = Ref<Resource>(ResourceCache::get(save_to_file));
if (existing.is_valid()) {