diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index 6f4e70e98f89c8c6cf0fe6f218d6dace7e815935..3f2238bf7aed9348e2d736e038a1f7680b47b258 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -101,6 +101,9 @@ const S32 LLSettingsDay::TRACK_WATER(0);   // water track is 0
 const S32 LLSettingsDay::TRACK_MAX(5);     // 5 tracks, 4 skys, 1 water
 const S32 LLSettingsDay::FRAME_MAX(56);
 
+// *LAPRAS* Change when Agni
+const LLUUID LLSettingsDay::DEFAULT_ASSET_ID("94d296c2-6e05-963c-6b62-671199121dbb");
+
 //=========================================================================
 LLSettingsDay::LLSettingsDay(const LLSD &data) :
     LLSettingsBase(data),
@@ -218,22 +221,18 @@ bool LLSettingsDay::initialize()
                 if (i == TRACK_WATER)
                 {
                     setting = used[(*it)[SETTING_KEYNAME]];
-                    if (!setting)
-                        setting = getNamedWater((*it)[SETTING_KEYNAME]);
                     if (setting && setting->getSettingType() != "water")
                     {
-                        LL_WARNS("DAYCYCLE") << "Water track referencing " << setting->getSettingType() << " frame at " << keyframe << "." << LL_ENDL;
+                        LL_WARNS("SETTINGS", "DAYCYCLE") << "Water track referencing " << setting->getSettingType() << " frame at " << keyframe << "." << LL_ENDL;
                         setting.reset();
                     }
                 }
                 else
                 {
                     setting = used[(*it)[SETTING_KEYNAME]];
-                    if (!setting)
-                        setting = getNamedSky((*it)[SETTING_KEYNAME]);
                     if (setting && setting->getSettingType() != "sky")
                     {
-                        LL_WARNS("DAYCYCLE") << "Sky track #" << i << " referencing " << setting->getSettingType() << " frame at " << keyframe << "." << LL_ENDL;
+                        LL_WARNS("SETTINGS", "DAYCYCLE") << "Sky track #" << i << " referencing " << setting->getSettingType() << " frame at " << keyframe << "." << LL_ENDL;
                         setting.reset();
                     }
                 }
@@ -247,6 +246,10 @@ bool LLSettingsDay::initialize()
                     hassky |= true;
                 mDayTracks[i][keyframe] = setting;
             }
+            else
+            {
+                LL_WARNS("SETTINGS", "DAYCYCLE") << "Skipping frame on track #" << i << " at time index " << keyframe << LL_ENDL;
+            }
         }
     }
 
diff --git a/indra/llinventory/llsettingsdaycycle.h b/indra/llinventory/llsettingsdaycycle.h
index 0929cff87c5ceb2009b48eb1364e6761623154d1..f7e5710dc15136fcc2976aa17d7f87c458a65431 100644
--- a/indra/llinventory/llsettingsdaycycle.h
+++ b/indra/llinventory/llsettingsdaycycle.h
@@ -63,6 +63,8 @@ class LLSettingsDay : public LLSettingsBase
     static const S32            TRACK_MAX;
     static const S32            FRAME_MAX;
 
+    static const LLUUID         DEFAULT_ASSET_ID;
+
     typedef std::map<F32, LLSettingsBase::ptr_t>    CycleTrack_t;
     typedef std::vector<CycleTrack_t>               CycleList_t;
     typedef std::shared_ptr<LLSettingsDay>          ptr_t;
@@ -108,10 +110,7 @@ class LLSettingsDay : public LLSettingsBase
     virtual LLSettingsSkyPtr_t  buildSky(LLSD) const = 0;
     virtual LLSettingsWaterPtr_t buildWater(LLSD) const = 0;
 
-    virtual LLSettingsSkyPtr_t  getNamedSky(const std::string &) const = 0;
-    virtual LLSettingsWaterPtr_t getNamedWater(const std::string &) const = 0;
-
-    void    setInitialized(bool value = true) { mInitialized = value; }
+    void                        setInitialized(bool value = true) { mInitialized = value; }
     CycleTrack_t &              getCycleTrack(S32 track);
 
     virtual validation_list_t   getValidationList() const override;
diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index b6320e094251f9225d02120dc5b39c4157eb98cf..cdd5b156d2fcaf5e7dd6603a694035940c7dc0b5 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -110,6 +110,9 @@ const LLUUID LLSettingsSky::DEFAULT_SUN_ID("cce0f112-878f-4586-a2e2-a8f104bba271
 const LLUUID LLSettingsSky::DEFAULT_MOON_ID("d07f6eed-b96a-47cd-b51d-400ad4a1c428"); // dataserver
 const LLUUID LLSettingsSky::DEFAULT_CLOUD_ID("1dc1368f-e8fe-f02d-a08d-9d9f11c1af6b");
 
+// *LAPRAS* Change when Agni!
+const LLUUID LLSettingsSky::DEFAULT_ASSET_ID("cec9af47-90d4-9093-5245-397e5c9e7749");
+
 const std::string LLSettingsSky::SETTING_LEGACY_HAZE("legacy_haze");
 
 namespace
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 93da1e6dd01373616d60ed8edb9cf45148f108c4..839de033b3bafe8ef5e8a0a0fbbcc3bf9740fdc8 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -86,11 +86,13 @@ class LLSettingsSky: public LLSettingsBase
         static const std::string SETTING_DENSITY_PROFILE_CONSTANT_TERM;
         
 
+    static const std::string SETTING_LEGACY_HAZE;
+
     static const LLUUID DEFAULT_SUN_ID;
     static const LLUUID DEFAULT_MOON_ID;
     static const LLUUID DEFAULT_CLOUD_ID;
 
-    static const std::string SETTING_LEGACY_HAZE;
+    static const LLUUID DEFAULT_ASSET_ID;
 
     typedef std::shared_ptr<LLSettingsSky> ptr_t;
 
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index c6798945a3180ac2c492f02b8183f8ad588ee213..aa1f0f193598e9645889c0b241a63a82ea05edea 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -69,6 +69,9 @@ const std::string LLSettingsWater::SETTING_LEGACY_WAVE2_DIR("wave2Dir");
 
 const LLUUID LLSettingsWater::DEFAULT_WATER_NORMAL_ID(DEFAULT_WATER_NORMAL);
 
+// *LAPRAS* Change when Agni
+const LLUUID LLSettingsWater::DEFAULT_ASSET_ID("ce4cfe94-700a-292c-7c22-a2d9201bd661");
+
 
 //=========================================================================
 LLSettingsWater::LLSettingsWater(const LLSD &data) :
diff --git a/indra/llinventory/llsettingswater.h b/indra/llinventory/llsettingswater.h
index 35e5b7bcf6c7b830854763259664ab2e29c8e5ce..a85a471bc56429eb6b28aa526ee093253b0e7374 100644
--- a/indra/llinventory/llsettingswater.h
+++ b/indra/llinventory/llsettingswater.h
@@ -48,6 +48,8 @@ class LLSettingsWater : public LLSettingsBase
 
     static const LLUUID DEFAULT_WATER_NORMAL_ID;
 
+    static const LLUUID DEFAULT_ASSET_ID;
+
     typedef std::shared_ptr<LLSettingsWater> ptr_t;
 
     //---------------------------------------------------------------------
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index b7aff6bca917d309958fbc80966dcc59220fac3a..3b0bc4cd556287a63f6b23d83d2b5757eeedd908 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -240,6 +240,16 @@ const F32Seconds LLEnvironment::TRANSITION_DEFAULT(5.0f);
 const F32Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
 const F32Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
 
+//*TODO* Change these when available on Agni (these are Damballah asset IDs).
+const LLUUID LLEnvironment::KNOWN_SKY_DEFAULT(LLSettingsSky::DEFAULT_ASSET_ID);
+const LLUUID LLEnvironment::KNOWN_WATER_DEFAULT(LLSettingsWater::DEFAULT_ASSET_ID);
+const LLUUID LLEnvironment::KNOWN_DAY_DEFAULT(LLSettingsDay::DEFAULT_ASSET_ID);
+
+const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("645d7475-19d6-d05c-6eb2-29eeacf76e06");
+const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("68f5a7ec-2785-d9d8-be7c-cca93976759a");
+const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("06420773-757b-4b7c-a1f9-85fceb2f7bd4");
+const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("c13658f3-91b8-d559-3a12-b11ce3940c4c");
+
 const F32 LLEnvironment::SUN_DELTA_YAW(F_PI);   // 180deg 
 
 //-------------------------------------------------------------------------
@@ -554,6 +564,25 @@ void LLEnvironment::setEnvironment(LLEnvironment::EnvSelection_t env, const LLSe
     }
 }
 
+void LLEnvironment::setEnvironment(EnvSelection_t env, const LLUUID &assetId)
+{
+    LLSettingsVOBase::getSettingsAsset(assetId,
+        [this, env](LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, LLExtStat) { onSetEnvAssetLoaded(env, asset_id, settings, status); });
+
+}
+
+void LLEnvironment::onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status)
+{
+    if (!settings || status)
+    {
+        LLSD args;
+        args["DESC"] = asset_id.asString();
+        LLNotificationsUtil::add("FailedToFindSettings", args);
+        return;
+    }
+
+    setEnvironment(env, settings);
+}
 
 void LLEnvironment::clearEnvironment(LLEnvironment::EnvSelection_t env)
 {
@@ -1405,196 +1434,172 @@ std::string LLEnvironment::getUserDir(const std::string &subdir)
 
 LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::string filename)
 {
-    LLSD data = legacyLoadPreset(filename);
-    if (!data)
-        return LLSettingsWater::ptr_t();
-
     std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
-    LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
+    std::string path(gDirUtilp->getDirName(filename));
 
+    LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPresetFile(name, path);
     return water;
 }
 
 LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string filename)
 {
-    LLSD data = legacyLoadPreset(filename);
-    if (!data)
-        return LLSettingsSky::ptr_t();
-
     std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
-    LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
+    std::string path(gDirUtilp->getDirName(filename));
 
+    LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPresetFile(name, path);
     return sky;
+
 }
 
 LLSettingsDay::ptr_t LLEnvironment::createDayCycleFromLegacyPreset(const std::string filename)
 {
-    // for the moment just look it up from the preloaded.
     std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
+    std::string path(gDirUtilp->getDirName(filename));
 
-    LLSettingsDay::ptr_t day = instance().findDayCycleByName(name);
+    LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPresetFile(name, path);
     return day;
 }
 
 
-LLSD LLEnvironment::legacyLoadPreset(const std::string& path)
-{
-    llifstream xml_file;
-    std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
-
-    xml_file.open(path.c_str());
-    if (!xml_file)
-    {
-        return LLSD();
-    }
-
-    LLSD params_data;
-    LLPointer<LLSDParser> parser = new LLSDXMLParser();
-    parser->parse(xml_file, params_data, LLSDSerialize::SIZE_UNLIMITED);
-    xml_file.close();
-
-    return params_data;
-}
-
 void LLEnvironment::legacyLoadAllPresets()
 {
-    std::string dir;
-    std::string file;
-
-    // System skies
-    {
-        dir = getSysDir("skies");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
-                LLEnvironment::instance().addSky(sky);
-            }
-        }
-    }
-
-    // User skies
-    {
-        dir = getUserDir("skies");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
-                LLEnvironment::instance().addSky(sky);
-            }
-        }
-    }
-
-    // System water
-    {
-        dir = getSysDir("water");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
-                LLEnvironment::instance().addWater(water);
-            }
-        }
-    }
-
-    // User water
-    {
-        dir = getUserDir("water");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
-                LLEnvironment::instance().addWater(water);
-            }
-        }
-    }
-
-    // System Days
-    {
-        dir = getSysDir("days");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPreset(name, data);
-                /*if (day->validate())
-                {
-                    LL_INFOS() << "Adding Day Cycle " << name << "." << LL_ENDL;
-                    LLEnvironment::instance().addDayCycle(day);
-                }
-                else
-                {
-                    LL_WARNS() << "Day Cycle " << name << " was not valid. Ignoring." << LL_ENDL;
-                }*/
-                LL_INFOS() << "Adding Day Cycle " << name << "." << LL_ENDL;
-                LLEnvironment::instance().addDayCycle(day);
-#ifdef EXPORT_PRESETS
-                std::string exportfile = LLURI::escape(name) + "(new).xml";
-                std::string exportpath = gDirUtilp->add(getSysDir("new"), exportfile);
-
-                LLSD settings = day->getSettings();
-
-                std::ofstream daycyclefile(exportpath);
-                LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
-                formatter->format(settings, daycyclefile, LLSDFormatter::OPTIONS_PRETTY);
-                daycyclefile.close();
-#endif
-            }
-        }
-    }
-
-    // User Days
-    {
-        dir = getUserDir("days");
-        LLDirIterator dir_iter(dir, "*.xml");
-        while (dir_iter.next(file))
-        {
-            std::string path = gDirUtilp->add(dir, file);
-
-            LLSD data = legacyLoadPreset(path);
-            if (data)
-            {
-                std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
-
-                LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPreset(name, data);
-                LLEnvironment::instance().addDayCycle(day);
-            }
-        }
-    }
+//     std::string dir;
+//     std::string file;
+// 
+//     // System skies
+//     {
+//         dir = getSysDir("skies");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
+//                 LLEnvironment::instance().addSky(sky);
+//             }
+//         }
+//     }
+// 
+//     // User skies
+//     {
+//         dir = getUserDir("skies");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPreset(name, data);
+//                 LLEnvironment::instance().addSky(sky);
+//             }
+//         }
+//     }
+// 
+//     // System water
+//     {
+//         dir = getSysDir("water");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
+//                 LLEnvironment::instance().addWater(water);
+//             }
+//         }
+//     }
+// 
+//     // User water
+//     {
+//         dir = getUserDir("water");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPreset(name, data);
+//                 LLEnvironment::instance().addWater(water);
+//             }
+//         }
+//     }
+// 
+//     // System Days
+//     {
+//         dir = getSysDir("days");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPreset(name, data);
+//                 /*if (day->validate())
+//                 {
+//                     LL_INFOS() << "Adding Day Cycle " << name << "." << LL_ENDL;
+//                     LLEnvironment::instance().addDayCycle(day);
+//                 }
+//                 else
+//                 {
+//                     LL_WARNS() << "Day Cycle " << name << " was not valid. Ignoring." << LL_ENDL;
+//                 }*/
+//                 LL_INFOS() << "Adding Day Cycle " << name << "." << LL_ENDL;
+//                 LLEnvironment::instance().addDayCycle(day);
+// #ifdef EXPORT_PRESETS
+//                 std::string exportfile = LLURI::escape(name) + "(new).xml";
+//                 std::string exportpath = gDirUtilp->add(getSysDir("new"), exportfile);
+// 
+//                 LLSD settings = day->getSettings();
+// 
+//                 std::ofstream daycyclefile(exportpath);
+//                 LLPointer<LLSDFormatter> formatter = new LLSDXMLFormatter();
+//                 formatter->format(settings, daycyclefile, LLSDFormatter::OPTIONS_PRETTY);
+//                 daycyclefile.close();
+// #endif
+//             }
+//         }
+//     }
+// 
+//     // User Days
+//     {
+//         dir = getUserDir("days");
+//         LLDirIterator dir_iter(dir, "*.xml");
+//         while (dir_iter.next(file))
+//         {
+//             std::string path = gDirUtilp->add(dir, file);
+// 
+//             LLSD data = legacyLoadPreset(path);
+//             if (data)
+//             {
+//                 std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), true));
+// 
+//                 LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPreset(name, data);
+//                 LLEnvironment::instance().addDayCycle(day);
+//             }
+//         }
+//     }
 }
 
 void LLEnvironment::onAgentPositionHasChanged(const LLVector3 &localpos)
