summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/llinventory/llsettingsbase.cpp3
-rw-r--r--indra/llinventory/llsettingsbase.h2
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp4
-rw-r--r--indra/llinventory/llsettingsdaycycle.h2
-rw-r--r--indra/llmath/v4color.h2
-rw-r--r--indra/llrender/llvertexbuffer.cpp53
-rw-r--r--indra/llrender/llvertexbuffer.h4
-rw-r--r--indra/newview/llappviewer.cpp7
-rw-r--r--indra/newview/llenvironment.cpp210
-rw-r--r--indra/newview/llenvironment.h11
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp1
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp1
-rw-r--r--indra/newview/llsettingsvo.cpp6
13 files changed, 254 insertions, 52 deletions
diff --git a/indra/llinventory/llsettingsbase.cpp b/indra/llinventory/llsettingsbase.cpp
index af3e84fd0f..61b59e35aa 100644
--- a/indra/llinventory/llsettingsbase.cpp
+++ b/indra/llinventory/llsettingsbase.cpp
@@ -39,6 +39,7 @@ namespace
}
const LLSettingsBase::TrackPosition LLSettingsBase::INVALID_TRACKPOS(-1.0);
+const std::string LLSettingsBase::DEFAULT_SETTINGS_NAME("_default_");
//=========================================================================
std::ostream &operator <<(std::ostream& os, LLSettingsBase &settings)
@@ -67,7 +68,6 @@ const U32 LLSettingsBase::Validator::VALIDATION_PARTIAL(0x01 << 0);
LLSettingsBase::LLSettingsBase():
mSettings(LLSD::emptyMap()),
mDirty(true),
- mAssetID(),
mBlendedFactor(0.0)
{
}
@@ -75,7 +75,6 @@ LLSettingsBase::LLSettingsBase():
LLSettingsBase::LLSettingsBase(const LLSD setting) :
mSettings(setting),
mDirty(true),
- mAssetID(),
mBlendedFactor(0.0)
{
}
diff --git a/indra/llinventory/llsettingsbase.h b/indra/llinventory/llsettingsbase.h
index 26e2901968..1d118f0789 100644
--- a/indra/llinventory/llsettingsbase.h
+++ b/indra/llinventory/llsettingsbase.h
@@ -64,6 +64,7 @@ public:
typedef F64 BlendFactor;
typedef F32 TrackPosition; // 32-bit as these are stored in LLSD as such
static const TrackPosition INVALID_TRACKPOS;
+ static const std::string DEFAULT_SETTINGS_NAME;
static const std::string SETTING_ID;
static const std::string SETTING_NAME;
@@ -359,7 +360,6 @@ protected:
LLSD mSettings;
bool mIsValid;
- LLAssetID mAssetID;
LLSD cloneSettings() const;
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 8498425f4e..457e5b7478 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -408,7 +408,7 @@ LLSD LLSettingsDay::defaults()
if (dfltsetting.size() == 0)
{
- dfltsetting[SETTING_NAME] = "_default_";
+ dfltsetting[SETTING_NAME] = DEFAULT_SETTINGS_NAME;
dfltsetting[SETTING_TYPE] = "daycycle";
LLSD frames(LLSD::emptyMap());
@@ -421,7 +421,7 @@ LLSD LLSettingsDay::defaults()
F32 time = 0.0f;
for (U32 i = 0; i < FRAME_COUNT; i++)
{
- std::string name("_default_");
+ std::string name(DEFAULT_SETTINGS_NAME);
name += ('a' + i);
std::string water_frame_name("water:");
diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h
index 8776f6725d..f7f5bb63b6 100644
--- a/indra/llinventory/llsettingsdaycycle.h
+++ b/indra/llinventory/llsettingsdaycycle.h
@@ -146,8 +146,6 @@ private:
LLSettingsBase::Seconds mLastUpdateTime;
- void parseFromLLSD(LLSD &data);
-
static CycleTrack_t::iterator getEntryAtOrBefore(CycleTrack_t &track, const LLSettingsBase::TrackPosition& keyframe);
static CycleTrack_t::iterator getEntryAtOrAfter(CycleTrack_t &track, const LLSettingsBase::TrackPosition& keyframe);
TrackBound_t getBoundingEntries(CycleTrack_t &track, const LLSettingsBase::TrackPosition& keyframe);
diff --git a/indra/llmath/v4color.h b/indra/llmath/v4color.h
index 00fc955384..175edf1471 100644
--- a/indra/llmath/v4color.h
+++ b/indra/llmath/v4color.h
@@ -676,6 +676,8 @@ inline const LLColor4 linearColor4(const LLColor4 &a)
linearColor.mV[1] = sRGBtoLinear(a.mV[1]);
linearColor.mV[2] = sRGBtoLinear(a.mV[2]);
linearColor.mV[3] = a.mV[3];
+
+ return linearColor;
}
#endif
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index e3035c7194..94a04d4ddb 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -2326,34 +2326,35 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
U32 unsatisfied_mask = (required_mask & ~data_mask);
- U32 i = 0;
- while (i < TYPE_MAX)
- {
+ for (U32 i = 0; i < TYPE_MAX; i++)
+ {
U32 unsatisfied_flag = unsatisfied_mask & (1 << i);
- switch (unsatisfied_flag)
- {
- case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
- case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
- case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
- case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
- case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
- case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
- case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
- case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
- case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
- case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
- case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
- case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
- case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
- default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
- }
- }
-
- if (unsatisfied_mask & (1 << TYPE_INDEX))
- {
- LL_INFOS() << "Missing indices" << LL_ENDL;
- }
+ switch (unsatisfied_flag)
+ {
+ case 0: break;
+ case MAP_VERTEX: LL_INFOS() << "Missing vert pos" << LL_ENDL; break;
+ case MAP_NORMAL: LL_INFOS() << "Missing normals" << LL_ENDL; break;
+ case MAP_TEXCOORD0: LL_INFOS() << "Missing TC 0" << LL_ENDL; break;
+ case MAP_TEXCOORD1: LL_INFOS() << "Missing TC 1" << LL_ENDL; break;
+ case MAP_TEXCOORD2: LL_INFOS() << "Missing TC 2" << LL_ENDL; break;
+ case MAP_TEXCOORD3: LL_INFOS() << "Missing TC 3" << LL_ENDL; break;
+ case MAP_COLOR: LL_INFOS() << "Missing vert color" << LL_ENDL; break;
+ case MAP_EMISSIVE: LL_INFOS() << "Missing emissive" << LL_ENDL; break;
+ case MAP_TANGENT: LL_INFOS() << "Missing tangent" << LL_ENDL; break;
+ case MAP_WEIGHT: LL_INFOS() << "Missing weight" << LL_ENDL; break;
+ case MAP_WEIGHT4: LL_INFOS() << "Missing weightx4" << LL_ENDL; break;
+ case MAP_CLOTHWEIGHT: LL_INFOS() << "Missing clothweight" << LL_ENDL; break;
+ case MAP_TEXTURE_INDEX: LL_INFOS() << "Missing tex index" << LL_ENDL; break;
+ default: LL_INFOS() << "Missing who effin knows: " << unsatisfied_flag << LL_ENDL;
+ }
+ }
+
+ // TYPE_INDEX is beyond TYPE_MAX, so check for it individually
+ if (unsatisfied_mask & (1 << TYPE_INDEX))
+ {
+ LL_INFOS() << "Missing indices" << LL_ENDL;
+ }
LL_ERRS() << "Shader consumption mismatches data provision." << LL_ENDL;
}
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index c89d7e3958..9867bd16d6 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -179,8 +179,8 @@ public:
TYPE_WEIGHT4,
TYPE_CLOTHWEIGHT,
TYPE_TEXTURE_INDEX,
- TYPE_MAX,
- TYPE_INDEX,
+ TYPE_MAX, // TYPE_MAX is the size/boundary marker for attributes that go in the vertex buffer
+ TYPE_INDEX, // TYPE_INDEX is beyond _MAX because it lives in a separate (index) buffer
};
enum {
MAP_VERTEX = (1<<TYPE_VERTEX),
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 118edb8beb..cbb47d71f7 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -33,6 +33,7 @@
#include "llfeaturemanager.h"
#include "lluictrlfactory.h"
#include "lltexteditor.h"
+#include "llenvironment.h"
#include "llerrorcontrol.h"
#include "lleventtimer.h"
#include "llviewertexturelist.h"
@@ -1908,6 +1909,12 @@ bool LLAppViewer::cleanup()
// Store the time of our current logoff
gSavedPerAccountSettings.setU32("LastLogoff", time_corrected());
+ if (LLEnvironment::instanceExists())
+ {
+ //Store environment settings if nessesary
+ LLEnvironment::getInstance()->saveToSettings();
+ }
+
// Must do this after all panels have been deleted because panels that have persistent rects
// save their rects on delete.
gSavedSettings.saveToFile(gSavedSettings.getString("ClientSettingsFile"), TRUE);
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index b8c5648cca..85fe2a7c95 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -101,6 +101,8 @@ namespace
const std::string LISTENER_NAME("LLEnvironmentSingleton");
const std::string PUMP_EXPERIENCE("experience_permission");
+ const std::string LOCAL_ENV_STORAGE_FILE("local_environment_data.bin");
+
//---------------------------------------------------------------------
LLTrace::BlockTimerStatHandle FTM_ENVIRONMENT_UPDATE("Update Environment Tick");
LLTrace::BlockTimerStatHandle FTM_SHADER_PARAM_UPDATE("Update Shader Parameters");
@@ -849,6 +851,8 @@ void LLEnvironment::initSingleton()
}
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; });
+
+ loadFromSettings();
}
void LLEnvironment::cleanupSingleton()
@@ -2448,7 +2452,6 @@ LLEnvironment::DayInstance::DayInstance(EnvSelection_t env) :
mBlenderSky(),
mBlenderWater(),
mInitialized(false),
- mType(TYPE_INVALID),
mSkyTrack(1),
mEnv(env),
mAnimateFlags(0)
@@ -2467,7 +2470,6 @@ LLEnvironment::DayInstance::ptr_t LLEnvironment::DayInstance::clone() const
environment->mBlenderSky = mBlenderSky;
environment->mBlenderWater = mBlenderWater;
environment->mInitialized = mInitialized;
- environment->mType = mType;
environment->mSkyTrack = mSkyTrack;
environment->mAnimateFlags = mAnimateFlags;
@@ -2491,7 +2493,6 @@ bool LLEnvironment::DayInstance::applyTimeDelta(const LLSettingsBase::Seconds& d
void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset)
{
- mType = TYPE_CYCLED;
mInitialized = false;
mAnimateFlags = 0;
@@ -2512,7 +2513,6 @@ void LLEnvironment::DayInstance::setDay(const LLSettingsDay::ptr_t &pday, LLSett
void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
{
- mType = TYPE_FIXED;
mInitialized = false;
bool different_sky = mSky != psky;
@@ -2532,7 +2532,6 @@ void LLEnvironment::DayInstance::setSky(const LLSettingsSky::ptr_t &psky)
void LLEnvironment::DayInstance::setWater(const LLSettingsWater::ptr_t &pwater)
{
- mType = TYPE_FIXED;
mInitialized = false;
bool different_water = mWater != pwater;
@@ -2554,7 +2553,6 @@ void LLEnvironment::DayInstance::initialize()
void LLEnvironment::DayInstance::clear()
{
- mType = TYPE_INVALID;
mDayCycle.reset();
mSky.reset();
mWater.reset();
@@ -2692,6 +2690,206 @@ void LLEnvironment::DayTransition::animate()
});
}
+void LLEnvironment::saveToSettings()
+{
+ std::string user_dir = gDirUtilp->getLindenUserDir();
+ if (user_dir.empty())
+ {
+ // not logged in
+ return;
+ }
+ bool has_data = false;
+
+ if (gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin"))
+ {
+ DayInstance::ptr_t environment = getEnvironmentInstance(ENV_LOCAL);
+ if (environment)
+ {
+ // Environment is 'layered'. No data in ENV_LOCAL means we are using parcel/region
+ // Store local environment for next session
+ LLSD env_data;
+
+ LLSettingsDay::ptr_t day = environment->getDayCycle();
+ if (day)
+ {
+ const std::string name = day->getName();
+ const LLUUID asset_id = day->getAssetId();
+ if (asset_id.notNull())
+ {
+ // just save the id
+ env_data["day_id"] = asset_id;
+ env_data["day_length"] = LLSD::Integer(environment->getDayLength());
+ env_data["day_offset"] = LLSD::Integer(environment->getDayOffset());
+ has_data = true;
+ }
+ else if (!name.empty() && name != LLSettingsBase::DEFAULT_SETTINGS_NAME)
+ {
+ // This setting was created locally and was not saved
+ // The only option is to save the whole thing
+ env_data["day_llsd"] = day->getSettings();
+ env_data["day_length"] = LLSD::Integer(environment->getDayLength());
+ env_data["day_offset"] = LLSD::Integer(environment->getDayOffset());
+ has_data = true;
+ }
+ }
+
+ LLSettingsSky::ptr_t sky = environment->getSky();
+ if ((environment->getFlags() & DayInstance::NO_ANIMATE_SKY) && sky)
+ {
+ const std::string name = sky->getName();
+ const LLUUID asset_id = sky->getAssetId();
+ if (asset_id.notNull())
+ {
+ // just save the id
+ env_data["sky_id"] = asset_id;
+ has_data = true;
+ }
+ else if (!name.empty() && name != LLSettingsBase::DEFAULT_SETTINGS_NAME)
+ {
+ // This setting was created locally and was not saved
+ // The only option is to save the whole thing
+ env_data["sky_llsd"] = sky->getSettings();
+ has_data = true;
+ }
+ has_data = true;
+ }
+
+ LLSettingsWater::ptr_t water = environment->getWater();
+ if ((environment->getFlags() & DayInstance::NO_ANIMATE_WATER) && water)
+ {
+ const std::string name = water->getName();
+ const LLUUID asset_id = water->getAssetId();
+ if (asset_id.notNull())
+ {
+ // just save the id
+ env_data["water_id"] = asset_id;
+ has_data = true;
+ }
+ else if (!name.empty() && name != LLSettingsBase::DEFAULT_SETTINGS_NAME)
+ {
+ // This setting was created locally and was not saved
+ // The only option is to save the whole thing
+ env_data["water_llsd"] = water->getSettings();
+ has_data = true;
+ }
+ }
+
+ std::string user_filepath = user_dir + gDirUtilp->getDirDelimiter() + LOCAL_ENV_STORAGE_FILE;
+ llofstream out(user_filepath.c_str(), std::ios_base::out | std::ios_base::binary);
+ if (out.good())
+ {
+ LLSDSerialize::toBinary(env_data, out);
+ out.close();
+ }
+ else
+ {
+ LL_WARNS("ENVIRONMENT") << "Unable to open " << user_filepath << " for output." << LL_ENDL;
+ }
+ }
+ }
+
+ if (!has_data)
+ {
+ LLFile::remove(user_dir + gDirUtilp->getDirDelimiter() + LOCAL_ENV_STORAGE_FILE, ENOENT);
+ }
+}
+
+bool LLEnvironment::loadFromSettings()
+{
+ if (!gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin"))
+ {
+ return false;
+ }
+
+ std::string user_path = gDirUtilp->getLindenUserDir();
+ if (user_path.empty())
+ {
+ LL_WARNS("ENVIRONMENT") << "Can't load previous environment, Environment was initialized before user logged in" << LL_ENDL;
+ return false;
+ }
+ std::string user_filepath(user_path + gDirUtilp->getDirDelimiter() + LOCAL_ENV_STORAGE_FILE);
+ if (!gDirUtilp->fileExists(user_filepath))
+ {
+ // No previous environment
+ return false;
+ }
+
+ LLSD env_data;
+ llifstream file(user_filepath.c_str(), std::ios_base::in | std::ios_base::binary);
+ if (file.is_open())
+ {
+ LLSDSerialize::fromBinary(env_data, file, LLSDSerialize::SIZE_UNLIMITED);
+ if (env_data.isUndefined())
+ {
+ LL_WARNS("ENVIRONMENT") << "error loading " << user_filepath << LL_ENDL;
+ return false;
+ }
+ else
+ {
+ LL_INFOS("ENVIRONMENT") << "Loaded previous session environment from: " << user_filepath << LL_ENDL;
+ }
+ file.close();
+ }
+ else
+ {
+ LL_INFOS("ENVIRONMENT") << "Unable to open previous session environment file " << user_filepath << LL_ENDL;
+ }
+
+ if (!env_data.isMap() || env_data.emptyMap())
+ {
+ LL_DEBUGS("ENVIRONMENT") << "Empty map loaded from: " << user_filepath << LL_ENDL;
+ return false;
+ }
+
+ bool valid = false;
+
+ if (env_data.has("day_id"))
+ {
+ S32 length = env_data["day_length"].asInteger();
+ S32 offset = env_data["day_offset"].asInteger();
+ setEnvironment(ENV_LOCAL, env_data["day_id"].asUUID(), LLSettingsDay::Seconds(length), LLSettingsDay::Seconds(offset));
+ valid = true;
+ }
+ else if (env_data.has("day_llsd"))
+ {
+ S32 length = env_data["day_length"].asInteger();
+ S32 offset = env_data["day_offset"].asInteger();
+ LLSettingsDay::ptr_t day = std::make_shared<LLSettingsVODay>(env_data["day_llsd"]);
+ setEnvironment(ENV_LOCAL, day, LLSettingsDay::Seconds(length), LLSettingsDay::Seconds(offset));
+ valid = true;
+ }
+
+ if (env_data.has("sky_id"))
+ {
+ setEnvironment(ENV_LOCAL, env_data["sky_id"].asUUID());
+ valid = true;
+ }
+ else if (env_data.has("sky_llsd"))
+ {
+ LLSettingsSky::ptr_t sky = std::make_shared<LLSettingsVOSky>(env_data["sky_llsd"]);
+ setEnvironment(ENV_LOCAL, sky);
+ valid = true;
+ }
+
+ if (env_data.has("water_id"))
+ {
+ setEnvironment(ENV_LOCAL, env_data["water_id"].asUUID());
+ valid = true;
+ }
+ else if (env_data.has("water_llsd"))
+ {
+ LLSettingsWater::ptr_t sky = std::make_shared<LLSettingsVOWater>(env_data["water_llsd"]);
+ setEnvironment(ENV_LOCAL, sky);
+ valid = true;
+ }
+
+ if (valid)
+ {
+ updateEnvironment(TRANSITION_INSTANT, true);
+ }
+ return valid;
+}
+
void LLEnvironment::saveBeaconsState()
{
if (mEditorCounter == 0)
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 3ae1d37a8c..cf8231168f 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -169,6 +169,8 @@ public:
bool getIsSunUp() const;
bool getIsMoonUp() const;
+ void saveToSettings();
+ bool loadFromSettings();
void saveBeaconsState();
void revertBeaconsState();
@@ -232,13 +234,6 @@ public:
class DayInstance: public std::enable_shared_from_this<DayInstance>
{
public:
- enum InstanceType_t
- {
- TYPE_INVALID,
- TYPE_FIXED,
- TYPE_CYCLED
- };
-
typedef std::shared_ptr<DayInstance> ptr_t;
static const U32 NO_ANIMATE_SKY;
@@ -282,6 +277,7 @@ public:
void setFlags(U32 flag) { mAnimateFlags |= flag; }
void clearFlags(U32 flag) { mAnimateFlags &= ~flag; }
+ U32 getFlags() { return mAnimateFlags; }
protected:
@@ -291,7 +287,6 @@ public:
LLSettingsWater::ptr_t mWater;
S32 mSkyTrack;
- InstanceType_t mType;
bool mInitialized;
LLSettingsDay::Seconds mDayLength;
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index f57a54163d..ea22043de8 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1715,6 +1715,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
if (where == ACTION_APPLY_LOCAL)
{
+ day->setName("Local"); // To distinguish and make sure there is a name. Safe, because this is a copy.
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, day);
}
else if (where == ACTION_APPLY_PARCEL)
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 41d9a6d99b..37e162b249 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -580,6 +580,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where, con
if (where == ACTION_APPLY_LOCAL)
{
+ settings->setName("Local"); // To distinguish and make sure there is a name. Safe, because this is a copy.
LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, settings);
}
else if (where == ACTION_APPLY_PARCEL)
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index d96f276a71..c72a0706cd 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -514,7 +514,7 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildDefaultSky()
{
default_settings = LLSettingsSky::defaults();
- default_settings[SETTING_NAME] = std::string("_default_");
+ default_settings[SETTING_NAME] = DEFAULT_SETTINGS_NAME;
LLSettingsSky::validation_list_t validations = LLSettingsSky::validationList();
LLSD results = LLSettingsBase::settingValidation(default_settings, validations);
@@ -841,7 +841,7 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildDefaultWater()
{
default_settings = LLSettingsWater::defaults();
- default_settings[SETTING_NAME] = std::string("_default_");
+ default_settings[SETTING_NAME] = DEFAULT_SETTINGS_NAME;
LLSettingsWater::validation_list_t validations = LLSettingsWater::validationList();
LLSD results = LLSettingsWater::settingValidation(default_settings, validations);
@@ -1169,7 +1169,7 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDefaultDayCycle()
if (!default_settings.size())
{
default_settings = LLSettingsDay::defaults();
- default_settings[SETTING_NAME] = std::string("_default_");
+ default_settings[SETTING_NAME] = DEFAULT_SETTINGS_NAME;
LLSettingsDay::validation_list_t validations = LLSettingsDay::validationList();
LLSD results = LLSettingsDay::settingValidation(default_settings, validations);