diff options
author | Rider Linden <rider@lindenlab.com> | 2018-08-15 13:37:54 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2018-08-15 13:37:54 -0700 |
commit | d4aa55eade93a451149f906fe9187235306e8343 (patch) | |
tree | 88a726175a8de7efb4d7d3e6e006c75b458a003f /indra/newview/llsettingsvo.cpp | |
parent | eadf0b910174274e7c83fe37e417f576a7350edb (diff) | |
parent | f028ddd0754d5a2fd2f2300aa02eff4fe6cfa96f (diff) |
Merge
Diffstat (limited to 'indra/newview/llsettingsvo.cpp')
-rw-r--r-- | indra/newview/llsettingsvo.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp index a9e801a2e1..55b4b88c7d 100644 --- a/indra/newview/llsettingsvo.cpp +++ b/indra/newview/llsettingsvo.cpp @@ -1131,6 +1131,30 @@ LLSettingsDay::ptr_t LLSettingsVODay::buildClone() return dayp; } +LLSettingsDay::ptr_t LLSettingsVODay::buildDeepCloneAndUncompress() +{ + // no need for SETTING_TRACKS or SETTING_FRAMES, so take base LLSD + LLSD settings = llsd_clone(mSettings); + + LLSettingsDay::ptr_t day_clone = std::make_shared<LLSettingsVODay>(settings); + + for (S32 i = 0; i < LLSettingsDay::TRACK_MAX; ++i) + { + LLSettingsDay::CycleTrack_t track = getCycleTrack(i); + LLSettingsDay::CycleTrack_t::iterator iter = track.begin(); + while (iter != track.end()) + { + // 'Unpack', usually for editing + // - frames 'share' settings multiple times + // - settings can reuse LLSDs they were initialized from + // We do not want for edited frame to change multiple frames in same track, so do a clone + day_clone->setSettingsAtKeyframe(iter->second->buildDerivedClone(), iter->first, i); + iter++; + } + } + return day_clone; +} + LLSD LLSettingsVODay::convertToLegacy(const LLSettingsVODay::ptr_t &pday) { CycleTrack_t &trackwater = pday->getCycleTrack(TRACK_WATER); |