@@ -1615,9 +1620,6 @@ void LLEnvironment::onAgentPositionHasChanged(const LLVector3 &localpos)
 
 S32 LLEnvironment::calculateSkyTrackForAltitude(F64 altitude)
 {
-//     //*LAPRAS* temp  base on region's response.
-//     return llmin((static_cast<S32>(altitude) / 100) + 1, (LLSettingsDay::TRACK_MAX - 1));
-
     auto it = std::find_if_not(mTrackAltitudes.begin(), mTrackAltitudes.end(), [altitude](F32 test) { return altitude > test; });
     
     if (it == mTrackAltitudes.begin())
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index 52f22ac8f15fb9784ceb35be689df3e33723e6d6..56be88f37109c96d62589073a4f61626b4fff23c 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -56,6 +56,14 @@ class LLEnvironment : public LLSingleton<LLEnvironment>
     static const F32Seconds     TRANSITION_SLOW;
     static const F32Seconds     TRANSITION_ALTITUDE;
 
+    static const LLUUID         KNOWN_SKY_DEFAULT;
+    static const LLUUID         KNOWN_WATER_DEFAULT;
+    static const LLUUID         KNOWN_DAY_DEFAULT;
+    static const LLUUID         KNOWN_SKY_SUNRISE;
+    static const LLUUID         KNOWN_SKY_MIDDAY;
+    static const LLUUID         KNOWN_SKY_SUNSET;
+    static const LLUUID         KNOWN_SKY_MIDNIGHT;
+
     struct EnvironmentInfo
     {
         EnvironmentInfo();
@@ -162,6 +170,8 @@ class LLEnvironment : public LLSingleton<LLEnvironment>
     void                        setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); }
     void                        setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); }
     void                        setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); }
+    void                        setEnvironment(EnvSelection_t env, const LLUUID &assetId);
+
     void                        clearEnvironment(EnvSelection_t env);
     LLSettingsDay::ptr_t        getEnvironmentDay(EnvSelection_t env);
     LLSettingsDay::Seconds      getEnvironmentDayLength(EnvSelection_t env);
@@ -180,9 +190,11 @@ class LLEnvironment : public LLSingleton<LLEnvironment>
     list_name_id_t              getWaterList() const;
     list_name_id_t              getDayCycleList() const;
 
+    // *LAPRAS* TODO : Remove these vvv
     LLSettingsSky::ptr_t        findSkyByName(std::string name) const;
     LLSettingsWater::ptr_t      findWaterByName(std::string name) const;
     LLSettingsDay::ptr_t        findDayCycleByName(std::string name) const;
+    // *LAPRAS* TODO : Remove these ^^^
 
     inline LLVector2            getCloudScrollDelta() const { return mCloudScrollDelta; }
 
@@ -387,9 +399,10 @@ class LLEnvironment : public LLSingleton<LLEnvironment>
     void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment);
 
     void onAgentPositionHasChanged(const LLVector3 &localpos);
+
+    void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status);
     //=========================================================================
     void                        legacyLoadAllPresets();
-    static LLSD                 legacyLoadPreset(const std::string& path);
     static std::string          getSysDir(const std::string &subdir);
     static std::string          getUserDir(const std::string &subdir);
 
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 543f6e567147bda095d2181b8386124df63cf0eb..cac9154c98f926212e460cd1716568e5b6ef26ea 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -795,6 +795,14 @@ void LLFloaterEditExtDayCycle::loadInventoryItem(const LLUUID  &inventoryId)
 
 void LLFloaterEditExtDayCycle::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status)
 {
+    if (!settings || status)
+    {
+        LLSD args;
+        args["DESC"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
+        LLNotificationsUtil::add("FailedToFindSettings", args);
+        closeFloater();
+        return;
+    }
     mEditDay = std::dynamic_pointer_cast<LLSettingsDay>(settings);
     updateEditEnvironment();
     syncronizeTabs();
diff --git a/indra/newview/llfloaterenvironmentsettings.cpp b/indra/newview/llfloaterenvironmentsettings.cpp
index b7bf6918fe1ceb1471a8e32006ac27944a8abd22..1b96db66116fa588ea24d8d01a2a4dbaed0d84f4 100644
--- a/indra/newview/llfloaterenvironmentsettings.cpp
+++ b/indra/newview/llfloaterenvironmentsettings.cpp
@@ -122,6 +122,7 @@ void LLFloaterEnvironmentSettings::onSelectDayCyclePreset()
 
 void LLFloaterEnvironmentSettings::onBtnOK()
 {
+#if 0
     bool use_region_settings	= mRegionSettingsRadioGroup->getSelectedIndex() == 0;
 
     LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
@@ -157,7 +158,6 @@ void LLFloaterEnvironmentSettings::onBtnOK()
         LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
     }
 
-#if 0
 	// Save and apply new user preferences.
 	bool use_region_settings	= mRegionSettingsRadioGroup->getSelectedIndex() == 0;
 	bool use_fixed_sky			= mDayCycleSettingsRadioGroup->getSelectedIndex() == 0;
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index d5fc34a04b49ab4f766bd2453b00d8da45c91f2d..6c1080294d2fa5e08023b0a1ab7f12656970e61e 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -212,6 +212,15 @@ void LLFloaterFixedEnvironment::loadInventoryItem(const LLUUID  &inventoryId)
 
 void LLFloaterFixedEnvironment::onAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status)
 {
+    if (!settings || status)
+    {
+        LLSD args;
+        args["DESC"] = (mInventoryItem) ? mInventoryItem->getName() : "Unknown";
+        LLNotificationsUtil::add("FailedToFindSettings", args);
+        closeFloater();
+        return;
+    }
+
     mSettings = settings;
     updateEditEnvironment();
     syncronizeTabs();
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 2b74116f8ba48749980397787cc93df1018ceb87..fe7d302992095859c23f94ea7bdb26a3c91a740d 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -6903,7 +6903,44 @@ LLUIImagePtr LLSettingsBridge::getIcon() const
 
 void LLSettingsBridge::performAction(LLInventoryModel* model, std::string action)
 {
-    LLItemBridge::performAction(model, action);
+    if ("apply_settings_local" == action)
+    {
+        // Single item only
+        LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
+        if (!item) 
+            return;
+        LLUUID asset_id = item->getProtectedAssetUUID();
+        LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, asset_id);
+        LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+    }
+    else if ("apply_settings_parcel" == action)
+    {
+        // Single item only
+        LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
+        if (!item)
+            return;
+        LLUUID asset_id = item->getProtectedAssetUUID();
+        // *LAPRAS* TODO update on simulator.
+        LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY PARCEL UPDATE" << LL_ENDL;
+        LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
+        LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_PARCEL, asset_id);
+        LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+    }
+    else if ("apply_settings_region" == action)
+    {
+        // Single item only
+        LLViewerInventoryItem* item = static_cast<LLViewerInventoryItem*>(getItem());
+        if (!item)
+            return;
+        LLUUID asset_id = item->getProtectedAssetUUID();
+        // *LAPRAS* TODO update on simulator.
+        LL_WARNS("LAPRAS") << "Only updating locally!!! NOT REALLY REGION UPDATE" << LL_ENDL;
+        LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
+        LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_REGION, asset_id);
+        LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
+    }
+    else
+        LLItemBridge::performAction(model, action);
 }
 
 void LLSettingsBridge::openItem()
