summaryrefslogtreecommitdiff
path: root/indra/llinventory
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llinventory')
-rw-r--r--indra/llinventory/CMakeLists.txt2
-rw-r--r--indra/llinventory/llinventory.cpp2
-rw-r--r--indra/llinventory/llsaleinfo.cpp10
-rw-r--r--indra/llinventory/llsettingsbase.cpp12
-rw-r--r--indra/llinventory/llsettingsbase.h5
-rw-r--r--indra/llinventory/llsettingssky.cpp26
-rw-r--r--indra/llinventory/llsettingssky.h9
-rw-r--r--indra/llinventory/llsettingswater.cpp1
8 files changed, 32 insertions, 35 deletions
diff --git a/indra/llinventory/CMakeLists.txt b/indra/llinventory/CMakeLists.txt
index 93a586759f..88a2c33ae0 100644
--- a/indra/llinventory/CMakeLists.txt
+++ b/indra/llinventory/CMakeLists.txt
@@ -59,6 +59,8 @@ add_library (llinventory ${llinventory_SOURCE_FILES})
target_link_libraries( llinventory llcommon llmath llmessage llxml )
target_include_directories( llinventory INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+include(LibraryInstall)
+
#add unit tests
if (LL_TESTS)
INCLUDE(LLAddBuildTest)
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/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index 0ee71de3a1..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);
@@ -472,6 +461,7 @@ bool LLSettingsBase::validate()
LLSD LLSettingsBase::settingValidation(LLSD &settings, validation_list_t &validations, bool partial)
{
+ using boost::placeholders::_1, boost::placeholders::_2;
static Validator validateName(SETTING_NAME, false, LLSD::TypeString, boost::bind(&Validator::verifyStringLength, _1, _2, 63));
static Validator validateId(SETTING_ID, false, LLSD::TypeUUID);
static Validator validateHash(SETTING_HASH, false, LLSD::TypeInteger);
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index 816ff3e111..7de71588ef 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)
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 50b458de14..e8ecc94b4b 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
@@ -150,6 +151,7 @@ const F32 LLSettingsSky::DOME_RADIUS(15000.f);
namespace
{
+ using boost::placeholders::_1, boost::placeholders::_2;
LLSettingsSky::validation_list_t legacyHazeValidationList()
{
@@ -2032,43 +2034,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);
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index b5d59dc497..b8946dbdba 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -318,6 +318,7 @@ LLSettingsWater::validation_list_t LLSettingsWater::validationList()
if (validation.empty())
{
+ using boost::placeholders::_1, boost::placeholders::_2;
validation.push_back(Validator(SETTING_BLUR_MULTIPLIER, true, LLSD::TypeReal,
boost::bind(&Validator::verifyFloatRange, _1, _2, llsd::array(-0.5f, 0.5f))));
validation.push_back(Validator(SETTING_FOG_COLOR, true, LLSD::TypeArray,