From 964a472461bed91b3efa383aaea34d425b96111d Mon Sep 17 00:00:00 2001
From: Graham Linden <graham@lindenlab.com>
Date: Wed, 29 Aug 2018 21:13:09 +0100
Subject: Hook up sky density panel to fixedenv and edit_ext_daycycle UI.

Fix retrieving LLSD for density configs (element not array) in density UI.

Tweak layout of sky density controls.
---
 indra/llinventory/llsettingssky.cpp | 29 +++++++++++++++++++++++++----
 indra/llinventory/llsettingssky.h   |  9 ++++++++-
 2 files changed, 33 insertions(+), 5 deletions(-)

(limited to 'indra/llinventory')

diff --git a/indra/llinventory/llsettingssky.cpp b/indra/llinventory/llsettingssky.cpp
index 0d789590fa..5f55018387 100644
--- a/indra/llinventory/llsettingssky.cpp
+++ b/indra/llinventory/llsettingssky.cpp
@@ -1161,20 +1161,41 @@ F32 LLSettingsSky::getMieAnisotropy() const
 {
     return mSettings[SETTING_MIE_ANISOTROPY_FACTOR].asReal();
 }
-    
+ 
+LLSD LLSettingsSky::getRayleighConfig() const
+{
+    LLSD copy = *(mSettings[SETTING_RAYLEIGH_CONFIG].beginArray());
+    return copy;
+}
+
+LLSD LLSettingsSky::getMieConfig() const
+{
+    LLSD copy = *(mSettings[SETTING_MIE_CONFIG].beginArray());
+    return copy;
+}
+
+LLSD LLSettingsSky::getAbsorptionConfig() const
+{
+    LLSD copy = *(mSettings[SETTING_ABSORPTION_CONFIG].beginArray());
+    return copy;
+}
+   
 LLSD LLSettingsSky::getRayleighConfigs() const
 {
-    return mSettings[SETTING_RAYLEIGH_CONFIG];
+    LLSD copy = *(mSettings[SETTING_RAYLEIGH_CONFIG].beginArray());
+    return copy;
 }
 
 LLSD LLSettingsSky::getMieConfigs() const
 {
-    return mSettings[SETTING_MIE_CONFIG];
+    LLSD copy = *(mSettings[SETTING_MIE_CONFIG].beginArray());
+    return copy;
 }
 
 LLSD LLSettingsSky::getAbsorptionConfigs() const
 {
-    return mSettings[SETTING_ABSORPTION_CONFIG];
+    LLSD copy = *(mSettings[SETTING_ABSORPTION_CONFIG].beginArray());
+    return copy;
 }
 
 void LLSettingsSky::setRayleighConfigs(const LLSD& rayleighConfig)
diff --git a/indra/llinventory/llsettingssky.h b/indra/llinventory/llsettingssky.h
index 8030bfeb39..a4ea8c98f4 100644
--- a/indra/llinventory/llsettingssky.h
+++ b/indra/llinventory/llsettingssky.h
@@ -116,10 +116,17 @@ public:
     F32 getSkyTopRadius() const;
     F32 getSunArcRadians() const;
     F32 getMieAnisotropy() const;   
+
+    // Return first (only) profile layer represented in LLSD
+    LLSD getRayleighConfig() const;
+    LLSD getMieConfig() const;
+    LLSD getAbsorptionConfig() const;
+
+    // Return entire LLSDArray of profile layers represented in LLSD
     LLSD getRayleighConfigs() const;
     LLSD getMieConfigs() const;
-
     LLSD getAbsorptionConfigs() const;
+
     LLUUID getBloomTextureId() const;
 
     void setRayleighConfigs(const LLSD& rayleighConfig);
-- 
cgit v1.2.3