@@ -6917,9 +6954,48 @@ void LLSettingsBridge::openItem()
 
 void LLSettingsBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
-    LLItemBridge::buildContextMenu(menu, flags);
-}
+    LL_DEBUGS() << "LLSettingsBridge::buildContextMenu()" << LL_ENDL;
+    menuentry_vec_t items;
+    menuentry_vec_t disabled_items;
 
+    if (isMarketplaceListingsFolder())
+    {
+        menuentry_vec_t items;
+        menuentry_vec_t disabled_items;
+        addMarketplaceContextMenuOptions(flags, items, disabled_items);
+        items.push_back(std::string("Properties"));
+        getClipboardEntries(false, items, disabled_items, flags);
+        hide_context_entries(menu, items, disabled_items);
+    }
+    else if (isItemInTrash())
+    {
+        addTrashContextMenuOptions(items, disabled_items);
+    }
+    else
+    {
+        items.push_back(std::string("Share"));
+        if (!canShare())
+        {
+            disabled_items.push_back(std::string("Share"));
+        }
+
+        addOpenRightClickMenuOption(items);
+        items.push_back(std::string("Properties"));
+
+        getClipboardEntries(true, items, disabled_items, flags);
+
+        items.push_back("Settings Separator");
+        items.push_back("Settings Apply Local");
+
+        items.push_back("Settings Apply Parcel");
+        // *LAPRAS* TODO: test for permission
+
+        items.push_back("Settings Apply Region");
+        // *LAPRAS* TODO: test for permission
+    }
+    addLinkReplaceMenuOption(items, disabled_items);
+    hide_context_entries(menu, items, disabled_items);
+}
 std::string LLSettingsBridge::getLabelSuffix() const
 {
     return LLItemBridge::getLabelSuffix();
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 451a0fb32692a8b279eb58b5dacebe9b20cfaa82..0e3bc87719c7a88a02d1eaae1f355c8398f63c0a 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -58,47 +58,33 @@
 #include "llassetstorage.h"
 #include "llvfile.h"
 
+#include <boost/algorithm/string/replace.hpp>
+
 #undef  VERIFY_LEGACY_CONVERSION
 
 //=========================================================================
 namespace 
 {
-LLSD ensureArray4(LLSD in, F32 fill)
-{
-    if (in.size() >= 4)
-        return in;
-    
-    LLSD out(LLSD::emptyArray());
-    
-    for (S32 idx = 0; idx < in.size(); ++idx)
-    {
-        out.append(in[idx]);
-    }
-    
-    while (out.size() < 4)
-    {
-        out.append(LLSD::Real(fill));
-    }
-    return out;
-}
-
+    LLSD ensure_array_4(LLSD in, F32 fill);
+    LLSD read_legacy_preset_data(const std::string& path);
 
-//-------------------------------------------------------------------------
-class LLSettingsInventoryCB : public LLInventoryCallback
-{
-public:
-    typedef std::function<void(const LLUUID &)> callback_t;
+    //-------------------------------------------------------------------------
+    class LLSettingsInventoryCB : public LLInventoryCallback
+    {
+    public:
+        typedef std::function<void(const LLUUID &)> callback_t;
 
-    LLSettingsInventoryCB(callback_t cbfn) :
-        mCbfn(cbfn)
-    { }
+        LLSettingsInventoryCB(callback_t cbfn) :
+            mCbfn(cbfn)
+        { }
 
-    void fire(const LLUUID& inv_item) override  { if (mCbfn) mCbfn(inv_item); }
+        void fire(const LLUUID& inv_item) override  { if (mCbfn) mCbfn(inv_item); }
 
-private:
-    callback_t  mCbfn;
-};
+    private:
+        callback_t  mCbfn;
+    };
 
+    //-------------------------------------------------------------------------
 }
 
 
@@ -240,9 +226,10 @@ void LLSettingsVOBase::onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_i
     }
     else
     {
-        LL_WARNS("SETTINGS") << "Error retrieving asset asset_id. Status code=" << status << "(" << LLAssetStorage::getErrorString(status) << ") ext_status=" << ext_status << LL_ENDL;
+        LL_WARNS("SETTINGS") << "Error retrieving asset " << asset_id << ". Status code=" << status << "(" << LLAssetStorage::getErrorString(status) << ") ext_status=" << ext_status << LL_ENDL;
     }
-    callback(asset_id, settings, status, ext_status);
+    if (callback)
+        callback(asset_id, settings, status, ext_status);
 }
 
 
@@ -392,6 +379,37 @@ LLSettingsSky::ptr_t LLSettingsVOSky::buildFromLegacyPreset(const std::string &n
     return skyp;
 }
 
