summaryrefslogtreecommitdiff
path: root/indra/newview/llenvironment.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2019-01-30 14:36:46 -0800
committerRider Linden <rider@lindenlab.com>2019-01-30 14:36:46 -0800
commitc7e02b0835cbb50777c677f618c4a957e69fabee (patch)
tree54148a3075642a666dec0b606c43eedf8c4c75b3 /indra/newview/llenvironment.cpp
parent9246be072101e4e09f6ab2655eb78939242bac3f (diff)
SL-9925: Viewer now shows an error message if import from legacy windlight fails.
Diffstat (limited to 'indra/newview/llenvironment.cpp')
-rw-r--r--indra/newview/llenvironment.cpp48
1 files changed, 41 insertions, 7 deletions
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 9ac8bccb74..a397f0f27a 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -615,6 +615,25 @@ namespace
typedef LLSettingsInjected<LLSettingsVOSky> LLSettingsInjectedSky;
typedef LLSettingsInjected<LLSettingsVOWater> LLSettingsInjectedWater;
+
+#if 0
+ //=====================================================================
+ class DayInjection : public LLEnvironment::DayInstance
+ {
+ public:
+ typedef std::shared_ptr<DayInjection> ptr_t;
+
+ DayInjection(LLEnvironment::EnvSelection_t env) :
+ LLEnvironment::DayInstance(env)
+ {
+ }
+
+ virtual ~DayInjection() { };
+
+ protected:
+ private:
+ };
+#endif
}
//=========================================================================
@@ -1972,31 +1991,46 @@ LLEnvironment::EnvironmentInfo::ptr_t LLEnvironment::EnvironmentInfo::extractLeg
}
//=========================================================================
-LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::string filename)
+LLSettingsWater::ptr_t LLEnvironment::createWaterFromLegacyPreset(const std::string filename, LLSD &messages)
{
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
std::string path(gDirUtilp->getDirName(filename));
- LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPresetFile(name, path);
+ LLSettingsWater::ptr_t water = LLSettingsVOWater::buildFromLegacyPresetFile(name, path, messages);
+
+ if (!water)
+ {
+ messages["NAME"] = name;
+ messages["FILE"] = filename;
+ }
return water;
}
-LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string filename)
+LLSettingsSky::ptr_t LLEnvironment::createSkyFromLegacyPreset(const std::string filename, LLSD &messages)
{
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
std::string path(gDirUtilp->getDirName(filename));
- LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPresetFile(name, path);
+ LLSettingsSky::ptr_t sky = LLSettingsVOSky::buildFromLegacyPresetFile(name, path, messages);
+ if (!sky)
+ {
+ messages["NAME"] = name;
+ messages["FILE"] = filename;
+ }
return sky;
-
}
-LLSettingsDay::ptr_t LLEnvironment::createDayCycleFromLegacyPreset(const std::string filename)
+LLSettingsDay::ptr_t LLEnvironment::createDayCycleFromLegacyPreset(const std::string filename, LLSD &messages)
{
std::string name(gDirUtilp->getBaseFileName(LLURI::unescape(filename), true));
std::string path(gDirUtilp->getDirName(filename));
- LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPresetFile(name, path);
+ LLSettingsDay::ptr_t day = LLSettingsVODay::buildFromLegacyPresetFile(name, path, messages);
+ if (!day)
+ {
+ messages["NAME"] = name;
+ messages["FILE"] = filename;
+ }
return day;
}