summaryrefslogtreecommitdiff
path: root/indra/newview/llsettingsvo.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-08-15 13:35:53 -0700
committerRider Linden <rider@lindenlab.com>2018-08-15 13:35:53 -0700
commiteadf0b910174274e7c83fe37e417f576a7350edb (patch)
tree1560b09670fba4b867026f0ac7d087dacb1946b2 /indra/newview/llsettingsvo.cpp
parent30ef616af5cfbb552458e88acd9f803aa076a08b (diff)
MAINT-8990, MAINT-9002: First pass rework on environment panels, region/parcel
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r--indra/newview/llsettingsvo.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index 80797ae21c..a9e801a2e1 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -273,6 +273,7 @@ void LLSettingsVOBase::onAssetDownloadComplete(LLVFS *vfs, const LLUUID &asset_i
}
else
{
+ LL_WARNS("LAPRAS") << "Setting asset ID to " << asset_id << LL_ENDL;
settings->setAssetId(asset_id);
}
}
@@ -1074,6 +1075,44 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildFromEnvironmentMessage(LLSD settings)
}
+void LLSettingsVODay::buildFromOtherSetting(LLSettingsBase::ptr_t settings, LLSettingsVODay::asset_built_fn cb)
+{
+ if (settings->getSettingsType() == "daycycle")
+ {
+ if (cb)
+ cb(std::static_pointer_cast<LLSettingsDay>(settings));
+ }
+ else
+ {
+ LLSettingsVOBase::getSettingsAsset(LLSettingsDay::GetDefaultAssetId(),
+ [settings, cb](LLUUID, LLSettingsBase::ptr_t pday, S32, LLExtStat){ combineIntoDayCycle(std::static_pointer_cast<LLSettingsDay>(pday), settings, cb); });
+ }
+}
+
+void LLSettingsVODay::combineIntoDayCycle(LLSettingsDay::ptr_t pday, LLSettingsBase::ptr_t settings, asset_built_fn cb)
+{
+ if (settings->getSettingsType() == "sky")
+ {
+ pday->setName("sky: " + settings->getName());
+ pday->clearCycleTrack(1);
+ pday->setSettingsAtKeyframe(settings, 0.0, 1);
+ }
+ else if (settings->getSettingsType() == "water")
+ {
+ pday->setName("water: " + settings->getName());
+ pday->clearCycleTrack(0);
+ pday->setSettingsAtKeyframe(settings, 0.0, 0);
+ }
+ else
+ {
+ pday.reset();
+ }
+
+ if (cb)
+ cb(pday);
+}
+
+
LLSettingsDay::ptr_t LLSettingsVODay::buildClone()
{
LLSD settings = cloneSettings();