summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatereditsky.cpp
diff options
context:
space:
mode:
authorGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-28 21:46:30 +0000
committerGraham Linden graham@lindenlab.com <Graham Linden graham@lindenlab.com>2018-02-28 21:46:30 +0000
commit72270213f5eebd019b10bdd6ec15020ba3d2ecf5 (patch)
treebe92c250563eedb720940b32cf42e328a49ea6b6 /indra/newview/llfloatereditsky.cpp
parent31017934581437836e847d8fcb5a76489f3baf50 (diff)
Add 3p package for adv atmospherics to autobuild.
Mark legacy atmospherics code with ifdefs. Fix up legacy uplift to include new atmospherics settings.
Diffstat (limited to 'indra/newview/llfloatereditsky.cpp')
-rw-r--r--indra/newview/llfloatereditsky.cpp41
1 files changed, 20 insertions, 21 deletions
diff --git a/indra/newview/llfloatereditsky.cpp b/indra/newview/llfloatereditsky.cpp
index 1574e73caa..c2b7bb17da 100644
--- a/indra/newview/llfloatereditsky.cpp
+++ b/indra/newview/llfloatereditsky.cpp
@@ -152,20 +152,21 @@ void LLFloaterEditSky::initCallbacks(void)
LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditSky::onRegionInfoUpdate, this));
//-------------------------------------------------------------------------
+#if SUPPORT_LEGACY_ATMOSPHERICS
+ // ambient
+ getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient));
- // blue horizon
+ // blue horizon/density
getChild<LLUICtrl>("WLBlueHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueHorizon));
+ getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueDensity));
// haze density, horizon, mult, and altitude
getChild<LLUICtrl>("WLHazeDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeDensity));
getChild<LLUICtrl>("WLHazeHorizon")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mHazeHorizon));
getChild<LLUICtrl>("WLDensityMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDensityMult));
+ getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult));
getChild<LLUICtrl>("WLMaxAltitude")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mMaxAlt));
-
- // blue density
- getChild<LLUICtrl>("WLBlueDensity")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mBlueDensity));
-
- // Lighting
+#endif
// sunlight
getChild<LLUICtrl>("WLSunlight")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mSunlight));
@@ -174,9 +175,6 @@ void LLFloaterEditSky::initCallbacks(void)
getChild<LLUICtrl>("WLGlowR")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowRMoved, this, _1, &mSkyAdapter->mGlow));
getChild<LLUICtrl>("WLGlowB")->setCommitCallback(boost::bind(&LLFloaterEditSky::onGlowBMoved, this, _1, &mSkyAdapter->mGlow));
- // ambient
- getChild<LLUICtrl>("WLAmbient")->setCommitCallback(boost::bind(&LLFloaterEditSky::onColorControlMoved, this, _1, &mSkyAdapter->mAmbient));
-
// time of day
// getChild<LLUICtrl>("WLSunPos")->setCommitCallback(boost::bind(&LLFloaterEditSky::onSunMoved, this, _1, &mSkyAdapter->mLightnorm)); // multi-slider
// getChild<LLTimeCtrl>("WLDayTime")->setCommitCallback(boost::bind(&LLFloaterEditSky::onTimeChanged, this)); // time ctrl
@@ -204,7 +202,7 @@ void LLFloaterEditSky::initCallbacks(void)
getChild<LLUICtrl>("WLCloudScale")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mCloudScale));
getChild<LLUICtrl>("WLCloudScrollX")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollXMoved, this, _1));
getChild<LLUICtrl>("WLCloudScrollY")->setCommitCallback(boost::bind(&LLFloaterEditSky::onCloudScrollYMoved, this, _1));
- getChild<LLUICtrl>("WLDistanceMult")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mDistanceMult));
+
// Dome
getChild<LLUICtrl>("WLGamma")->setCommitCallback(boost::bind(&LLFloaterEditSky::onFloatControlMoved, this, _1, &mSkyAdapter->mWLGamma));
@@ -223,9 +221,16 @@ void LLFloaterEditSky::syncControls()
mSkyPresetNameEditor->setText(name);
mSkyPresetCombo->setValue(name);
- // blue horizon
+#if SUPPORT_LEGACY_ATMOSPHERICS
+ // ambient
+ mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() );
+ setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
+
+ // blue horizon / density
mSkyAdapter->mBlueHorizon.setColor3( psky->getBlueHorizon() );
setColorSwatch("WLBlueHorizon", mSkyAdapter->mBlueHorizon, WL_BLUE_HORIZON_DENSITY_SCALE);
+ mSkyAdapter->mBlueDensity.setColor3( psky->getBlueDensity() );
+ setColorSwatch("WLBlueDensity", mSkyAdapter->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
// haze density, horizon, mult, and altitude
mSkyAdapter->mHazeDensity = psky->getHazeDensity();
@@ -235,11 +240,10 @@ void LLFloaterEditSky::syncControls()
mSkyAdapter->mDensityMult = psky->getDensityMultiplier();
childSetValue("WLDensityMult", ((F32) mSkyAdapter->mDensityMult) * mSkyAdapter->mDensityMult.getMult());
mSkyAdapter->mMaxAlt = psky->getMaxY();
+ mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier();
+ childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult);
childSetValue("WLMaxAltitude", (F32) mSkyAdapter->mMaxAlt);
-
- // blue density
- mSkyAdapter->mBlueDensity.setColor3( psky->getBlueDensity() );
- setColorSwatch("WLBlueDensity", mSkyAdapter->mBlueDensity, WL_BLUE_HORIZON_DENSITY_SCALE);
+#endif
// Lighting
@@ -252,9 +256,7 @@ void LLFloaterEditSky::syncControls()
childSetValue("WLGlowR", 2 - mSkyAdapter->mGlow.getRed() / 20.0f);
childSetValue("WLGlowB", -mSkyAdapter->mGlow.getBlue() / 5.0f);
- // ambient
- mSkyAdapter->mAmbient.setColor3( psky->getAmbientColor() );
- setColorSwatch("WLAmbient", mSkyAdapter->mAmbient, WL_SUN_AMBIENT_SLIDER_SCALE);
+
// LLSettingsSky::azimalt_t azal = psky->getSunRotationAzAl();
//
@@ -304,9 +306,6 @@ void LLFloaterEditSky::syncControls()
childSetValue("WLCloudScrollX", scroll_rate[0] - 10.0f);
childSetValue("WLCloudScrollY", scroll_rate[1] - 10.0f);
- mSkyAdapter->mDistanceMult = psky->getDistanceMultiplier();
- childSetValue("WLDistanceMult", (F32) mSkyAdapter->mDistanceMult);
-
// Tweak extras
mSkyAdapter->mWLGamma = psky->getGamma();