mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
Copy Skybox URL to Ambient URL if background mode is Skybox and Ambient URL is blank.
This commit is contained in:
parent
7811ddb904
commit
c841ec6c8c
1 changed files with 6 additions and 1 deletions
|
@ -2291,8 +2291,13 @@ bool EntityTree::readFromMap(QVariantMap& map) {
|
|||
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"
|
||||
// Either the background mode field is missing (shouldn't happen) or the background mode is "skybox"
|
||||
properties.setSkyboxMode(COMPONENT_MODE_ENABLED);
|
||||
|
||||
// Copy the skybox URL if the ambient URL is empty, as this is the legacy behaviour
|
||||
if (properties.getAmbientLight().getAmbientURL() == "") {
|
||||
properties.getAmbientLight().setAmbientURL(properties.getSkybox().getURL());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue