summaryrefslogtreecommitdiff
path: root/indra/newview/llwldaycycle.cpp
diff options
context:
space:
mode:
authorVadim ProductEngine <vsavchuk@productengine.com>2011-05-31 22:36:26 +0300
committerVadim ProductEngine <vsavchuk@productengine.com>2011-05-31 22:36:26 +0300
commit778088b74c19773646a50b5c0aa40015f2b242f3 (patch)
tree7a6f66cbd2ce7a79d5fc3bc76f2ee60df72f502a /indra/newview/llwldaycycle.cpp
parenta079ac98c702bcb9de9860cd33c440941fb04a2a (diff)
STORM-1253 WIP Implemented editing region day cycle.
Diffstat (limited to 'indra/newview/llwldaycycle.cpp')
-rw-r--r--indra/newview/llwldaycycle.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/indra/newview/llwldaycycle.cpp b/indra/newview/llwldaycycle.cpp
index 8dca9c5ecb..ca5b65f0da 100644
--- a/indra/newview/llwldaycycle.cpp
+++ b/indra/newview/llwldaycycle.cpp
@@ -158,15 +158,15 @@ LLSD LLWLDayCycle::asLLSD()
return day_data;
}
-bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs)
+bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs) const
{
bool result = true;
LLWLParamManager& wl_mgr = LLWLParamManager::instance();
refs.clear();
- for (std::map<F32, LLWLParamKey>::iterator iter = mTimeMap.begin(); iter != mTimeMap.end(); ++iter)
+ for (std::map<F32, LLWLParamKey>::const_iterator iter = mTimeMap.begin(); iter != mTimeMap.end(); ++iter)
{
- LLWLParamKey& key = iter->second;
+ const LLWLParamKey& key = iter->second;
if (!wl_mgr.getParamSet(key, refs[key]))
{
llwarns << "Cannot find sky [" << key.name << "] referenced by a day cycle" << llendl;
@@ -177,6 +177,19 @@ bool LLWLDayCycle::getSkyRefs(std::map<LLWLParamKey, LLWLParamSet>& refs)
return result;
}
+bool LLWLDayCycle::getSkyMap(LLSD& sky_map) const
+{
+ std::map<LLWLParamKey, LLWLParamSet> refs;
+
+ if (!getSkyRefs(refs))
+ {
+ return false;
+ }
+
+ sky_map = LLWLParamManager::createSkyMap(refs);
+ return true;
+}
+
void LLWLDayCycle::clearKeyframes()
{
lldebugs << "Clearing key frames" << llendl;