summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/llinventory.cpp2
-rw-r--r--indra/llinventory/llsaleinfo.cpp10
-rw-r--r--indra/llinventory/llsettingssky.cpp25
-rw-r--r--indra/llinventory/llsettingssky.h9
4 files changed, 27 insertions, 19 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/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/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 50b458de14..ff28c30563 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
@@ -2032,43 +2033,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;
}
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);