From 33cc17a52f89b00e232e3b3a5cb215a3636e9fe2 Mon Sep 17 00:00:00 2001 From: "nissim.hadar" Date: Sat, 6 Jan 2018 02:27:49 -0800 Subject: [PATCH] Removing unused Background mode. --- libraries/entities/src/EntityTree.cpp | 12 +++++------- libraries/entities/src/ZoneEntityItem.cpp | 3 --- libraries/entities/src/ZoneEntityItem.h | 2 -- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/libraries/entities/src/EntityTree.cpp b/libraries/entities/src/EntityTree.cpp index a0eaefd43e..1efbe3ae0c 100644 --- a/libraries/entities/src/EntityTree.cpp +++ b/libraries/entities/src/EntityTree.cpp @@ -2287,13 +2287,11 @@ bool EntityTree::readFromMap(QVariantMap& map) { properties.setKeyLightMode(COMPONENT_MODE_ENABLED); } - if (!entityMap.contains("skyboxMode")) { - if (entityMap.contains("backgroundMode") && properties.getBackgroundModeAsString() == "inherit") { - // The content creator has set the combo to NOTHING - this is actually inherit - properties.setSkyboxMode(COMPONENT_MODE_INHERIT); - } else { - properties.setSkyboxMode(COMPONENT_MODE_ENABLED); - } + if (entityMap.contains("backgroundMode") && properties.getBackgroundModeAsString() == "skybox") { + properties.setSkyboxMode(COMPONENT_MODE_ENABLED); + } else { + // The content creator has set the combo to NOTHING - this is actually inherit + properties.setSkyboxMode(COMPONENT_MODE_INHERIT); } if (!entityMap.contains("ambientLightMode")) { diff --git a/libraries/entities/src/ZoneEntityItem.cpp b/libraries/entities/src/ZoneEntityItem.cpp index f2fb480353..38401de82e 100644 --- a/libraries/entities/src/ZoneEntityItem.cpp +++ b/libraries/entities/src/ZoneEntityItem.cpp @@ -42,8 +42,6 @@ ZoneEntityItem::ZoneEntityItem(const EntityItemID& entityItemID) : EntityItem(en _shapeType = DEFAULT_SHAPE_TYPE; _compoundShapeURL = DEFAULT_COMPOUND_SHAPE_URL; - - _backgroundMode = BACKGROUND_MODE_INHERIT; } EntityItemProperties ZoneEntityItem::getProperties(EntityPropertyFlags desiredProperties) const { @@ -285,7 +283,6 @@ void ZoneEntityItem::debugDump() const { qCDebug(entities) << " position:" << debugTreeVector(getWorldPosition()); qCDebug(entities) << " dimensions:" << debugTreeVector(getScaledDimensions()); qCDebug(entities) << " getLastEdited:" << debugTime(getLastEdited(), now); - qCDebug(entities) << " _backgroundMode:" << EntityItemProperties::getBackgroundModeString(_backgroundMode); qCDebug(entities) << " _hazeMode:" << EntityItemProperties::getComponentModeString(_hazeMode); qCDebug(entities) << " _keyLightMode:" << EntityItemProperties::getComponentModeString(_keyLightMode); qCDebug(entities) << " _ambientLightMode:" << EntityItemProperties::getComponentModeString(_ambientLightMode); diff --git a/libraries/entities/src/ZoneEntityItem.h b/libraries/entities/src/ZoneEntityItem.h index aca7a0fd1b..6aae7bfbc3 100644 --- a/libraries/entities/src/ZoneEntityItem.h +++ b/libraries/entities/src/ZoneEntityItem.h @@ -128,8 +128,6 @@ protected: ShapeType _shapeType = DEFAULT_SHAPE_TYPE; QString _compoundShapeURL; - BackgroundMode _backgroundMode { BACKGROUND_MODE_INHERIT }; - // The following 3 values are the defaults for zone creation uint32_t _keyLightMode { COMPONENT_MODE_INHERIT }; uint32_t _skyboxMode { COMPONENT_MODE_INHERIT };