Merge pull request #57110 from Macksaur/gi_not_mi_bakedlightmap

This commit is contained in:
Rémi Verschelde 2022-01-24 09:42:13 +01:00 committed by GitHub
commit 50a672eb80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -389,7 +389,7 @@ void BakedLightmap::_find_meshes_and_lights(Node *p_at_node, Vector<MeshesFound>
GeometryInstance *gi = Object::cast_to<GeometryInstance>(p_at_node);
if (gi) {
all_override = mi->get_material_override();
all_override = gi->get_material_override();
}
for (int i = 0; i < bmeshes.size(); i += 2) {
@ -414,8 +414,8 @@ void BakedLightmap::_find_meshes_and_lights(Node *p_at_node, Vector<MeshesFound>
mf.mesh = mesh;
if (gi) {
mf.cast_shadows = mi->get_cast_shadows_setting() != GeometryInstance::SHADOW_CASTING_SETTING_OFF;
mf.generate_lightmap = mi->get_generate_lightmap();
mf.cast_shadows = gi->get_cast_shadows_setting() != GeometryInstance::SHADOW_CASTING_SETTING_OFF;
mf.generate_lightmap = gi->get_generate_lightmap();
} else {
mf.cast_shadows = true;
mf.generate_lightmap = true;