+namespace
+{
+    // This is a disturbing hack
+    std::string legacy_name_to_filename(const std::string &name)
+    {
+        std::string fixedname(LLURI::escape(name));
+
+        boost::algorithm::replace_all(fixedname, "-", "%2D");
+        return fixedname;
+    }
+}
+
+LLSettingsSky::ptr_t LLSettingsVOSky::buildFromLegacyPresetFile(const std::string &name, const std::string &path)
+{
+    std::string full_path(path);
+    std::string full_name(legacy_name_to_filename(name));
+    full_name += ".xml";
+
+    gDirUtilp->append(full_path, full_name);
+    LLSD legacy_data = read_legacy_preset_data(full_path);
+
+    if (!legacy_data)
+    {
+        LL_WARNS("SETTINGS") << "Could not load legacy Windlight \"" << name << "\" from " << full_path << LL_ENDL;
+        return ptr_t();
+    }
+
+    return buildFromLegacyPreset(name, legacy_data);
+}
+
+
 LLSettingsSky::ptr_t LLSettingsVOSky::buildDefaultSky()
 {
     LLSD settings = LLSettingsSky::defaults();
@@ -449,20 +467,20 @@ LLSD LLSettingsVOSky::convertToLegacy(const LLSettingsSky::ptr_t &psky, bool isA
     
     convertAtmosphericsToLegacy(legacy, settings);
 
-    legacy[SETTING_CLOUD_COLOR] = ensureArray4(settings[SETTING_CLOUD_COLOR], 1.0);
-    legacy[SETTING_CLOUD_POS_DENSITY1] = ensureArray4(settings[SETTING_CLOUD_POS_DENSITY1], 1.0);
-    legacy[SETTING_CLOUD_POS_DENSITY2] = ensureArray4(settings[SETTING_CLOUD_POS_DENSITY2], 1.0);
+    legacy[SETTING_CLOUD_COLOR] = ensure_array_4(settings[SETTING_CLOUD_COLOR], 1.0);
+    legacy[SETTING_CLOUD_POS_DENSITY1] = ensure_array_4(settings[SETTING_CLOUD_POS_DENSITY1], 1.0);
+    legacy[SETTING_CLOUD_POS_DENSITY2] = ensure_array_4(settings[SETTING_CLOUD_POS_DENSITY2], 1.0);
     legacy[SETTING_CLOUD_SCALE] = LLSDArray(settings[SETTING_CLOUD_SCALE])(LLSD::Real(0.0))(LLSD::Real(0.0))(LLSD::Real(1.0));       
     legacy[SETTING_CLOUD_SCROLL_RATE] = settings[SETTING_CLOUD_SCROLL_RATE];
     legacy[SETTING_LEGACY_ENABLE_CLOUD_SCROLL] = LLSDArray(LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][0].asReal())))
         (LLSD::Boolean(!is_approx_zero(settings[SETTING_CLOUD_SCROLL_RATE][1].asReal())));     
     legacy[SETTING_CLOUD_SHADOW] = LLSDArray(settings[SETTING_CLOUD_SHADOW].asReal())(0.0f)(0.0f)(1.0f);    
     legacy[SETTING_GAMMA] = LLSDArray(settings[SETTING_GAMMA])(0.0f)(0.0f)(1.0f);
-    legacy[SETTING_GLOW] = ensureArray4(settings[SETTING_GLOW], 1.0);
-    legacy[SETTING_LIGHT_NORMAL] = ensureArray4(psky->getLightDirection().getValue(), 0.0f);
+    legacy[SETTING_GLOW] = ensure_array_4(settings[SETTING_GLOW], 1.0);
+    legacy[SETTING_LIGHT_NORMAL] = ensure_array_4(psky->getLightDirection().getValue(), 0.0f);
     legacy[SETTING_MAX_Y] = LLSDArray(settings[SETTING_MAX_Y])(0.0f)(0.0f)(1.0f);
     legacy[SETTING_STAR_BRIGHTNESS] = settings[SETTING_STAR_BRIGHTNESS];
-    legacy[SETTING_SUNLIGHT_COLOR] = ensureArray4(settings[SETTING_SUNLIGHT_COLOR], 1.0f);
+    legacy[SETTING_SUNLIGHT_COLOR] = ensure_array_4(settings[SETTING_SUNLIGHT_COLOR], 1.0f);
     
     LLQuaternion sunquat = psky->getSunRotation();
 
@@ -619,6 +637,25 @@ LLSettingsWater::ptr_t LLSettingsVOWater::buildFromLegacyPreset(const std::strin
     return waterp;
 }
 
+LLSettingsWater::ptr_t LLSettingsVOWater::buildFromLegacyPresetFile(const std::string &name, const std::string &path)
+{
+    std::string full_path(path);
+    std::string full_name(legacy_name_to_filename(name));
+    full_name += ".xml";
+
+    gDirUtilp->append(full_path, full_name);
+    LLSD legacy_data = read_legacy_preset_data(full_path);
+
+    if (!legacy_data)
+    {
+        LL_WARNS("SETTINGS") << "Could not load legacy Windlight \"" << name << "\" from " << full_path << LL_ENDL;
+        return ptr_t();
+    }
+
+    return buildFromLegacyPreset(name, legacy_data);
+}
+
+
 LLSettingsWater::ptr_t LLSettingsVOWater::buildDefaultWater()
 {
     LLSD settings = LLSettingsWater::defaults();
@@ -659,7 +696,7 @@ LLSD LLSettingsVOWater::convertToLegacy(const LLSettingsWater::ptr_t &pwater)
     LLSD settings = pwater->getSettings();
 
     legacy[SETTING_LEGACY_BLUR_MULTIPILER] = settings[SETTING_BLUR_MULTIPILER];
-    legacy[SETTING_LEGACY_FOG_COLOR] = ensureArray4(settings[SETTING_FOG_COLOR], 1.0f);
+    legacy[SETTING_LEGACY_FOG_COLOR] = ensure_array_4(settings[SETTING_FOG_COLOR], 1.0f);
     legacy[SETTING_LEGACY_FOG_DENSITY] = settings[SETTING_FOG_DENSITY];
     legacy[SETTING_LEGACY_FOG_MOD] = settings[SETTING_FOG_MOD];
     legacy[SETTING_LEGACY_FRESNEL_OFFSET] = settings[SETTING_FRESNEL_OFFSET];
@@ -768,10 +805,18 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildDay(LLSD settings)
 }
 
 //-------------------------------------------------------------------------
-LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings)
+LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &name, const std::string &path, const LLSD &oldsettings)
 {
     LLSD newsettings(defaults());
     std::set<std::string> framenames;
+    std::set<std::string> notfound;
+
+    std::string base_path(gDirUtilp->getDirName(path));
+    std::string water_path(base_path);
+    std::string sky_path(base_path);
+
+    gDirUtilp->append(water_path, "water");
+    gDirUtilp->append(sky_path, "skies");
 
     newsettings[SETTING_NAME] = name;
 
@@ -795,14 +840,16 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n
     LLSD frames(LLSD::emptyMap());
 
     {
-        LLSettingsWater::ptr_t pwater = LLEnvironment::instance().findWaterByName("Default");
-        frames["water:Default"] = pwater->getSettings();
+        LLSettingsWater::ptr_t pwater = LLSettingsVOWater::buildFromLegacyPresetFile("Default", water_path);
+        if (pwater)
+            frames["water:Default"] = pwater->getSettings();
     }
 
     for (std::set<std::string>::iterator itn = framenames.begin(); itn != framenames.end(); ++itn)
     {
-        LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName(*itn);
-        frames["sky:" + (*itn)] = psky->getSettings();
+        LLSettingsSky::ptr_t psky = LLSettingsVOSky::buildFromLegacyPresetFile((*itn), sky_path);
+        if (psky)
+            frames["sky:" + (*itn)] = psky->getSettings();
     }
 
     newsettings[SETTING_FRAMES] = frames;
@@ -834,6 +881,26 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPreset(const std::string &n
     return dayp;
 }
 
+LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyPresetFile(const std::string &name, const std::string &path)
+{
+    std::string full_path(path);
+    std::string full_name(legacy_name_to_filename(name));
+    full_name += ".xml";
+
+    gDirUtilp->append(full_path, full_name);
+    LLSD legacy_data = read_legacy_preset_data(full_path);
+
+    if (!legacy_data)
+    {
+        LL_WARNS("SETTINGS") << "Could not load legacy Windlight \"" << name << "\" from " << full_path << LL_ENDL;
+        return ptr_t();
+    }
+
+    return buildFromLegacyPreset(name, path, legacy_data);
+}
+
+
+
 LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyMessage(const LLUUID &regionId, LLSD daycycle, LLSD skydefs, LLSD waterdef)
 {
     LLSD frames(LLSD::emptyMap());
@@ -891,6 +958,8 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromLegacyMessage(const LLUUID &regio
     return dayp;
 }
 
+
+
 LLSettingsDay::ptr_t LLSettingsVODay::buildDefaultDayCycle()
 {
     LLSD settings = LLSettingsDay::defaults();
@@ -1024,12 +1093,43 @@ LLSettingsWaterPtr_t LLSettingsVODay::buildWater(LLSD settings) const
     return LLSettingsWater::ptr_t();
 }
 
-LLSettingsSkyPtr_t LLSettingsVODay::getNamedSky(const std::string &name) const
+//=========================================================================
+namespace
 {
-    return LLEnvironment::instance().findSkyByName(name);
-}
+    LLSD ensure_array_4(LLSD in, F32 fill)
+    {
+        if (in.size() >= 4)
+            return in;
 
-LLSettingsWaterPtr_t LLSettingsVODay::getNamedWater(const std::string &name) const
-{
-    return LLEnvironment::instance().findWaterByName(name);
+        LLSD out(LLSD::emptyArray());
+
+        for (S32 idx = 0; idx < in.size(); ++idx)
+        {
+            out.append(in[idx]);
+        }
+
+        while (out.size() < 4)
+        {
+            out.append(LLSD::Real(fill));
+        }
+        return out;
+    }
+
+    //---------------------------------------------------------------------
+    LLSD read_legacy_preset_data(const std::string& path)
+    {
+        llifstream xml_file;
+//      std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(path), /*strip_exten = */ true));
+
+        xml_file.open(path.c_str());
+        if (!xml_file)
+            return LLSD();
+
+        LLSD params_data;
+        LLPointer<LLSDParser> parser = new LLSDXMLParser();
+        parser->parse(xml_file, params_data, LLSDSerialize::SIZE_UNLIMITED);
+        xml_file.close();
+
+        return params_data;
+    }
 }
diff --git a/indra/newview/llsettingsvo.h b/indra/newview/llsettingsvo.h
index 2f9111785897e515aac73c1dbfcd74a19c930813..7d68586fa0f7b9875ca1a21fdc2b5e078d729cad 100644
--- a/indra/newview/llsettingsvo.h
+++ b/indra/newview/llsettingsvo.h
@@ -90,6 +90,8 @@ class LLSettingsVOSky : public LLSettingsSky
     static ptr_t    buildDefaultSky();
     virtual ptr_t   buildClone() override;
 
+    static ptr_t    buildFromLegacyPresetFile(const std::string &name, const std::string &path);
+
     static LLSD     convertToLegacy(const ptr_t &, bool isAdvanced);
 
     bool isAdvanced() const { return  m_isAdvanced; }
@@ -122,6 +124,8 @@ class LLSettingsVOWater : public LLSettingsWater
     static ptr_t    buildDefaultWater();
     virtual ptr_t   buildClone() override;
 
+    static ptr_t    buildFromLegacyPresetFile(const std::string &name, const std::string &path);
+
     static LLSD     convertToLegacy(const ptr_t &);
 protected:
     LLSettingsVOWater();
@@ -145,7 +149,8 @@ class LLSettingsVODay : public LLSettingsDay
 
     static ptr_t    buildDay(LLSD settings);
 
-    static ptr_t    buildFromLegacyPreset(const std::string &name, const LLSD &oldsettings);
+    static ptr_t    buildFromLegacyPreset(const std::string &name, const std::string &path, const LLSD &oldsettings);
+    static ptr_t    buildFromLegacyPresetFile(const std::string &name, const std::string &path);
     static ptr_t    buildFromLegacyMessage(const LLUUID &regionId, LLSD daycycle, LLSD skys, LLSD water);
     static ptr_t    buildDefaultDayCycle();
     static ptr_t    buildFromEnvironmentMessage(LLSD settings);
@@ -157,8 +162,6 @@ class LLSettingsVODay : public LLSettingsDay
     virtual LLSettingsWaterPtr_t    getDefaultWater() const override;
     virtual LLSettingsSkyPtr_t      buildSky(LLSD) const override;
     virtual LLSettingsWaterPtr_t    buildWater(LLSD) const override;
-    virtual LLSettingsSkyPtr_t      getNamedSky(const std::string &) const override;
-    virtual LLSettingsWaterPtr_t    getNamedWater(const std::string &) const override;
 
 protected:
     LLSettingsVODay();
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index ce1e740425e0185fd28f5df6501efab9b6e06376..8153e41b45dff911f475d07eb9a412e4ca6c8c2d 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -8391,26 +8391,22 @@ class LLWorldEnvSettings : public view_listener_t
 
 		if (tod == "sunrise")
 		{
-            LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunrise");
-            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNRISE);
             LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
 		}
 		else if (tod == "noon")
 		{
-            LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midday");
-            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDDAY);
             LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
         }
 		else if (tod == "sunset")
 		{
-            LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Sunset");
-            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_SUNSET);
             LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
         }
 		else if (tod == "midnight")
 		{
-            LLSettingsSky::ptr_t psky = LLEnvironment::instance().findSkyByName("Midnight");
-            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, psky);
+            LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_LOCAL, LLEnvironment::KNOWN_SKY_MIDNIGHT);
             LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
         }
 		else
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 29915788f12b719d6414440f3f638569ae19d110..edd1f42d921e47320ec62f9d686e71f6e30dc0ff 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -862,6 +862,33 @@
         <menu_item_call.on_click
          function="Inventory.DoToSelected"
          parameter="take_off" />
