diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-01-26 00:33:47 +0100 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2022-01-26 00:33:47 +0100 |
commit | 78c946f554514e09a42f709decd2b43a95e59930 (patch) | |
tree | 27ed0f9e86bb4e472d720fe30338476caf3d7714 /editor | |
parent | b25c7fef04499a7bee2333184bd7e5879d304eee (diff) |
Fix lightmap size hint option not displaying for 3D scenes
This also renames the Static Lightmaps option hint to be more explicit
about which GI techniques are supported (as VoxelGI/SDFGI can still
be used with Static Lightmaps).
Diffstat (limited to 'editor')
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index af9a2f9ebe..0fefa0f3c4 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -282,7 +282,8 @@ bool ResourceImporterScene::get_option_visibility(const String &p_path, const St } } - if (p_option == "meshes/lightmap_texel_size" && int(p_options["meshes/light_baking"]) < 3) { + if (p_option == "meshes/lightmap_texel_size" && int(p_options["meshes/light_baking"]) != 2) { + // Only display the lightmap texel size import option when using the Static Lightmaps light baking mode. return false; } @@ -1476,7 +1477,7 @@ void ResourceImporterScene::get_import_options(const String &p_path, List<Import r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/ensure_tangents"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/generate_lods"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "meshes/create_shadow_meshes"), true)); - r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Static (VoxelGI/SDFGI),Static Lightmaps,Dynamic (VoxelGI only)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1)); + r_options->push_back(ImportOption(PropertyInfo(Variant::INT, "meshes/light_baking", PROPERTY_HINT_ENUM, "Disabled,Static (VoxelGI/SDFGI),Static Lightmaps (VoxelGI/SDFGI/LightmapGI),Dynamic (VoxelGI only)", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), 1)); r_options->push_back(ImportOption(PropertyInfo(Variant::FLOAT, "meshes/lightmap_texel_size", PROPERTY_HINT_RANGE, "0.001,100,0.001"), 0.1)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "skins/use_named_skins"), true)); r_options->push_back(ImportOption(PropertyInfo(Variant::BOOL, "animation/import"), true)); |