summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-10-01 16:12:48 -0700
committerRider Linden <rider@lindenlab.com>2018-10-01 16:12:48 -0700
commitfdfb60ecb10a35efdc378ae507e1c65114a987a3 (patch)
tree05a183987a0fb2464855df1b193b7bb035c61745 /indra
parent6e7d794b01673c138a50859c0e513732cb89fc8b (diff)
parent1d94f7e9ebd663853c81d60aec796accadf43c70 (diff)
Merge
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/CMakeLists.txt1
-rw-r--r--indra/newview/lldrawpoolwater.cpp40
-rw-r--r--indra/newview/lldrawpoolwlsky.cpp30
-rw-r--r--indra/newview/llenvironment.cpp46
-rw-r--r--indra/newview/llenvironment.h37
-rw-r--r--indra/newview/llfloatereditdaycycle.cpp873
-rw-r--r--indra/newview/llfloatereditdaycycle.h135
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp8
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp8
-rw-r--r--indra/newview/llstartup.cpp1
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml485
12 files changed, 24 insertions, 1642 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e80bb5f4a5..7727dc4f95 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -223,7 +223,6 @@ set(viewer_SOURCE_FILES
llfloaterconversationpreview.cpp
llfloaterdeleteprefpreset.cpp
llfloaterdestinations.cpp
- llfloatereditdaycycle.cpp
llfloatereditextdaycycle.cpp
llfloaterevent.cpp
llfloaterexperiencepicker.cpp
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 7a25e62651..9eb61a1a1f 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -695,43 +695,19 @@ void LLDrawPoolWater::shade()
water_color.mV[3] = 0.9f;
}
- {
- LLGLEnable depth_clamp(gGLManager.mHasDepthClamp ? GL_DEPTH_CLAMP : 0);
+ {
LLGLDisable cullface(GL_CULL_FACE);
- for (std::vector<LLFace*>::iterator iter = mDrawFace.begin();
- iter != mDrawFace.end(); iter++)
- {
- LLFace *face = *iter;
- if (voskyp->isReflFace(face))
- {
- continue;
- }
+ sNeedsReflectionUpdate = TRUE;
+ sNeedsDistortionUpdate = TRUE;
- LLVOWater* water = (LLVOWater*) face->getViewerObject();
+ for (std::vector<LLFace*>::iterator iter = mDrawFace.begin(); iter != mDrawFace.end(); iter++)
+ {
+ LLFace *face = *iter;
gGL.getTexUnit(diffTex)->bind(face->getTexture());
-
- sNeedsReflectionUpdate = TRUE;
-
- if (water->getUseTexture() || !water->getIsEdgePatch())
- {
- sNeedsDistortionUpdate = TRUE;
- face->renderIndexed();
- }
- // using squash clip for deferred rendering makes the horizon lines match
- // between ALM and non-ALM rendering (SL-1655), but introduces an ugly seem between
- // near and far water(SL-9696)...we're going to live with the former and not cause the latter
- else if (gGLManager.mHasDepthClamp || deferred_render)
- {
- face->renderIndexed();
- }
- else
- {
- LLGLSquashToFarClip far_clip(get_current_projection());
- face->renderIndexed();
- }
+ face->renderIndexed();
}
- }
+ }
shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
shader->disableTexture(LLShaderMgr::WATER_SCREENTEX);
diff --git a/indra/newview/lldrawpoolwlsky.cpp b/indra/newview/lldrawpoolwlsky.cpp
index 455df837a9..a796052635 100644
--- a/indra/newview/lldrawpoolwlsky.cpp
+++ b/indra/newview/lldrawpoolwlsky.cpp
@@ -132,6 +132,7 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca
{
llassert_always(NULL != shader);
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.pushMatrix();
//chop off translation
@@ -158,6 +159,7 @@ void LLDrawPoolWLSky::renderDome(const LLVector3& camPosLocal, F32 camHeightLoca
gSky.mVOWLSkyp->drawDome();
+ gGL.matrixMode(LLRender::MM_MODELVIEW);
gGL.popMatrix();
}
@@ -191,6 +193,7 @@ void LLDrawPoolWLSky::renderSkyHazeDeferred(const LLVector3& camPosLocal, F32 ca
sky_shader->uniform3f(sCamPosLocal, camPosLocal.mV[0], camPosLocal.mV[1], camPosLocal.mV[2]);
+ LLGLDisable cull(GL_CULL_FACE);
renderFsSky(camPosLocal, camHeightLocal, sky_shader);
sky_shader->unbind();
@@ -565,28 +568,23 @@ void LLDrawPoolWLSky::render(S32 pass)
LLVector3 const & origin = LLViewerCamera::getInstance()->getOrigin();
renderSkyHaze(origin, camHeightLocal);
-
- bool use_advanced = gPipeline.useAdvancedAtmospherics();
- if (!use_advanced)
- {
- gGL.pushMatrix();
+ gGL.pushMatrix();
- // MAINT-9006 keep sun position consistent between ALM and non-ALM rendering
- //gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
+ // MAINT-9006 keep sun position consistent between ALM and non-ALM rendering
+ //gGL.translatef(origin.mV[0], origin.mV[1], origin.mV[2]);
- // *NOTE: have to bind a texture here since register combiners blending in
- // renderStars() requires something to be bound and we might as well only
- // bind the moon's texture once.
- gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
- gGL.getTexUnit(1)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP));
+ // *NOTE: have to bind a texture here since register combiners blending in
+ // renderStars() requires something to be bound and we might as well only
+ // bind the moon's texture once.
+ gGL.getTexUnit(0)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture());
+ gGL.getTexUnit(1)->bind(gSky.mVOSkyp->mFace[LLVOSky::FACE_MOON]->getTexture(LLRender::ALTERNATE_DIFFUSE_MAP));
- renderHeavenlyBodies();
+ renderHeavenlyBodies();
- renderStars();
+ renderStars();
- gGL.popMatrix();
- }
+ gGL.popMatrix();
renderSkyClouds(origin, camHeightLocal);
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index d8bac46151..61b5e7f576 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -277,7 +277,6 @@ LLEnvironment::LLEnvironment():
mSelectedSky(),
mSelectedWater(),
mSelectedDay(),
- mUserPrefs(),
mSelectedEnvironment(LLEnvironment::ENV_LOCAL),
mCurrentTrack(1)
{
@@ -309,16 +308,6 @@ LLEnvironment::~LLEnvironment()
{
}
-void LLEnvironment::loadPreferences()
-{
- mUserPrefs.load();
-}
-
-void LLEnvironment::updatePreferences()
-{
- /*NOOP for now. TODO record prefs and store.*/
-}
-
bool LLEnvironment::canEdit() const
{
return true;
@@ -1393,41 +1382,6 @@ void LLEnvironment::coroResetEnvironment(S32 parcel_id, S32 track_no, environmen
//=========================================================================
-LLEnvironment::UserPrefs::UserPrefs() :
- mUseRegionSettings(true),
- mUseDayCycle(true),
- mPersistEnvironment(false),
- mWaterPresetName(),
- mSkyPresetName(),
- mDayCycleName()
-{}
-
-
-void LLEnvironment::UserPrefs::load()
-{
- mPersistEnvironment = gSavedSettings.getBOOL("EnvironmentPersistAcrossLogin");
-
- mWaterPresetName = gSavedSettings.getString("WaterPresetName");
- mSkyPresetName = gSavedSettings.getString("SkyPresetName");
- mDayCycleName = gSavedSettings.getString("DayCycleName");
-
- mUseRegionSettings = mPersistEnvironment ? gSavedSettings.getBOOL("UseEnvironmentFromRegion") : true;
- mUseDayCycle = mPersistEnvironment ? gSavedSettings.getBOOL("UseDayCycle") : true;
-}
-
-void LLEnvironment::UserPrefs::store()
-{
- gSavedSettings.setBOOL("EnvironmentPersistAcrossLogin", mPersistEnvironment);
- if (mPersistEnvironment)
- {
- gSavedSettings.setString("WaterPresetName", getWaterPresetName());
- gSavedSettings.setString("SkyPresetName", getSkyPresetName());
- gSavedSettings.setString("DayCycleName", getDayCycleName());
-
- gSavedSettings.setBOOL("UseEnvironmentFromRegion", getUseRegionSettings());
- gSavedSettings.setBOOL("UseDayCycle", getUseDayCycle());
- }
-}
LLEnvironment::EnvironmentInfo::EnvironmentInfo():
mParcelId(INVALID_PARCEL_ID),
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index a605f791a5..65c4748d02 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -103,37 +103,6 @@ public:
typedef boost::signals2::connection connection_t;
- class UserPrefs
- {
- friend class LLEnvironment;
- public:
- UserPrefs();
-
- bool getUseRegionSettings() const { return mUseRegionSettings; }
- bool getUseDayCycle() const { return mUseDayCycle; }
- bool getUseFixedSky() const { return !getUseDayCycle(); }
-
- std::string getWaterPresetName() const { return mWaterPresetName; }
- std::string getSkyPresetName() const { return mSkyPresetName; }
- std::string getDayCycleName() const { return mDayCycleName; }
-
- void setUseRegionSettings(bool val);
- void setUseWaterPreset(const std::string& name);
- void setUseSkyPreset(const std::string& name);
- void setUseDayCycle(const std::string& name);
-
- private:
- void load();
- void store();
-
- bool mUseRegionSettings;
- bool mUseDayCycle;
- bool mPersistEnvironment;
- std::string mWaterPresetName;
- std::string mSkyPresetName;
- std::string mDayCycleName;
- };
-
typedef std::pair<LLSettingsSky::ptr_t, LLSettingsWater::ptr_t> fixedEnvironment_t;
typedef std::function<void(S32, EnvironmentInfo::ptr_t)> environment_apply_fn;
typedef boost::signals2::signal<void(EnvSelection_t)> env_changed_signal_t;
@@ -143,10 +112,6 @@ public:
virtual ~LLEnvironment();
- void loadPreferences();
- void updatePreferences();
- const UserPrefs & getPreferences() const { return mUserPrefs; }
-
bool canEdit() const;
bool isExtendedEnvironmentEnabled() const;
bool isInventoryEnabled() const;
@@ -350,8 +315,6 @@ private:
env_changed_signal_t mSignalEnvChanged;
- UserPrefs mUserPrefs;
-
S32 mCurrentTrack;
altitude_list_t mTrackAltitudes;
diff --git a/indra/newview/llfloatereditdaycycle.cpp b/indra/newview/llfloatereditdaycycle.cpp
deleted file mode 100644
index 4ddedbf7df..0000000000
--- a/indra/newview/llfloatereditdaycycle.cpp
+++ /dev/null
@@ -1,873 +0,0 @@
-/**
- * @file llfloatereditdaycycle.cpp
- * @brief Floater to create or edit a day cycle
- *
- * $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#include "llviewerprecompiledheaders.h"
-
-#include "llfloatereditdaycycle.h"
-
-// libs
-#include "llbutton.h"
-#include "llcheckboxctrl.h"
-#include "llcombobox.h"
-#include "llloadingindicator.h"
-#include "llmultisliderctrl.h"
-#include "llnotifications.h"
-#include "llnotificationsutil.h"
-#include "llspinctrl.h"
-#include "lltimectrl.h"
-
-// newview
-#include "llagent.h"
-#include "llregioninfomodel.h"
-#include "llviewerregion.h"
-
-#include "llenvironment.h"
-#include "lltrans.h"
-
-const F32 LLFloaterEditDayCycle::sHoursPerDay = 24.0f;
-
-LLFloaterEditDayCycle::LLFloaterEditDayCycle(const LLSD &key)
-: LLFloater(key)
-, mDayCycleNameEditor(NULL)
-, mDayCyclesCombo(NULL)
-, mTimeSlider(NULL)
-, mKeysSlider(NULL)
-, mSkyPresetsCombo(NULL)
-, mTimeCtrl(NULL)
-, mMakeDefaultCheckBox(NULL)
-, mSaveButton(NULL)
-{
-}
-
-// virtual
-BOOL LLFloaterEditDayCycle::postBuild()
-{
- mDayCycleNameEditor = getChild<LLLineEditor>("day_cycle_name");
- mDayCyclesCombo = getChild<LLComboBox>("day_cycle_combo");
-
- mTimeSlider = getChild<LLMultiSliderCtrl>("WLTimeSlider");
- mKeysSlider = getChild<LLMultiSliderCtrl>("WLDayCycleKeys");
- mSkyPresetsCombo = getChild<LLComboBox>("WLSkyPresets");
- mTimeCtrl = getChild<LLTimeCtrl>("time");
- mSaveButton = getChild<LLButton>("save");
- mMakeDefaultCheckBox = getChild<LLCheckBoxCtrl>("make_default_cb");
-
- initCallbacks();
-
- // add the time slider
- mTimeSlider->addSlider();
-
- return TRUE;
-}
-
-// virtual
-void LLFloaterEditDayCycle::onOpen(const LLSD& key)
-{
- bool new_day = isNewDay();
- std::string param = key.asString();
- std::string floater_title = getString(std::string("title_") + param);
- std::string hint = getString(std::string("hint_" + param));
-
- // Update floater title.
- setTitle(floater_title);
-
- // Update the hint at the top.
- getChild<LLUICtrl>("hint")->setValue(hint);
-
- // Hide the hint to the right of the combo if we're invoked to create a new preset.
- getChildView("note")->setVisible(!new_day);
-
- // Switch between the day cycle presets combobox and day cycle name input field.
- mDayCyclesCombo->setVisible(!new_day);
- mDayCycleNameEditor->setVisible(new_day);
-
- // TODO: Make sure only one instance of the floater exists?
-
- reset();
-}
-
-// virtual
-void LLFloaterEditDayCycle::onClose(bool app_quitting)
-{
- if (!app_quitting) // there's no point to change environment if we're quitting
- {
- LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_EDIT);
- LLEnvironment::instance().updateEnvironment();
- }
-}
-
-// virtual
-void LLFloaterEditDayCycle::draw()
-{
- syncTimeSlider();
- LLFloater::draw();
-}
-
-void LLFloaterEditDayCycle::initCallbacks(void)
-{
-#if 0
- mDayCycleNameEditor->setKeystrokeCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleNameEdited, this), NULL);
- mDayCyclesCombo->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleSelected, this));
- mDayCyclesCombo->setTextEntryCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleNameEdited, this));
- mTimeSlider->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onTimeSliderMoved, this));
- mKeysSlider->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyTimeMoved, this));
- mTimeCtrl->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyTimeChanged, this));
- mSkyPresetsCombo->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onKeyPresetChanged, this));
-
- getChild<LLButton>("WLAddKey")->setClickedCallback(boost::bind(&LLFloaterEditDayCycle::onAddKey, this));
- getChild<LLButton>("WLDeleteKey")->setClickedCallback(boost::bind(&LLFloaterEditDayCycle::onDeleteKey, this));
-
- mSaveButton->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onBtnSave, this));
- mSaveButton->setRightMouseDownCallback(boost::bind(&LLFloaterEditDayCycle::dumpTrack, this));
- getChild<LLButton>("cancel")->setCommitCallback(boost::bind(&LLFloaterEditDayCycle::onBtnCancel, this));
-
- // Connect to env manager events.
- LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
- env_mgr.setRegionSettingsChangeCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsChange, this));
- gAgent.addRegionChangedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionChange, this));
- env_mgr.setRegionSettingsAppliedCallback(boost::bind(&LLFloaterEditDayCycle::onRegionSettingsApplied, this, _1));
- // Connect to day cycle manager events.
- LLDayCycleManager::instance().setModifyCallback(boost::bind(&LLFloaterEditDayCycle::onDayCycleListChange, this));
-
- // Connect to sky preset list changes.
- LLWLParamManager::instance().setPresetListChangeCallback(boost::bind(&LLFloaterEditDayCycle::onSkyPresetListChange, this));
-
-
- // Connect to region info updates.
- LLRegionInfoModel::instance().setUpdateCallback(boost::bind(&LLFloaterEditDayCycle::onRegionInfoUpdate, this));
-#endif
-}
-
-void LLFloaterEditDayCycle::syncTimeSlider()
-{
-#if 0
- // set time
- mTimeSlider->setCurSliderValue((F32)LLWLParamManager::getInstance()->mAnimator.getDayTime() * sHoursPerDay);
-#endif
-}
-
-void LLFloaterEditDayCycle::loadTrack()
-{
-// // clear the slider
-// mKeysSlider->clear();
-// mSliderToKey.clear();
-//
-// // add sliders
-//
-// LL_DEBUGS() << "Adding " << LLWLParamManager::getInstance()->mDay.mTimeMap.size() << " keys to slider" << LL_ENDL;
-//
-// LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay;
-// for (std::map<F32, LLWLParamKey>::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it)
-// {
-// addSliderKey(it->first * sHoursPerDay, it->second);
-// }
-//
-// // set drop-down menu to match preset of currently-selected keyframe (one is automatically selected initially)
-// const std::string& cur_sldr = mKeysSlider->getCurSlider();
-// if (strlen(cur_sldr.c_str()) > 0) // only do this if there is a curSldr, otherwise we put an invalid entry into the map
-// {
-// mSkyPresetsCombo->selectByValue(mSliderToKey[cur_sldr].keyframe.toStringVal());
-// }
-//
-// syncTimeSlider();
-}
-
-void LLFloaterEditDayCycle::applyTrack()
-{
-#if 0
- LL_DEBUGS() << "Applying track (" << mSliderToKey.size() << ")" << LL_ENDL;
-
- // if no keys, do nothing
- if (mSliderToKey.size() == 0)
- {
- LL_DEBUGS() << "No keys, not syncing" << LL_ENDL;
- return;
- }
-
- llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
-
- // create a new animation track
- LLWLParamManager::getInstance()->mDay.clearKeyframes();
-
- // add the keys one by one
- for (std::map<std::string, SliderKey>::iterator it = mSliderToKey.begin();
- it != mSliderToKey.end(); ++it)
- {
- LLWLParamManager::getInstance()->mDay.addKeyframe(it->second.time / sHoursPerDay,
- it->second.keyframe);
- }
-
- // set the param manager's track to the new one
- LLWLParamManager::getInstance()->resetAnimator(
- mTimeSlider->getCurSliderValue() / sHoursPerDay, false);
-
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
-#endif
-}
-
-void LLFloaterEditDayCycle::refreshSkyPresetsList()
-{
-#if 0
- // Don't allow selecting region skies for a local day cycle,
- // because thus we may end up with invalid day cycle.
- bool include_region_skies = getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION;
-
- mSkyPresetsCombo->removeall();
-
- LLWLParamManager::preset_name_list_t region_presets;
- LLWLParamManager::preset_name_list_t user_presets, sys_presets;
- LLWLParamManager::instance().getPresetNames(region_presets, user_presets, sys_presets);
-
- if (include_region_skies)
- {
- // Add region presets.
- for (LLWLParamManager::preset_name_list_t::const_iterator it = region_presets.begin(); it != region_presets.end(); ++it)
- {
- std::string preset_name = *it;
- std::string item_title = preset_name + " (" + getRegionName() + ")";
- mSkyPresetsCombo->add(preset_name, LLWLParamKey(*it, LLEnvKey::SCOPE_REGION).toStringVal());
- }
-
- if (!region_presets.empty())
- {
- mSkyPresetsCombo->addSeparator();
- }
- }
-
- // Add user presets.
- for (LLWLParamManager::preset_name_list_t::const_iterator it = user_presets.begin(); it != user_presets.end(); ++it)
- {
- mSkyPresetsCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
- }
-
- if (!user_presets.empty())
- {
- mSkyPresetsCombo->addSeparator();
- }
-
- // Add system presets.
- for (LLWLParamManager::preset_name_list_t::const_iterator it = sys_presets.begin(); it != sys_presets.end(); ++it)
- {
- mSkyPresetsCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toStringVal());
- }
-
- // set defaults on combo boxes
- mSkyPresetsCombo->selectFirstItem();
-#endif
-}
-
-void LLFloaterEditDayCycle::refreshDayCyclesList()
-{
-#if 0
- llassert(isNewDay() == false);
-
- mDayCyclesCombo->removeall();
-
-#if 0 // Disable editing existing day cycle until the workflow is clear enough.
- const LLSD& region_day = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
- if (region_day.size() > 0)
- {
- LLWLParamKey key(getRegionName(), LLEnvKey::SCOPE_REGION);
- mDayCyclesCombo->add(key.name, key.toLLSD());
- mDayCyclesCombo->addSeparator();
- }
-#endif
-
- LLDayCycleManager::preset_name_list_t user_days, sys_days;
- LLDayCycleManager::instance().getPresetNames(user_days, sys_days);
-
- // Add user days.
- for (LLDayCycleManager::preset_name_list_t::const_iterator it = user_days.begin(); it != user_days.end(); ++it)
- {
- mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
- }
-
- if (user_days.size() > 0)
- {
- mDayCyclesCombo->addSeparator();
- }
-
- // Add system days.
- for (LLDayCycleManager::preset_name_list_t::const_iterator it = sys_days.begin(); it != sys_days.end(); ++it)
- {
- mDayCyclesCombo->add(*it, LLWLParamKey(*it, LLEnvKey::SCOPE_LOCAL).toLLSD());
- }
-
- mDayCyclesCombo->setLabel(getString("combo_label"));
-#endif
-}
-
-void LLFloaterEditDayCycle::onTimeSliderMoved()
-{
-#if 0
- /// get the slider value
- F32 val = mTimeSlider->getCurSliderValue() / sHoursPerDay;
-
- // set the value, turn off animation
- LLWLParamManager::getInstance()->mAnimator.setDayTime((F64)val);
- LLWLParamManager::getInstance()->mAnimator.deactivate();
-
- // then call update once
- LLWLParamManager::getInstance()->mAnimator.update(
- LLWLParamManager::getInstance()->mCurParams);
-#endif
-}
-
-void LLFloaterEditDayCycle::onKeyTimeMoved()
-{
-#if 0
- if (mKeysSlider->getValue().size() == 0)
- {
- return;
- }
-
- // make sure we have a slider
- const std::string& cur_sldr = mKeysSlider->getCurSlider();
- if (cur_sldr == "")
- {
- return;
- }
-
- F32 time24 = mKeysSlider->getCurSliderValue();
-
- // check to see if a key exists
- LLWLParamKey key = mSliderToKey[cur_sldr].keyframe;
- LL_DEBUGS() << "Setting key time: " << time24 << LL_ENDL;
- mSliderToKey[cur_sldr].time = time24;
-
- // if it exists, turn on check box
- mSkyPresetsCombo->selectByValue(key.toStringVal());
-
- mTimeCtrl->setTime24(time24);
-
- applyTrack();
-#endif
-}
-
-void LLFloaterEditDayCycle::onKeyTimeChanged()
-{
-#if 0
- // if no keys, skipped
- if (mSliderToKey.size() == 0)
- {
- return;
- }
-
- F32 time24 = mTimeCtrl->getTime24();
-
- const std::string& cur_sldr = mKeysSlider->getCurSlider();
- mKeysSlider->setCurSliderValue(time24, TRUE);
- F32 time = mKeysSlider->getCurSliderValue() / sHoursPerDay;
-
- // now set the key's time in the sliderToKey map
- LL_DEBUGS() << "Setting key time: " << time << LL_ENDL;
- mSliderToKey[cur_sldr].time = time;
-
- applyTrack();
-#endif
-}
-
-void LLFloaterEditDayCycle::onKeyPresetChanged()
-{
-#if 0
- // do nothing if no sliders
- if (mKeysSlider->getValue().size() == 0)
- {
- return;
- }
-
- // change the map
-
- std::string stringVal = mSkyPresetsCombo->getSelectedValue().asString();
- LLWLParamKey new_key(stringVal);
- llassert(!new_key.name.empty());
- const std::string& cur_sldr = mKeysSlider->getCurSlider();
-
- // if null, don't use
- if (cur_sldr == "")
- {
- return;
- }
-
- mSliderToKey[cur_sldr].keyframe = new_key;
-
- // Apply changes to current day cycle.
- applyTrack();
-#endif
-}
-
-void LLFloaterEditDayCycle::onAddKey()
-{
-#if 0
- llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
-
- S32 max_sliders;
- LLEnvKey::EScope scope = LLEnvKey::SCOPE_LOCAL; // *TODO: editing region day cycle
- switch (scope)
- {
- case LLEnvKey::SCOPE_LOCAL:
- max_sliders = 20; // *HACK this should be LLWLPacketScrubber::MAX_LOCAL_KEY_FRAMES;
- break;
- case LLEnvKey::SCOPE_REGION:
- max_sliders = 12; // *HACK this should be LLWLPacketScrubber::MAX_REGION_KEY_FRAMES;
- break;
- default:
- max_sliders = (S32) mKeysSlider->getMaxValue();
- break;
- }
-
-#if 0
- if ((S32)mSliderToKey.size() >= max_sliders)
- {
- LLSD args;
- args["SCOPE"] = LLEnvManagerNew::getScopeString(scope);
- args["MAX"] = max_sliders;
- LLNotificationsUtil::add("DayCycleTooManyKeyframes", args, LLSD(), LLNotificationFunctorRegistry::instance().DONOTHING);
- return;
- }
-#endif
-
- // add the slider key
- std::string key_val = mSkyPresetsCombo->getSelectedValue().asString();
- LLWLParamKey sky_params(key_val);
- llassert(!sky_params.name.empty());
-
- F32 time = mTimeSlider->getCurSliderValue();
- addSliderKey(time, sky_params);
-
- // apply the change to current day cycles
- applyTrack();
-#endif
-}
-
-#if 0
-void LLFloaterEditDayCycle::addSliderKey(F32 time, LLWLParamKey keyframe)
-{
- // make a slider
- const std::string& sldr_name = mKeysSlider->addSlider(time);
- if (sldr_name.empty())
- {
- return;
- }
-
- // set the key
- SliderKey newKey(keyframe, mKeysSlider->getCurSliderValue());
-
- llassert_always(sldr_name != LLStringUtil::null);
-
- // add to map
- mSliderToKey.insert(std::pair<std::string, SliderKey>(sldr_name, newKey));
-
- llassert_always(mSliderToKey.size() == mKeysSlider->getValue().size());
-}
-#endif
-
-#if 0
-LLWLParamKey LLFloaterEditDayCycle::getSelectedDayCycle()
-{
- LLWLParamKey dc_key;
-
- if (mDayCycleNameEditor->getVisible())
- {
- dc_key.name = mDayCycleNameEditor->getText();
- dc_key.scope = LLEnvKey::SCOPE_LOCAL;
- }
- else
- {
- LLSD combo_val = mDayCyclesCombo->getValue();
-
- if (!combo_val.isArray()) // manually typed text
- {
- dc_key.name = combo_val.asString();
- dc_key.scope = LLEnvKey::SCOPE_LOCAL;
- }
- else
- {
- dc_key.fromLLSD(combo_val);
- }
- }
-
- return dc_key;
-}
-#endif
-
-bool LLFloaterEditDayCycle::isNewDay() const
-{
- return mKey.asString() == "new";
-}
-
-void LLFloaterEditDayCycle::dumpTrack()
-{
-#if 0
- LL_DEBUGS("Windlight") << "Dumping day cycle" << LL_ENDL;
-
- LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay;
- for (std::map<F32, LLWLParamKey>::iterator it = cur_dayp.mTimeMap.begin(); it != cur_dayp.mTimeMap.end(); ++it)
- {
- F32 time = it->first * 24.0f;
- S32 h = (S32) time;
- S32 m = (S32) ((time - h) * 60.0f);
- LL_DEBUGS("Windlight") << llformat("(%.3f) %02d:%02d", time, h, m) << " => " << it->second.name << LL_ENDL;
- }
-#endif
-}
-
-void LLFloaterEditDayCycle::enableEditing(bool enable)
-{
- mSkyPresetsCombo->setEnabled(enable);
- mTimeCtrl->setEnabled(enable);
- getChild<LLPanel>("day_cycle_slider_panel")->setCtrlsEnabled(enable);
- mSaveButton->setEnabled(enable);
- mMakeDefaultCheckBox->setEnabled(enable);
-}
-
-void LLFloaterEditDayCycle::reset()
-{
-#if 0
- // clear the slider
- mKeysSlider->clear();
- mSliderToKey.clear();
-
- refreshSkyPresetsList();
-
- if (isNewDay())
- {
- mDayCycleNameEditor->setValue(LLSD());
- F32 time = 0.5f * sHoursPerDay;
- mSaveButton->setEnabled(FALSE); // will be enabled as soon as users enters a name
- mTimeSlider->setCurSliderValue(time);
-
- addSliderKey(time, LLWLParamKey("Default", LLEnvKey::SCOPE_LOCAL));
- onKeyTimeMoved(); // update the time control and sky sky combo
-
- applyTrack();
- }
- else
- {
- refreshDayCyclesList();
-
- // Disable controls until a day cycle to edit is selected.
- enableEditing(false);
- }
-#endif
-}
-
-void LLFloaterEditDayCycle::saveRegionDayCycle()
-{
-#if 0
- LLEnvManagerNew& env_mgr = LLEnvManagerNew::instance();
- LLWLDayCycle& cur_dayp = LLWLParamManager::instance().mDay; // the day cycle being edited
-
- // Get current day cycle and the sky preset it references.
- LLSD day_cycle = cur_dayp.asLLSD();
- LLSD sky_map;
- cur_dayp.getSkyMap(sky_map);
-
- // Apply it to the region.
- LLEnvironmentSettings new_region_settings;
- new_region_settings.saveParams(day_cycle, sky_map, env_mgr.getRegionSettings().getWaterParams(), 0.0f);
-
-#if 1
- LLEnvManagerNew::instance().setRegionSettings(new_region_settings);
-#else // Temporary disabled ability to upload new region settings from the Day Cycle Editor.
- if (!LLEnvManagerNew::instance().sendRegionSettings(new_region_settings))
- {
- LL_WARNS() << "Error applying region environment settings" << LL_ENDL;
- return;
- }
-
- setApplyProgress(true);
-#endif
-#endif
-}
-
-void LLFloaterEditDayCycle::setApplyProgress(bool started)
-{
- LLLoadingIndicator* indicator = getChild<LLLoadingIndicator>("progress_indicator");
-
- indicator->setVisible(started);
-
- if (started)
- {
- indicator->start();
- }
- else
- {
- indicator->stop();
- }
-}
-
-bool LLFloaterEditDayCycle::getApplyProgress() const
-{
- return getChild<LLLoadingIndicator>("progress_indicator")->getVisible();
-}
-
-void LLFloaterEditDayCycle::onDeleteKey()
-{
-#if 0
- if (mSliderToKey.size() == 0)
- {
- return;
- }
- else if (mSliderToKey.size() == 1)
- {
- LLNotifications::instance().add("EnvCannotDeleteLastDayCycleKey", LLSD(), LLSD());
- return;
- }
-
- // delete from map
- const std::string& sldr_name = mKeysSlider->getCurSlider();
- std::map<std::string, SliderKey>::iterator mIt = mSliderToKey.find(sldr_name);
- mSliderToKey.erase(mIt);
-
- mKeysSlider->deleteCurSlider();
-
- if (mSliderToKey.size() == 0)
- {
- return;
- }
-
- const std::string& name = mKeysSlider->getCurSlider();
- mSkyPresetsCombo->selectByValue(mSliderToKey[name].keyframe.toStringVal());
- F32 time24 = mSliderToKey[name].time;
-
- mTimeCtrl->setTime24(time24);
-
- applyTrack();
-#endif
-}
-
-void LLFloaterEditDayCycle::onRegionSettingsChange()
-{
-#if 0
- LL_DEBUGS("Windlight") << "Region settings changed" << LL_ENDL;
-
- if (getApplyProgress()) // our region settings have being applied
- {
- setApplyProgress(false);
-
- // Change preference if requested.
- if (mMakeDefaultCheckBox->getValue())
- {
- LL_DEBUGS("Windlight") << "Changed environment preference to region settings" << LL_ENDL;
- LLEnvManagerNew::instance().setUseRegionSettings(true);
- }
-
- closeFloater();
- }
-#endif
-}
-
-void LLFloaterEditDayCycle::onRegionChange()
-{
-#if 0
- LL_DEBUGS("Windlight") << "Region changed" << LL_ENDL;
-
- // If we're editing the region day cycle
- if (getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION)
- {
- reset(); // undoes all unsaved changes
- }
-#endif
-}
-
-void LLFloaterEditDayCycle::onRegionSettingsApplied(bool success)
-{
- LL_DEBUGS("Windlight") << "Region settings applied: " << success << LL_ENDL;
-
- if (!success)
- {
- // stop progress indicator
- setApplyProgress(false);
- }
-}
-
-void LLFloaterEditDayCycle::onRegionInfoUpdate()
-{
-#if 0
- LL_DEBUGS("Windlight") << "Region info updated" << LL_ENDL;
- bool can_edit = true;
-
- // If we've selected the region day cycle for editing.
- if (getSelectedDayCycle().scope == LLEnvKey::SCOPE_REGION)
- {
- // check whether we have the access
- can_edit = LLEnvManagerNew::canEditRegionSettings();
- }
-
- enableEditing(can_edit);
-#endif
-}
-
-void LLFloaterEditDayCycle::onDayCycleNameEdited()
-{
-#if 0
- // Disable saving a day cycle having empty name.
- LLWLParamKey key = getSelectedDayCycle();
- mSaveButton->setEnabled(!key.name.empty());
-#endif
-}
-
-void LLFloaterEditDayCycle::onDayCycleSelected()
-{
-#if 0
-
- LLSD day_data;
- LLWLParamKey dc_key = getSelectedDayCycle();
- bool can_edit = true;
-
- if (dc_key.scope == LLEnvKey::SCOPE_LOCAL)
- {
- if (!LLDayCycleManager::instance().getPreset(dc_key.name, day_data))
- {
- LL_WARNS() << "No day cycle named " << dc_key.name << LL_ENDL;
- return;
- }
- }
- else
- {
- day_data = LLEnvManagerNew::instance().getRegionSettings().getWLDayCycle();
- if (day_data.size() == 0)
- {
- LL_WARNS() << "Empty region day cycle" << LL_ENDL;
- llassert(day_data.size() > 0);
- return;
- }
-
- can_edit = LLEnvManagerNew::canEditRegionSettings();
- }
-
- // We may need to add or remove region skies from the list.
- refreshSkyPresetsList();
-
- F32 slider_time = mTimeSlider->getCurSliderValue() / sHoursPerDay;
- LLWLParamManager::instance().applyDayCycleParams(day_data, dc_key.scope, slider_time);
- loadTrack();
-#endif
- enableEditing(false);
-}
-
-void LLFloaterEditDayCycle::onBtnSave()
-{
-#if 0
- LLDayCycleManager& day_mgr = LLDayCycleManager::instance();
- LLWLParamKey selected_day = getSelectedDayCycle();
-
- if (selected_day.scope == LLEnvKey::SCOPE_REGION)
- {
- saveRegionDayCycle();
- closeFloater();
- return;
- }
-
- std::string name = selected_day.name;
- if (name.empty())
- {
- // *TODO: show an alert
- LL_WARNS() << "Empty day cycle name" << LL_ENDL;
- return;
- }
-
- // Don't allow overwriting system presets.
- if (day_mgr.isSystemPreset(name))
- {
- LLNotificationsUtil::add("WLNoEditDefault");
- return;
- }
-
- // Save, ask for confirmation for overwriting an existing preset.
- if (day_mgr.presetExists(name))
- {
- LLNotificationsUtil::add("WLSavePresetAlert", LLSD(), LLSD(), boost::bind(&LLFloaterEditDayCycle::onSaveAnswer, this, _1, _2));
- }
- else
- {
- // new preset, hence no confirmation needed
- onSaveConfirmed();
- }
-#endif
-}
-
-void LLFloaterEditDayCycle::onBtnCancel()
-{
- closeFloater();
-}
-
-bool LLFloaterEditDayCycle::onSaveAnswer(const LLSD& notification, const LLSD& response)
-{
- S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
-
- // If they choose save, do it. Otherwise, don't do anything
- if (option == 0)
- {
- onSaveConfirmed();
- }
-
- return false;
-}
-
-void LLFloaterEditDayCycle::onSaveConfirmed()
-{
-#if 0
- std::string name = getSelectedDayCycle().name;
-
- // Save preset.
- LLSD data = LLWLParamManager::instance().mDay.asLLSD();
- LL_DEBUGS("Windlight") << "Saving day cycle " << name << ": " << data << LL_ENDL;
- LLDayCycleManager::instance().savePreset(name, data);
-
- // Change preference if requested.
- if (mMakeDefaultCheckBox->getValue())
- {
- LL_DEBUGS("Windlight") << name << " is now the new preferred day cycle" << LL_ENDL;
- LLEnvManagerNew::instance().setUseDayCycle(name);
- }
-#endif
- closeFloater();
-}
-
-void LLFloaterEditDayCycle::onDayCycleListChange()
-{
- if (!isNewDay())
- {
- refreshDayCyclesList();
- }
-}
-
-void LLFloaterEditDayCycle::onSkyPresetListChange()
-{
- refreshSkyPresetsList();
-
- // Refresh sliders from the currently visible day cycle.
- loadTrack();
-}
-
-// static
-std::string LLFloaterEditDayCycle::getRegionName()
-{
- return gAgent.getRegion() ? gAgent.getRegion()->getName() : LLTrans::getString("Unknown");
-}
diff --git a/indra/newview/llfloatereditdaycycle.h b/indra/newview/llfloatereditdaycycle.h
deleted file mode 100644
index 50d60a2b56..0000000000
--- a/indra/newview/llfloatereditdaycycle.h
+++ /dev/null
@@ -1,135 +0,0 @@
-/**
- * @file llfloatereditdaycycle.h
- * @brief Floater to create or edit a day cycle
- *
- * $LicenseInfo:firstyear=2011&license=viewerlgpl$
- * Second Life Viewer Source Code
- * Copyright (C) 2011, Linden Research, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation;
- * version 2.1 of the License only.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
- * $/LicenseInfo$
- */
-
-#ifndef LL_LLFLOATEREDITDAYCYCLE_H
-#define LL_LLFLOATEREDITDAYCYCLE_H
-
-#include "llfloater.h"
-
-class LLCheckBoxCtrl;
-class LLComboBox;
-class LLLineEditor;
-class LLMultiSliderCtrl;
-class LLTimeCtrl;
-
-/**
- * Floater for creating or editing a day cycle.
- */
-class LLFloaterEditDayCycle : public LLFloater
-{
- LOG_CLASS(LLFloaterEditDayCycle);
-
-public:
- LLFloaterEditDayCycle(const LLSD &key);
-
- /*virtual*/ BOOL postBuild();
- /*virtual*/ void onOpen(const LLSD& key);
- /*virtual*/ void onClose(bool app_quitting);
- /*virtual*/ void draw();
-
-private:
-
- /// sync the time slider with day cycle structure
- void syncTimeSlider();
-
- // makes sure key slider has what's in day cycle
- void loadTrack();
-
- /// makes sure day cycle data structure has what's in menu
- void applyTrack();
-
- /// refresh the sky presets combobox
- void refreshSkyPresetsList();
-
- /// refresh the day cycle combobox
- void refreshDayCyclesList();
-
- /// add a slider to the track
-// void addSliderKey(F32 time, LLWLParamKey keyframe);
-
- void initCallbacks();
-// LLWLParamKey getSelectedDayCycle();
- bool isNewDay() const;
- void dumpTrack();
- void enableEditing(bool enable);
- void reset();
- void saveRegionDayCycle();
-
- void setApplyProgress(bool started);
- bool getApplyProgress() const;
-
- void onTimeSliderMoved(); /// time slider moved
- void onKeyTimeMoved(); /// a key frame moved
- void onKeyTimeChanged(); /// a key frame's time changed
- void onKeyPresetChanged(); /// sky preset selected
- void onAddKey(); /// new key added on slider
- void onDeleteKey(); /// a key frame deleted
-
- void onRegionSettingsChange();
- void onRegionChange();
- void onRegionSettingsApplied(bool success);
- void onRegionInfoUpdate();
-
- void onDayCycleNameEdited();
- void onDayCycleSelected();
- void onBtnSave();
- void onBtnCancel();
-
- bool onSaveAnswer(const LLSD& notification, const LLSD& response);
- void onSaveConfirmed();
-
- void onDayCycleListChange();
- void onSkyPresetListChange();
-
- static std::string getRegionName();
-
- /// convenience class for holding keyframes mapped to sliders
-// struct SliderKey
-// {
-// public:
-// SliderKey(LLWLParamKey kf, F32 t) : keyframe(kf), time(t) {}
-// SliderKey() : keyframe(), time(0.f) {} // Don't use this default constructor
-//
-// LLWLParamKey keyframe;
-// F32 time;
-// };
-
- static const F32 sHoursPerDay;
-
- LLLineEditor* mDayCycleNameEditor;
- LLComboBox* mDayCyclesCombo;
- LLMultiSliderCtrl* mTimeSlider;
- LLMultiSliderCtrl* mKeysSlider;
- LLComboBox* mSkyPresetsCombo;
- LLTimeCtrl* mTimeCtrl;
- LLCheckBoxCtrl* mMakeDefaultCheckBox;
- LLButton* mSaveButton;
-
- // map of sliders to parameters
-// std::map<std::string, SliderKey> mSliderToKey;
-};
-
-#endif // LL_LLFLOATEREDITDAYCYCLE_H
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 241c3ab59d..f01159f07c 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1281,13 +1281,7 @@ void LLFloaterEditExtDayCycle::doApplyEnvironment(const std::string &where, cons
}
else if (where == ACTION_APPLY_PARCEL)
{
- LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection());
- LLParcel *parcel(nullptr);
-
- if (handle)
- parcel = handle->getParcel();
- if (!parcel || (parcel->getLocalID() == INVALID_PARCEL_ID))
- parcel = LLViewerParcelMgr::instance().getAgentParcel();
+ LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel());
if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID))
{
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 71d3ef6405..216556cf89 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -428,13 +428,7 @@ void LLFloaterFixedEnvironment::doApplyEnvironment(const std::string &where)
}
else if (where == ACTION_APPLY_PARCEL)
{
- LLParcelSelectionHandle handle(LLViewerParcelMgr::instance().getParcelSelection());
- LLParcel *parcel(nullptr);
-
- if (handle)
- parcel = handle->getParcel();
- if (!parcel)
- parcel = LLViewerParcelMgr::instance().getAgentParcel();
+ LLParcel *parcel(LLViewerParcelMgr::instance().getAgentOrSelectedParcel());
if ((!parcel) || (parcel->getLocalID() == INVALID_PARCEL_ID))
{
diff --git a/indra/newview/llstartup.cpp b/indra/newview/llstartup.cpp
index 831b9e2d2a..fbb9030700 100644
--- a/indra/newview/llstartup.cpp
+++ b/indra/newview/llstartup.cpp
@@ -1465,7 +1465,6 @@ bool idle_startup()
LLGLState::checkStates();
LLGLState::checkTextureChannels();
- LLEnvironment::instance().loadPreferences();
gSky.init();
LLGLState::checkStates();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index feac071cac..6ad4ea76af 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -57,7 +57,6 @@
#include "llfloaterconversationpreview.h"
#include "llfloaterdeleteprefpreset.h"
#include "llfloaterdestinations.h"
-#include "llfloatereditdaycycle.h"
#include "llfloatereditextdaycycle.h"
#include "llfloaterexperienceprofile.h"
#include "llfloaterexperiences.h"
@@ -220,7 +219,6 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("destinations", "floater_destinations.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterDestinations>);
LLFloaterReg::add("env_post_process", "floater_post_process.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterPostProcess>);
- LLFloaterReg::add("env_edit_day_cycle", "floater_edit_day_cycle.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterEditDayCycle>);
LLFloaterReg::add("env_fixed_environmentent_water", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentWater>);
LLFloaterReg::add("env_fixed_environmentent_sky", "floater_fixedenvironment.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterFixedEnvironmentSky>);
diff --git a/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml b/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml
deleted file mode 100644
index d9a3ad0c4b..0000000000
--- a/indra/newview/skins/default/xui/en/floater_edit_day_cycle.xml
+++ /dev/null
@@ -1,485 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
-<floater
- legacy_header_height="18"
- height="381"
- layout="topleft"
- name="Edit Day cycle"
- help_topic="day_presets"
- save_rect="true"
- title="Edit Day Cycle"
- width="705">
-
- <string name="title_new">Create a New Day Cycle</string>
- <string name="title_edit">Edit Day Cycle</string>
- <string name="hint_new">Name your day cycle, adjust the controls to create it, and click "Save".</string>
- <string name="hint_edit">To edit your day cycle, adjust the controls below and click "Save".</string>
- <string name="combo_label">-Select a preset-</string>
-
- <text
- follows="top|left|right"
- height="10"
- layout="topleft"
- left="10"
- name="hint"
- top="25"
- width="685" />
- <text
- follows="top|left|right"
- font="SansSerif"
- height="10"
- layout="topleft"
- left="10"
- name="label"
- top_pad="25"
- width="120">
- Preset Name:
- </text>
- <combo_box
- allow_text_entry="true"
- follows="top|left"
- layout="topleft"
- left_pad="10"
- max_chars="100"
- name="day_cycle_combo"
- top_delta="-5"
- width="200" />
- <line_editor
- height="20"
- left_delta="0"
- name="day_cycle_name"
- top_delta="0"
- visible="true"
- width="200" />
- <text
- follows="top|left|right"
- height="95"
- layout="topleft"
- left_pad="10"
- name="note"
- top_delta="0"
- width="345"
- wrap="true">
- Note: if you change the name of your preset, you will be creating a new preset and the existing preset will not be changed.
- </text>
- <!--======== Controls panel ========-->
- <text
- follows="left|top|right"
- height="10"
- layout="topleft"
- left="10"
- name="hint_item1"
- top="100"
- width="300">
- - Click on a tab to edit the specific sky settings and time.
- </text>
- <text
- follows="left|top|right"
- height="10"
- layout="topleft"
- name="hint_item2"
- top_pad="10"
- width="300">
- - Click and drag the tabs to set the transition times.
- </text>
- <text
- follows="left|top|right"
- height="10"
- layout="topleft"
- name="hint_item3"
- top_pad="10"
- width="300">
- - Use the scrubber to preview your day cycle.
- </text>
- <panel
- follows="top|left"
- height="100"
- name="day_cycle_slider_panel"
- layout="topleft"
- left_delta="25"
- top_pad="15"
- width="660">
- <multi_slider
- can_edit_text="true"
- control_name="WLTimeSlider"
- decimal_digits="0"
- draw_track="false"
- follows="bottom"
- height="10"
- increment="0.0833333"
- initial_value="0"
- layout="topleft"
- left="20"
- max_sliders="20"
- max_val="24"
- name="WLTimeSlider"
- show_text="false"
- top_pad="0"
- use_triangle="true"
- width="525" />
- <multi_slider
- can_edit_text="true"
- control_name="WLDayCycleKeys"
- decimal_digits="0"
- follows="bottom"
- height="10"
- increment="0.0833333"
- initial_value="0"
- layout="topleft"
- left_delta="0"
- max_sliders="20"
- max_val="24"
- name="WLDayCycleKeys"
- show_text="false"
- top_pad="15"
- width="525" />
- <button
- height="20"
- label="Add Key"
- label_selected="Add Key"
- layout="topleft"
- left_pad="20"
- name="WLAddKey"
- top_delta="-18"
- width="96" />
- <button
- height="20"
- label="Delete Key"
- label_selected="Delete Key"
- layout="topleft"
- name="WLDeleteKey"
- top_pad="5"
- width="96" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left="8"
- name="WL12am"
- top="74"
- width="55">
- 12am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL3am"
- top_delta="0"
- width="55">
- 3am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL6am"
- top_delta="0"
- width="55">
- 6am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL9amHash"
- top_delta="0"
- width="55">
- 9am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL12pmHash"
- top_delta="0"
- width="55">
- 12pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL3pm"
- top_delta="0"
- width="55">
- 3pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL6pm"
- top_delta="0"
- width="55">
- 6pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL9pm"
- top_delta="0"
- width="55">
- 9pm
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="10"
- name="WL12am2"
- top_delta="0"
- width="55">
- 12am
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left="20"
- name="WL12amHash"
- top="54"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL3amHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL6amHash"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL9amHash2"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL12pmHash2"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL3pmHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL6pmHash"
- top_delta="-3"
- width="6">
- |
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="11"
- layout="topleft"
- left_pad="59"
- name="WL9pmHash"
- top_delta="3"
- width="6">
- I
- </text>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="14"
- layout="topleft"
- left_pad="59"
- name="WL12amHash2"
- top_delta="-3"
- width="6">
- |
- </text>
- </panel>
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="192"
- name="WLCurKeyPresetText"
- top_pad="10"
- width="80">
- Sky Setting:
- </text>
- <combo_box
- height="18"
- label="Preset"
- layout="topleft"
- left_pad="5"
- name="WLSkyPresets"
- width="205" />
- <text
- type="string"
- length="1"
- border_visible="true"
- follows="left|top|right"
- font="SansSerif"
- height="16"
- layout="topleft"
- left_delta="-40"
- name="WLCurKeyTimeText"
- top_pad="15"
- width="35">
- Time:
- </text>
- <time
- follows="left|top"
- height="16"
- label_width="0"
- layout="topleft"
- left_pad="3"
- name="time"
- top_delta="-1"
- value="6:00 AM"
- width="75"/>
- <view_border
- bevel_style="none"
- follows="top|left"
- height="0"
- layout="topleft"
- left="10"
- name="horiz_separator"
- top_pad="20"
- width="685"/>
- <loading_indicator
- height="23"
- layout="topleft"
- left="25"
- name="progress_indicator"
- top="350"
- visible="false"
- width="23" />
- <check_box
- follows="top|left"
- height="10"
- label="Make this my new day cycle"
- layout="topleft"
- left="310"
- name="make_default_cb"
- top_delta="13"
- width="230"/>
- <button
- follows="bottom|right"
- height="23"
- label="Save"
- layout="topleft"
- left_pad="0"
- name="save"
- top_delta="-13"
- width="70"/>
- <button
- follows="bottom|right"
- height="23"
- label="Cancel"
- layout="topleft"
- left_pad="15"
- name="cancel"
- top_delta="0"
- width="70"/>
- </floater>