diff options
author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
---|---|---|
committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2020-04-21 13:12:05 +0300 |
commit | a4b1c0330a6a8e43bf4c41c5b0c836bd1dee2268 (patch) | |
tree | 6d68d3e3f665d60fa946bd24a4b324b5e63339fb /indra/newview/llwldaycycle.cpp | |
parent | a8df6762ff88458916397b9707f6954b2714e14d (diff) | |
parent | d7f1c88c35849e56f5b352f13c16a08467d1533b (diff) |
Merge branch 'master' into DRTVWR-482
# Conflicts:
# indra/newview/app_settings/shaders/class1/objects/previewV.glsl
# indra/newview/lldynamictexture.cpp
# indra/newview/llfloatermodelpreview.cpp
Diffstat (limited to 'indra/newview/llwldaycycle.cpp')
-rw-r--r-- | indra/newview/llwldaycycle.cpp | 114 |
1 files changed, 58 insertions, 56 deletions
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp index 106f17f61b..0a331d1823 100644 --- a/indra/newview/llwldaycycle.cpp +++ b/indra/newview/llwldaycycle.cpp @@ -46,6 +46,7 @@ LLWLDayCycle::~LLWLDayCycle() void LLWLDayCycle::loadDayCycle(const LLSD& day_data, LLWLParamKey::EScope scope) { +#if 0 LL_DEBUGS() << "Loading day cycle (day_data.size() = " << day_data.size() << ", scope = " << scope << ")" << LL_ENDL; mTimeMap.clear(); @@ -88,6 +89,7 @@ void LLWLDayCycle::loadDayCycle(const LLSD& day_data, LLWLParamKey::EScope scope // then add the keyframe addKeyframe((F32)day_data[i][0].asReal(), frame); } +#endif } void LLWLDayCycle::loadDayCycleFromFile(const std::string & fileName) @@ -158,35 +160,35 @@ LLSD LLWLDayCycle::asLLSD() return day_data; } -bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const -{ - bool result = true; - LLWLParamManager& wl_mgr = LLWLParamManager::instance(); - - refs.clear(); - for (std::map<F32, LLWLParamKey>::const_iterator iter = mTimeMap.begin(); iter != mTimeMap.end(); ++iter) - { - const LLWLParamKey& key = iter->second; - if (!wl_mgr.getParamSet(key, refs[key])) - { - LL_WARNS() << "Cannot find sky [" << key.name << "] referenced by a day cycle" << LL_ENDL; - result = false; - } - } - - return result; -} +// bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const +// { +// bool result = true; +// LLWLParamManager& wl_mgr = LLWLParamManager::instance(); +// +// refs.clear(); +// for (std::map<F32, LLWLParamKey>::const_iterator iter = mTimeMap.begin(); iter != mTimeMap.end(); ++iter) +// { +// const LLWLParamKey& key = iter->second; +// if (!wl_mgr.getParamSet(key, refs[key])) +// { +// LL_WARNS() << "Cannot find sky [" << key.name << "] referenced by a day cycle" << LL_ENDL; +// result = false; +// } +// } +// +// return result; +// } bool LLWLDayCycle::getSkyMap(LLSD& sky_map) const { - std::map<LLWLParamKey, LLWLParamSet> refs; - - if (!getSkyRefs(refs)) - { - return false; - } - - sky_map = LLWLParamManager::createSkyMap(refs); +// std::map<LLWLParamKey, LLWLParamSet> refs; +// +// if (!getSkyRefs(refs)) +// { +// return false; +// } +// +// sky_map = LLWLParamManager::createSkyMap(refs); return true; } @@ -235,23 +237,23 @@ bool LLWLDayCycle::changeKeyframeTime(F32 oldTime, F32 newTime) return addKeyframe(newTime, frame); } -bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key) -{ - LL_DEBUGS() << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; - - // just remove and add back - // make sure param exists - LLWLParamSet tmp; - bool stat = LLWLParamManager::getInstance()->getParamSet(key, tmp); - if(stat == false) - { - LL_DEBUGS() << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; - return stat; - } - - mTimeMap[time] = key; - return true; -} +// bool LLWLDayCycle::changeKeyframeParam(F32 time, LLWLParamKey key) +// { +// LL_DEBUGS() << "Changing key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; +// +// // just remove and add back +// // make sure param exists +// LLWLParamSet tmp; +// bool stat = LLWLParamManager::getInstance()->getParamSet(key, tmp); +// if(stat == false) +// { +// LL_DEBUGS() << "Failed to change key frame param (" << time << ", " << key.toLLSD() << ")" << LL_ENDL; +// return stat; +// } +// +// mTimeMap[time] = key; +// return true; +// } bool LLWLDayCycle::removeKeyframe(F32 time) @@ -285,19 +287,19 @@ bool LLWLDayCycle::getKeytime(LLWLParamKey frame, F32& key_time) const return false; } -bool LLWLDayCycle::getKeyedParam(F32 time, LLWLParamSet& param) -{ - // just scroll on through till you find it - std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time); - if(mIt != mTimeMap.end()) - { - return LLWLParamManager::getInstance()->getParamSet(mIt->second, param); - } - - // return error if not found - LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL; - return false; -} +// bool LLWLDayCycle::getKeyedParam(F32 time, LLWLParamSet& param) +// { +// // just scroll on through till you find it +// std::map<F32, LLWLParamKey>::iterator mIt = mTimeMap.find(time); +// if(mIt != mTimeMap.end()) +// { +// return LLWLParamManager::getInstance()->getParamSet(mIt->second, param); +// } +// +// // return error if not found +// LL_DEBUGS() << "Key " << time << " not found" << LL_ENDL; +// return false; +// } bool LLWLDayCycle::getKeyedParamName(F32 time, std::string & name) { |