Set skybox mode as per legacy background mode if needed.

This commit is contained in:
Nissim Hadar 2018-01-08 11:50:28 -08:00
parent 93fffb4bbe
commit d0c0d6a388

View file

@ -2288,7 +2288,12 @@ bool EntityTree::readFromMap(QVariantMap& map) {
}
if (!entityMap.contains("skyboxMode")) {
properties.setSkyboxMode(COMPONENT_MODE_ENABLED);
if (entityMap.contains("backgroundMode") && (entityMap["backgroundMode"].toString() == "nothing")) {
properties.setSkyboxMode(COMPONENT_MODE_INHERIT);
} else {
// either the background mode field is missing (shouldn't happen) or the background mode is "skybox"
properties.setSkyboxMode(COMPONENT_MODE_ENABLED);
}
}
if (!entityMap.contains("ambientLightMode")) {