+    </menu_item_call>
+    <menu_item_separator
+     layout="topleft" 
+     name="Settings Separator" />
+    <menu_item_call
+            name="Settings Apply Local"
+            layout="topleft"
+            label="Apply Only To Myself">
+        <menu_item_call.on_click 
+                function="Inventory.DoToSelected"
+                parameter="apply_settings_local" />
+    </menu_item_call>
+    <menu_item_call
+            name="Settings Apply Parcel"
+            layout="topleft"
+            label="Apply To Parcel">
+        <menu_item_call.on_click 
+                function="Inventory.DoToSelected"
+                parameter="apply_settings_parcel" />
+    </menu_item_call>
+    <menu_item_call
+            name="Settings Apply Region"
+            layout="topleft"
+            label="Apply To Region">
+        <menu_item_call.on_click 
+                function="Inventory.DoToSelected"
+                parameter="apply_settings_region" />
     </menu_item_call>
 	<menu_item_separator
 	 layout="topleft"
diff --git a/indra/newview/skins/default/xui/en/menu_save_settings.xml b/indra/newview/skins/default/xui/en/menu_save_settings.xml
index 0d52d9b16e60b37899a52dd3d8f96351c1ac8b82..a72b02c5931c0dd1f260af4680159bff23f9a53e 100644
--- a/indra/newview/skins/default/xui/en/menu_save_settings.xml
+++ b/indra/newview/skins/default/xui/en/menu_save_settings.xml
@@ -28,14 +28,14 @@
     </menu_item_call>
     <menu_item_call
             name="apply_parcel"
-            label="Apply Parcel">
+            label="Apply To Parcel">
         <menu_item_call.on_click 
                 function="FlyoutCombo.Button.Action"
                 userdata="parcel" />
     </menu_item_call>
     <menu_item_call
             name="apply_region"
-            label="Apply Region">
+            label="Apply To Region">
         <menu_item_call.on_click 
                 function="FlyoutCombo.Button.Action"
                 userdata="region" />
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 6aa6653f424f80e3b590b7ecc49499d4ca4eeb38..d7193c511f202e8be4ca07d201c9e68d29d61359 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -11104,4 +11104,13 @@ Cannot create large prims that intersect other players.  Please re-try when othe
      yestext="OK"/>
   </notification>
 
+  <notification
+   icon="notify.tga"
+   name="FailedToFindSettings"
+   persist="true"
+   type="alertmodal">
+Failed to find the settisgs named [DESC] in database.
+  <tag>fail</tag>
+  </notification>
+  
 </notifications>