diff options
Diffstat (limited to 'indra/llinventory')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 2 | ||||
-rw-r--r-- | indra/llinventory/llparcel.h | 3 | ||||
-rw-r--r-- | indra/llinventory/llsaleinfo.cpp | 10 | ||||
-rw-r--r-- | indra/llinventory/llsettingsbase.cpp | 11 | ||||
-rw-r--r-- | indra/llinventory/llsettingsbase.h | 7 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.cpp | 29 | ||||
-rw-r--r-- | indra/llinventory/llsettingssky.h | 9 |
7 files changed, 35 insertions, 36 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 082d8b2f9f..075abf9536 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -918,7 +918,7 @@ void LLInventoryItem::asLLSD( LLSD& sd ) const } //sd[INV_FLAGS_LABEL] = (S32)mFlags; sd[INV_FLAGS_LABEL] = ll_sd_from_U32(mFlags); - sd[INV_SALE_INFO_LABEL] = mSaleInfo; + sd[INV_SALE_INFO_LABEL] = mSaleInfo.asLLSD(); sd[INV_NAME_LABEL] = mName; sd[INV_DESC_LABEL] = mDescription; sd[INV_CREATION_DATE_LABEL] = (S32) mCreationDate; diff --git a/indra/llinventory/llparcel.h b/indra/llinventory/llparcel.h index 67d713db1f..759638b956 100644 --- a/indra/llinventory/llparcel.h +++ b/indra/llinventory/llparcel.h @@ -262,6 +262,8 @@ public: void setMediaURLResetTimer(F32 time); virtual void setLocalID(S32 local_id); + void setRegionID(const LLUUID& id) { mRegionID = id; } + const LLUUID& getRegionID() const { return mRegionID; } // blow away all the extra stuff lurking in parcels, including urls, access lists, etc void clearParcel(); @@ -651,6 +653,7 @@ public: S32 mLocalID; LLUUID mBanListTransactionID; LLUUID mAccessListTransactionID; + LLUUID mRegionID; std::map<LLUUID,LLAccessEntry> mAccessList; std::map<LLUUID,LLAccessEntry> mBanList; std::map<LLUUID,LLAccessEntry> mTempBanList; diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index 98836b178e..35bbc1dbb1 100644 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -89,8 +89,14 @@ bool LLSaleInfo::exportLegacyStream(std::ostream& output_stream) const LLSD LLSaleInfo::asLLSD() const { - LLSD sd = LLSD(); - sd["sale_type"] = lookup(mSaleType); + LLSD sd; + const char* type = lookup(mSaleType); + if (!type) + { + LL_WARNS_ONCE() << "Unknown sale type: " << mSaleType << LL_ENDL; + type = lookup(LLSaleInfo::FS_NOT); + } + sd["sale_type"] = type; sd["sale_price"] = mSalePrice; return sd; } diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp index 41162963f2..97979d64e3 100644 --- a/indra/llinventory/llsettingsbase.cpp +++ b/indra/llinventory/llsettingsbase.cpp @@ -130,17 +130,6 @@ void LLSettingsBase::saveValuesIfNeeded() } //========================================================================= -void LLSettingsBase::lerpSettings(LLSettingsBase &other, F64 mix) -{ - LL_PROFILE_ZONE_SCOPED_CATEGORY_ENVIRONMENT; - saveValuesIfNeeded(); - stringset_t skip = getSkipInterpolateKeys(); - stringset_t slerps = getSlerpKeys(); - mSettings = interpolateSDMap(mSettings, other.getSettings(), other.getParameterMap(), mix, skip, slerps); - setDirtyFlag(true); - loadValuesFromLLSD(); -} - void LLSettingsBase::lerpVector2(LLVector2& a, const LLVector2& b, F32 mix) { a.mV[0] = lerp(a.mV[0], b.mV[0], mix); diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h index 816ff3e111..bea6fdec97 100644 --- a/indra/llinventory/llsettingsbase.h +++ b/indra/llinventory/llsettingsbase.h @@ -348,13 +348,8 @@ protected: LLSettingsBase(); LLSettingsBase(const LLSD setting); - static LLSD settingValidation(LLSD settings); - typedef std::set<std::string> stringset_t; - // combining settings objects. Customize for specific setting types - virtual void lerpSettings(LLSettingsBase &other, BlendFactor mix); - // combining settings maps where it can based on mix rate // @settings initial value (mix==0) // @other target value (mix==1) @@ -403,7 +398,7 @@ protected: private: bool mLLSDDirty; - bool mDirty; + bool mDirty; // gates updateSettings bool mReplaced; // super dirty! static LLSD combineSDMaps(const LLSD &first, const LLSD &other); diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp index 45396ce9c7..ad37b08df7 100644 --- a/indra/llinventory/llsettingssky.cpp +++ b/indra/llinventory/llsettingssky.cpp @@ -137,7 +137,8 @@ const std::string LLSettingsSky::SETTING_REFLECTION_PROBE_AMBIANCE("reflection_p const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("651510b8-5f4d-8991-1592-e7eeab2a5a06"); -F32 LLSettingsSky::sAutoAdjustProbeAmbiance = 1.f; +const F32 LLSettingsSky::DEFAULT_AUTO_ADJUST_PROBE_AMBIANCE = 1.f; +F32 LLSettingsSky::sAutoAdjustProbeAmbiance = DEFAULT_AUTO_ADJUST_PROBE_AMBIANCE; static const LLUUID DEFAULT_SUN_ID("32bfbcea-24b1-fb9d-1ef9-48a28a63730f"); // dataserver static const LLUUID DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver @@ -1932,6 +1933,7 @@ LLUUID LLSettingsSky::getCloudNoiseTextureId() const void LLSettingsSky::setCloudNoiseTextureId(const LLUUID &id) { mCloudTextureId = id; + setDirtyFlag(true); setLLSDDirty(); } @@ -1976,6 +1978,7 @@ LLVector2 LLSettingsSky::getCloudScrollRate() const void LLSettingsSky::setCloudScrollRate(const LLVector2 &val) { mScrollRate = val; + setDirtyFlag(true); setLLSDDirty(); } @@ -2033,43 +2036,43 @@ F32 LLSettingsSky::getGamma() const return mGamma; } -F32 LLSettingsSky::getHDRMin() const +F32 LLSettingsSky::getHDRMin(bool auto_adjust) const { - if (mCanAutoAdjust) + if (mCanAutoAdjust && !auto_adjust) return 0.f; return mHDRMin; } -F32 LLSettingsSky::getHDRMax() const +F32 LLSettingsSky::getHDRMax(bool auto_adjust) const { - if (mCanAutoAdjust) + if (mCanAutoAdjust && !auto_adjust) return 0.f; return mHDRMax; } -F32 LLSettingsSky::getHDROffset() const +F32 LLSettingsSky::getHDROffset(bool auto_adjust) const { - if (mCanAutoAdjust) + if (mCanAutoAdjust && !auto_adjust) return 1.0f; return mHDROffset; } -F32 LLSettingsSky::getTonemapMix() const +F32 LLSettingsSky::getTonemapMix(bool auto_adjust) const { - if (mCanAutoAdjust) + if (mCanAutoAdjust && !auto_adjust) + { + // legacy settings do not support tonemaping return 0.0f; + } return mTonemapMix; } void LLSettingsSky::setTonemapMix(F32 mix) { - if (mCanAutoAdjust) - return; - mTonemapMix = mix; } @@ -2134,6 +2137,7 @@ LLUUID LLSettingsSky::getMoonTextureId() const void LLSettingsSky::setMoonTextureId(LLUUID id) { mMoonTextureId = id; + setDirtyFlag(true); setLLSDDirty(); } @@ -2218,6 +2222,7 @@ LLUUID LLSettingsSky::getSunTextureId() const void LLSettingsSky::setSunTextureId(LLUUID id) { mSunTextureId = id; + setDirtyFlag(true); setLLSDDirty(); } diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h index 4c635fd946..ff75aea549 100644 --- a/indra/llinventory/llsettingssky.h +++ b/indra/llinventory/llsettingssky.h @@ -103,6 +103,7 @@ public: static const LLUUID DEFAULT_ASSET_ID; + static const F32 DEFAULT_AUTO_ADJUST_PROBE_AMBIANCE; static F32 sAutoAdjustProbeAmbiance; typedef PTR_NAMESPACE::shared_ptr<LLSettingsSky> ptr_t; @@ -209,10 +210,10 @@ public: F32 getGamma() const; - F32 getHDRMin() const; - F32 getHDRMax() const; - F32 getHDROffset() const; - F32 getTonemapMix() const; + F32 getHDRMin(bool auto_adjust = false) const; + F32 getHDRMax(bool auto_adjust = false) const; + F32 getHDROffset(bool auto_adjust = false) const; + F32 getTonemapMix(bool auto_adjust = false) const; void setTonemapMix(F32 mix); void setGamma(F32 val); |