From 150fba7c5cd24ad9ab343e762bfd15032e6a9462 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 21 Sep 2017 15:58:13 -0700 Subject: Still not working. Black Sky. --- indra/newview/llenvironment.h | 81 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 indra/newview/llenvironment.h (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h new file mode 100644 index 0000000000..bbb5f45ad9 --- /dev/null +++ b/indra/newview/llenvironment.h @@ -0,0 +1,81 @@ +/** + * @file llenvmanager.h + * @brief Declaration of classes managing WindLight and water settings. + * + * $LicenseInfo:firstyear=2009&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_ENVIRONMENT_H +#define LL_ENVIRONMENT_H + +#include "llmemory.h" +#include "llsd.h" + +#include "llsettingssky.h" + +class LLViewerCamera; +class LLGLSLShader; + +//------------------------------------------------------------------------- +class LLEnvironment : public LLSingleton +{ + LLSINGLETON(LLEnvironment); + LOG_CLASS(LLEnvironment); + +public: + virtual ~LLEnvironment(); + + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } + + void update(const LLViewerCamera * cam); + + LLVector4 getRotatedLightDir() const { return mRotatedLight; } + + void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); + void updateShaderUniforms(LLGLSLShader *shader); + + void addSky(const LLSettingsSky::ptr_t &sky); +private: + static const F32 SUN_DELTA_YAW; + + typedef std::map NamedSkyMap_t; + typedef std::map AssetSkyMap_t; + + LLVector4 mRotatedLight; + LLVector2 mCloudScroll; + + LLSettingsSky::ptr_t mCurrentSky; + + NamedSkyMap_t mSkysByName; + AssetSkyMap_t mSkysById; + + void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); + void removeSky(const std::string &name); + void removeSky(const LLUUID &id); + void clearAllSkys(); + + void updateCloudScroll(); +}; + + +#endif // LL_ENVIRONMENT_H + -- cgit v1.2.3 From 0d414c1fb579dffc122c4d021a84cd126c612e54 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 26 Sep 2017 09:19:20 -0700 Subject: Clouds still funky but better. --- indra/newview/llenvironment.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index bbb5f45ad9..3a834963f3 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -54,6 +54,9 @@ public: void updateShaderUniforms(LLGLSLShader *shader); void addSky(const LLSettingsSky::ptr_t &sky); + + inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } + private: static const F32 SUN_DELTA_YAW; @@ -61,7 +64,7 @@ private: typedef std::map AssetSkyMap_t; LLVector4 mRotatedLight; - LLVector2 mCloudScroll; + LLVector2 mCloudScrollDelta; // cumulative cloud delta LLSettingsSky::ptr_t mCurrentSky; -- cgit v1.2.3 From 52b0d4173cec0f643f37d426aef8f5ab1fdf3232 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 27 Sep 2017 09:36:26 -0700 Subject: No longer 'goth windlight only', sky parameters passed from settings object. --- indra/newview/llenvironment.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 3a834963f3..0e8f39b4bf 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -54,9 +54,16 @@ public: void updateShaderUniforms(LLGLSLShader *shader); void addSky(const LLSettingsSky::ptr_t &sky); + void selectSky(const std::string &name); inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } + F32 getCamHeight() const; + + inline F32 getSceneLightStrength() const { return mSceneLightStrength; } + inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } + + private: static const F32 SUN_DELTA_YAW; @@ -71,6 +78,8 @@ private: NamedSkyMap_t mSkysByName; AssetSkyMap_t mSkysById; + F32 mSceneLightStrength; + void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void removeSky(const std::string &name); void removeSky(const LLUUID &id); -- cgit v1.2.3 From 23916be3dac32beebb17e0b9336b34176265783d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 29 Sep 2017 16:46:39 -0700 Subject: Moon is showing, sun still not working. --- indra/newview/llenvironment.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 0e8f39b4bf..a1bdf2c38c 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -48,8 +48,6 @@ public: void update(const LLViewerCamera * cam); - LLVector4 getRotatedLightDir() const { return mRotatedLight; } - void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); @@ -63,6 +61,9 @@ public: inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } + inline LLVector4 getLightDirection() const { return LLVector4(mCurrentSky->getLightDirection(), 0.0f); } + inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } + inline LLVector4 getRotatedLight() const { return mRotatedLight; } private: static const F32 SUN_DELTA_YAW; @@ -70,7 +71,6 @@ private: typedef std::map NamedSkyMap_t; typedef std::map AssetSkyMap_t; - LLVector4 mRotatedLight; LLVector2 mCloudScrollDelta; // cumulative cloud delta LLSettingsSky::ptr_t mCurrentSky; @@ -79,6 +79,7 @@ private: AssetSkyMap_t mSkysById; F32 mSceneLightStrength; + LLVector4 mRotatedLight; void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void removeSky(const std::string &name); -- cgit v1.2.3 From cc22ffc6d799544e8f2a9dfed6813081d908c88d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 13 Oct 2017 17:17:49 -0700 Subject: Watter settings active and start of new joystick button type. --- indra/newview/llenvironment.h | 69 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 6 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index a1bdf2c38c..7506b37e3e 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -31,10 +31,14 @@ #include "llsd.h" #include "llsettingssky.h" +#include "llsettingswater.h" class LLViewerCamera; class LLGLSLShader; +//------------------------------------------------------------------------- + + //------------------------------------------------------------------------- class LLEnvironment : public LLSingleton { @@ -42,9 +46,44 @@ class LLEnvironment : public LLSingleton LOG_CLASS(LLEnvironment); public: + 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; + }; + virtual ~LLEnvironment(); + void loadPreferences(); + const UserPrefs & getPreferences() const { return mUserPrefs; } + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } + LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } void update(const LLViewerCamera * cam); @@ -53,10 +92,15 @@ public: void addSky(const LLSettingsSky::ptr_t &sky); void selectSky(const std::string &name); + void addWater(const LLSettingsWater::ptr_t &sky); + void selectWater(const std::string &name); inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } F32 getCamHeight() const; + F32 getWaterHeight() const; + bool getIsDayTime() const; // "Day Time" is defined as the sun above the horizon. + bool getIsNightTime() const { return !getIsDayTime(); } // "Not Day Time" inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } @@ -65,27 +109,40 @@ public: inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } + private: static const F32 SUN_DELTA_YAW; + static const F32 NIGHTTIME_ELEVATION_COS; - typedef std::map NamedSkyMap_t; - typedef std::map AssetSkyMap_t; + typedef std::map NamedSettingMap_t; + typedef std::map AssetSettingMap_t; LLVector2 mCloudScrollDelta; // cumulative cloud delta LLSettingsSky::ptr_t mCurrentSky; + LLSettingsWater::ptr_t mCurrentWater; + + NamedSettingMap_t mSkysByName; + AssetSettingMap_t mSkysById; - NamedSkyMap_t mSkysByName; - AssetSkyMap_t mSkysById; + NamedSettingMap_t mWaterByName; + AssetSettingMap_t mWaterById; F32 mSceneLightStrength; LLVector4 mRotatedLight; - void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); + UserPrefs mUserPrefs; + + //void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void removeSky(const std::string &name); - void removeSky(const LLUUID &id); + //void removeSky(const LLUUID &id); void clearAllSkys(); + //void addWater(const LLUUID &id, const LLSettingsSky::ptr_t &sky); + void removeWater(const std::string &name); + //void removeWater(const LLUUID &id); + void clearAllWater(); + void updateCloudScroll(); }; -- cgit v1.2.3 From 2161788711f6d89564afc933707b6a0b8c1b0562 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 20 Oct 2017 16:37:03 -0700 Subject: Day cycles start --- indra/newview/llenvironment.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7506b37e3e..493fff1769 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -85,6 +85,8 @@ public: LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } + + void update(const LLViewerCamera * cam); void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); @@ -92,6 +94,9 @@ public: void addSky(const LLSettingsSky::ptr_t &sky); void selectSky(const std::string &name); + LLSettingsSky::ptr_t findSkyByName(std::string name) const; + LLSettingsWater::ptr_t findWaterByName(std::string name) const; + void addWater(const LLSettingsWater::ptr_t &sky); void selectWater(const std::string &name); -- cgit v1.2.3 From 61e6632a713041e8e4ccebf72874767238bf8a48 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 3 Nov 2017 11:28:08 -0700 Subject: Initial day cycle impl. --- indra/newview/llenvironment.h | 146 ++++++++++++++++++++++++++++-------------- 1 file changed, 99 insertions(+), 47 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 493fff1769..a3fc9eef66 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -32,6 +32,7 @@ #include "llsettingssky.h" #include "llsettingswater.h" +#include "llsettingsdaycycle.h" class LLViewerCamera; class LLGLSLShader; @@ -52,22 +53,22 @@ public: public: UserPrefs(); - bool getUseRegionSettings() const { return mUseRegionSettings; } - bool getUseDayCycle() const { return mUseDayCycle; } - bool getUseFixedSky() const { return !getUseDayCycle(); } + 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; } + 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); + 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(); + void load(); + void store(); bool mUseRegionSettings; bool mUseDayCycle; @@ -77,66 +78,104 @@ public: std::string mDayCycleName; }; + typedef std::pair name_id_t; + typedef std::vector list_name_id_t; + typedef boost::signals2::signal change_signal_t; + typedef boost::signals2::connection connection_t; + virtual ~LLEnvironment(); - void loadPreferences(); - const UserPrefs & getPreferences() const { return mUserPrefs; } + void loadPreferences(); + const UserPrefs & getPreferences() const { return mUserPrefs; } + + LLSettingsSky::ptr_t getCurrentSky() const { return mSelectedSky; } + LLSettingsWater::ptr_t getCurrentWater() const { return mSelectedWater; } - LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } - LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } + void update(const LLViewerCamera * cam); + void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); + void updateShaderUniforms(LLGLSLShader *shader); + void addSky(const LLSettingsSky::ptr_t &sky); + void addWater(const LLSettingsWater::ptr_t &sky); + void addDayCycle(const LLSettingsDayCycle::ptr_t &day); - void update(const LLViewerCamera * cam); + void selectSky(const std::string &name); + void selectSky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); + void applySky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); + void selectWater(const std::string &name); + void selectWater(const LLSettingsWater::ptr_t &water = LLSettingsWater::ptr_t()); + void applyWater(const LLSettingsWater::ptr_t water = LLSettingsWater::ptr_t()); + void selectDayCycle(const std::string &name); + void selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); + void applyDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); + void clearAllSelected(); + void applyAllSelected(); - void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); - void updateShaderUniforms(LLGLSLShader *shader); + list_name_id_t getSkyList() const; + list_name_id_t getWaterList() const; + list_name_id_t getDayCycleList() const; - void addSky(const LLSettingsSky::ptr_t &sky); - void selectSky(const std::string &name); - LLSettingsSky::ptr_t findSkyByName(std::string name) const; - LLSettingsWater::ptr_t findWaterByName(std::string name) const; + LLSettingsSky::ptr_t findSkyByName(std::string name) const; + LLSettingsWater::ptr_t findWaterByName(std::string name) const; + LLSettingsDayCycle::ptr_t findDayCycleByName(std::string name) const; - void addWater(const LLSettingsWater::ptr_t &sky); - void selectWater(const std::string &name); + inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } - inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } + F32 getCamHeight() const; + F32 getWaterHeight() const; + bool getIsDayTime() const; // "Day Time" is defined as the sun above the horizon. + bool getIsNightTime() const { return !getIsDayTime(); } // "Not Day Time" - F32 getCamHeight() const; - F32 getWaterHeight() const; - bool getIsDayTime() const; // "Day Time" is defined as the sun above the horizon. - bool getIsNightTime() const { return !getIsDayTime(); } // "Not Day Time" + inline F32 getSceneLightStrength() const { return mSceneLightStrength; } + inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } - inline F32 getSceneLightStrength() const { return mSceneLightStrength; } - inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } + inline LLVector4 getLightDirection() const { return LLVector4(mSelectedSky->getLightDirection(), 0.0f); } + inline LLVector4 getClampedLightDirection() const { return LLVector4(mSelectedSky->getClampedLightDirection(), 0.0f); } + inline LLVector4 getRotatedLight() const { return mRotatedLight; } - inline LLVector4 getLightDirection() const { return LLVector4(mCurrentSky->getLightDirection(), 0.0f); } - inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } - inline LLVector4 getRotatedLight() const { return mRotatedLight; } + //------------------------------------------- + connection_t setSkyListChange(const change_signal_t::slot_type& cb); + connection_t setWaterListChange(const change_signal_t::slot_type& cb); + connection_t setDayCycleListChange(const change_signal_t::slot_type& cb); +protected: + virtual void initSingleton(); private: - static const F32 SUN_DELTA_YAW; - static const F32 NIGHTTIME_ELEVATION_COS; + static const F32 SUN_DELTA_YAW; + static const F32 NIGHTTIME_ELEVATION_COS; typedef std::map NamedSettingMap_t; typedef std::map AssetSettingMap_t; - LLVector2 mCloudScrollDelta; // cumulative cloud delta + LLVector2 mCloudScrollDelta; // cumulative cloud delta + + LLSettingsSky::ptr_t mSelectedSky; + LLSettingsWater::ptr_t mSelectedWater; + LLSettingsDayCycle::ptr_t mSelectedDayCycle; + + LLSettingsSky::ptr_t mCurrentSky; + LLSettingsWater::ptr_t mCurrentWater; + LLSettingsDayCycle::ptr_t mCurrentDayCycle; + + NamedSettingMap_t mSkysByName; + AssetSettingMap_t mSkysById; - LLSettingsSky::ptr_t mCurrentSky; - LLSettingsWater::ptr_t mCurrentWater; + NamedSettingMap_t mWaterByName; + AssetSettingMap_t mWaterById; - NamedSettingMap_t mSkysByName; - AssetSettingMap_t mSkysById; + NamedSettingMap_t mDayCycleByName; + AssetSettingMap_t mDayCycleById; - NamedSettingMap_t mWaterByName; - AssetSettingMap_t mWaterById; + F32 mSceneLightStrength; + LLVector4 mRotatedLight; - F32 mSceneLightStrength; - LLVector4 mRotatedLight; + UserPrefs mUserPrefs; - UserPrefs mUserPrefs; + change_signal_t mSkyListChange; + change_signal_t mWaterListChange; + change_signal_t mDayCycleListChange; //void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void removeSky(const std::string &name); @@ -148,7 +187,20 @@ private: //void removeWater(const LLUUID &id); void clearAllWater(); + //void addDayCycle(const LLUUID &id, const LLSettingsSky::ptr_t &sky); + void removeDayCycle(const std::string &name); + //void removeDayCycle(const LLUUID &id); + void clearAllDayCycles(); + + void updateCloudScroll(); + + //========================================================================= + void legacyLoadAllPresets(); + LLSD legacyLoadPreset(const std::string& path); + static std::string getSysDir(const std::string &subdir); + static std::string getUserDir(const std::string &subdir); + }; -- cgit v1.2.3 From fe846ec9942af5ad2ab6a4aad9e8561ba9bc1fba Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 8 Nov 2017 16:02:20 -0800 Subject: Day cycles and animated sky/water blending. --- indra/newview/llenvironment.h | 58 +++++++++++++++++++++++++++---------------- 1 file changed, 37 insertions(+), 21 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index a3fc9eef66..7894d2ff6e 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -30,16 +30,15 @@ #include "llmemory.h" #include "llsd.h" +#include "llsettingsbase.h" #include "llsettingssky.h" #include "llsettingswater.h" #include "llsettingsdaycycle.h" +//------------------------------------------------------------------------- class LLViewerCamera; class LLGLSLShader; -//------------------------------------------------------------------------- - - //------------------------------------------------------------------------- class LLEnvironment : public LLSingleton { @@ -47,6 +46,13 @@ class LLEnvironment : public LLSingleton LOG_CLASS(LLEnvironment); public: + static const F32Seconds LLEnvironment::TRANSITION_INSTANT; + static const F32Seconds LLEnvironment::TRANSITION_FAST; + static const F32Seconds LLEnvironment::TRANSITION_DEFAULT; + static const F32Seconds LLEnvironment::TRANSITION_SLOW; + + typedef boost::signals2::connection connection_t; + class UserPrefs { friend class LLEnvironment; @@ -78,18 +84,18 @@ public: std::string mDayCycleName; }; - typedef std::pair name_id_t; - typedef std::vector list_name_id_t; - typedef boost::signals2::signal change_signal_t; - typedef boost::signals2::connection connection_t; + typedef std::map namedSettingMap_t; + typedef std::pair name_id_t; + typedef std::vector list_name_id_t; + typedef boost::signals2::signal change_signal_t; virtual ~LLEnvironment(); void loadPreferences(); const UserPrefs & getPreferences() const { return mUserPrefs; } - LLSettingsSky::ptr_t getCurrentSky() const { return mSelectedSky; } - LLSettingsWater::ptr_t getCurrentWater() const { return mSelectedWater; } + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } + LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } void update(const LLViewerCamera * cam); @@ -100,14 +106,14 @@ public: void addWater(const LLSettingsWater::ptr_t &sky); void addDayCycle(const LLSettingsDayCycle::ptr_t &day); - void selectSky(const std::string &name); - void selectSky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); + void selectSky(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); + void selectSky(const LLSettingsSky::ptr_t &sky, F32Seconds transition = TRANSITION_DEFAULT); void applySky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); - void selectWater(const std::string &name); - void selectWater(const LLSettingsWater::ptr_t &water = LLSettingsWater::ptr_t()); + void selectWater(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); + void selectWater(const LLSettingsWater::ptr_t &water, F32Seconds transition = TRANSITION_DEFAULT); void applyWater(const LLSettingsWater::ptr_t water = LLSettingsWater::ptr_t()); - void selectDayCycle(const std::string &name); - void selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); + void selectDayCycle(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); + void selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); void applyDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); void clearAllSelected(); void applyAllSelected(); @@ -130,8 +136,8 @@ public: inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } - inline LLVector4 getLightDirection() const { return LLVector4(mSelectedSky->getLightDirection(), 0.0f); } - inline LLVector4 getClampedLightDirection() const { return LLVector4(mSelectedSky->getClampedLightDirection(), 0.0f); } + inline LLVector4 getLightDirection() const { return LLVector4(mCurrentSky->getLightDirection(), 0.0f); } + inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } //------------------------------------------- @@ -139,6 +145,8 @@ public: connection_t setWaterListChange(const change_signal_t::slot_type& cb); connection_t setDayCycleListChange(const change_signal_t::slot_type& cb); + void onLegacyRegionSettings(LLSD data); + protected: virtual void initSingleton(); @@ -146,7 +154,6 @@ private: static const F32 SUN_DELTA_YAW; static const F32 NIGHTTIME_ELEVATION_COS; - typedef std::map NamedSettingMap_t; typedef std::map AssetSettingMap_t; LLVector2 mCloudScrollDelta; // cumulative cloud delta @@ -155,17 +162,20 @@ private: LLSettingsWater::ptr_t mSelectedWater; LLSettingsDayCycle::ptr_t mSelectedDayCycle; + LLSettingsBlender::ptr_t mBlenderSky; + LLSettingsBlender::ptr_t mBlenderWater; + LLSettingsSky::ptr_t mCurrentSky; LLSettingsWater::ptr_t mCurrentWater; LLSettingsDayCycle::ptr_t mCurrentDayCycle; - NamedSettingMap_t mSkysByName; + namedSettingMap_t mSkysByName; AssetSettingMap_t mSkysById; - NamedSettingMap_t mWaterByName; + namedSettingMap_t mWaterByName; AssetSettingMap_t mWaterById; - NamedSettingMap_t mDayCycleByName; + namedSettingMap_t mDayCycleByName; AssetSettingMap_t mDayCycleById; F32 mSceneLightStrength; @@ -177,6 +187,10 @@ private: change_signal_t mWaterListChange; change_signal_t mDayCycleListChange; + void onSkyTransitionDone(const LLSettingsBlender::ptr_t &blender); + void onWaterTransitionDone(const LLSettingsBlender::ptr_t &blender); + + //void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); void removeSky(const std::string &name); //void removeSky(const LLUUID &id); @@ -195,6 +209,8 @@ private: void updateCloudScroll(); + void onRegionChange(); + //========================================================================= void legacyLoadAllPresets(); LLSD legacyLoadPreset(const std::string& path); -- cgit v1.2.3 From a700c2a2e97eaa934b6ba570c6885243918cc1ab Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 8 Nov 2017 16:28:02 -0800 Subject: Quick fix --- indra/newview/llenvironment.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7894d2ff6e..13985bbc94 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -46,10 +46,10 @@ class LLEnvironment : public LLSingleton LOG_CLASS(LLEnvironment); public: - static const F32Seconds LLEnvironment::TRANSITION_INSTANT; - static const F32Seconds LLEnvironment::TRANSITION_FAST; - static const F32Seconds LLEnvironment::TRANSITION_DEFAULT; - static const F32Seconds LLEnvironment::TRANSITION_SLOW; + static const F32Seconds TRANSITION_INSTANT; + static const F32Seconds TRANSITION_FAST; + static const F32Seconds TRANSITION_DEFAULT; + static const F32Seconds TRANSITION_SLOW; typedef boost::signals2::connection connection_t; -- cgit v1.2.3 From b37eb2642f6e6e4d1e32a49c7ab31f70321cd979 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 10 Nov 2017 16:17:25 -0800 Subject: Remove delete preset dialog, Initial settings for selection level (Region/Parcel/Local) --- indra/newview/llenvironment.h | 88 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 76 insertions(+), 12 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 13985bbc94..ce8c08f692 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -51,6 +51,14 @@ public: static const F32Seconds TRANSITION_DEFAULT; static const F32Seconds TRANSITION_SLOW; + enum EnvSelection_t + { + ENV_LOCAL, + ENV_PARCEL, + ENV_REGION, + ENV_END + }; + typedef boost::signals2::connection connection_t; class UserPrefs @@ -92,8 +100,11 @@ public: virtual ~LLEnvironment(); void loadPreferences(); + void updatePreferences(); const UserPrefs & getPreferences() const { return mUserPrefs; } + bool canEdit() const; + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } @@ -104,19 +115,46 @@ public: void addSky(const LLSettingsSky::ptr_t &sky); void addWater(const LLSettingsWater::ptr_t &sky); - void addDayCycle(const LLSettingsDayCycle::ptr_t &day); + void addDayCycle(const LLSettingsDay::ptr_t &day); void selectSky(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); void selectSky(const LLSettingsSky::ptr_t &sky, F32Seconds transition = TRANSITION_DEFAULT); - void applySky(const LLSettingsSky::ptr_t &sky = LLSettingsSky::ptr_t()); void selectWater(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); void selectWater(const LLSettingsWater::ptr_t &water, F32Seconds transition = TRANSITION_DEFAULT); - void applyWater(const LLSettingsWater::ptr_t water = LLSettingsWater::ptr_t()); void selectDayCycle(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); - void selectDayCycle(const LLSettingsDayCycle::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); - void applyDayCycle(const LLSettingsDayCycle::ptr_t &daycycle = LLSettingsDayCycle::ptr_t()); - void clearAllSelected(); - void applyAllSelected(); + void selectDayCycle(const LLSettingsDay::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); + + void setUserSky(const LLSettingsSky::ptr_t &sky) + { + setSkyFor(ENV_LOCAL, sky); + } + void setUserWater(const LLSettingsWater::ptr_t &water) + { + setWaterFor(ENV_LOCAL, water); + } + void setUserDaycycle(const LLSettingsDay::ptr_t &day) + { + setDayFor(ENV_LOCAL, day); + } + + void setSelectedEnvironment(EnvSelection_t env); + EnvSelection_t getSelectedEnvironment() const + { + return mSelectedEnvironment; + } + void applyChosenEnvironment(); + LLSettingsSky::ptr_t getChosenSky() const; + LLSettingsWater::ptr_t getChosenWater() const; + LLSettingsDay::ptr_t getChosenDay() const; + + void setSkyFor(EnvSelection_t env, const LLSettingsSky::ptr_t &sky); + LLSettingsSky::ptr_t getSkyFor(EnvSelection_t env) const; + void setWaterFor(EnvSelection_t env, const LLSettingsWater::ptr_t &water); + LLSettingsWater::ptr_t getWaterFor(EnvSelection_t env) const; + void setDayFor(EnvSelection_t env, const LLSettingsDay::ptr_t &day); + LLSettingsDay::ptr_t getDayFor(EnvSelection_t env) const; + + void clearUserSettings(); list_name_id_t getSkyList() const; list_name_id_t getWaterList() const; @@ -124,7 +162,7 @@ public: LLSettingsSky::ptr_t findSkyByName(std::string name) const; LLSettingsWater::ptr_t findWaterByName(std::string name) const; - LLSettingsDayCycle::ptr_t findDayCycleByName(std::string name) const; + LLSettingsDay::ptr_t findDayCycleByName(std::string name) const; inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } @@ -145,6 +183,8 @@ public: connection_t setWaterListChange(const change_signal_t::slot_type& cb); connection_t setDayCycleListChange(const change_signal_t::slot_type& cb); + void requestRegionEnvironment(); + void onLegacyRegionSettings(LLSD data); protected: @@ -160,14 +200,38 @@ private: LLSettingsSky::ptr_t mSelectedSky; LLSettingsWater::ptr_t mSelectedWater; - LLSettingsDayCycle::ptr_t mSelectedDayCycle; + LLSettingsDay::ptr_t mSelectedDay; - LLSettingsBlender::ptr_t mBlenderSky; - LLSettingsBlender::ptr_t mBlenderWater; + LLSettingsBlender::ptr_t mBlenderSky; + LLSettingsBlender::ptr_t mBlenderWater; LLSettingsSky::ptr_t mCurrentSky; LLSettingsWater::ptr_t mCurrentWater; - LLSettingsDayCycle::ptr_t mCurrentDayCycle; + LLSettingsDay::ptr_t mCurrentDay; + + EnvSelection_t mSelectedEnvironment; + + typedef std::vector SkyList_t; + typedef std::vector WaterList_t; + typedef std::vector DayList_t; + + SkyList_t mSetSkys; + WaterList_t mSetWater; + DayList_t mSetDays; + +#if 0 + LLSettingsSky::ptr_t mRegionFixedSky; + LLSettingsWater::ptr_t mRegionFixedWater; + LLSettingsDay::ptr_t mRegionDay; + + LLSettingsSky::ptr_t mParcelFixedSky; + LLSettingsWater::ptr_t mParcelFixedWater; + LLSettingsDay::ptr_t mParcelDay; + + LLSettingsSky::ptr_t mUserSky; + LLSettingsWater::ptr_t mUserWater; + LLSettingsDay::ptr_t mUserDay; +#endif namedSettingMap_t mSkysByName; AssetSettingMap_t mSkysById; -- cgit v1.2.3 From d7dd10b88bc3fda88f6528ecc5936e4889f019f3 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 30 Nov 2017 11:32:22 -0800 Subject: Split for viewer/simhost sync LLSD with simhost. --- indra/newview/llenvironment.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index ce8c08f692..4d3d1f6a57 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -27,6 +27,7 @@ #ifndef LL_ENVIRONMENT_H #define LL_ENVIRONMENT_H +#include "llsingleton.h" #include "llmemory.h" #include "llsd.h" @@ -35,6 +36,8 @@ #include "llsettingswater.h" #include "llsettingsdaycycle.h" +#include + //------------------------------------------------------------------------- class LLViewerCamera; class LLGLSLShader; -- cgit v1.2.3 From 8211f57205f0008d8ffb9bfcd465ca26d906e19c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 8 Jan 2018 15:10:25 -0800 Subject: MAINT-7699: Deliver new settings to viewer via cap --- indra/newview/llenvironment.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 4d3d1f6a57..9e9c05b194 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -181,6 +181,10 @@ public: inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } + inline S64Seconds getDayLength() const { return mDayLength; } + void setDayLength(S64Seconds seconds); + inline S64Seconds getDayOffset() const { return mDayOffset; } + void setDayOffset(S64Seconds seconds); //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); connection_t setWaterListChange(const change_signal_t::slot_type& cb); @@ -190,6 +194,13 @@ public: void onLegacyRegionSettings(LLSD data); + void requestRegion(); + void updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void resetRegion(); + void requestParcel(const LLUUID &parcel_id); + void updateParcel(const LLUUID &parcel_id, LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void resetParcel(const LLUUID &parcel_id); + protected: virtual void initSingleton(); @@ -254,6 +265,9 @@ private: change_signal_t mWaterListChange; change_signal_t mDayCycleListChange; + S64Seconds mDayLength; + S64Seconds mDayOffset; + void onSkyTransitionDone(const LLSettingsBlender::ptr_t &blender); void onWaterTransitionDone(const LLSettingsBlender::ptr_t &blender); @@ -278,6 +292,12 @@ private: void onRegionChange(); + void coroRequestEnvironment(LLUUID parcel_id); + void coroUpdateEnvironment(LLUUID parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset); + void coroResetEnvironment(LLUUID parcel_id); + + void applyEnvironment(LLSD environment); + //========================================================================= void legacyLoadAllPresets(); LLSD legacyLoadPreset(const std::string& path); -- cgit v1.2.3 From a0c228d84240a80437b63e0a2cd1cee24e8004a0 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 16 Jan 2018 11:03:26 -0800 Subject: MAINT-8052: Report if the returned environment is the default. --- indra/newview/llenvironment.h | 22 +++++----------------- 1 file changed, 5 insertions(+), 17 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 9e9c05b194..4f8850683e 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -99,6 +99,7 @@ public: typedef std::pair name_id_t; typedef std::vector list_name_id_t; typedef boost::signals2::signal change_signal_t; + typedef boost::function environment_apply_fn; virtual ~LLEnvironment(); @@ -233,20 +234,6 @@ private: WaterList_t mSetWater; DayList_t mSetDays; -#if 0 - LLSettingsSky::ptr_t mRegionFixedSky; - LLSettingsWater::ptr_t mRegionFixedWater; - LLSettingsDay::ptr_t mRegionDay; - - LLSettingsSky::ptr_t mParcelFixedSky; - LLSettingsWater::ptr_t mParcelFixedWater; - LLSettingsDay::ptr_t mParcelDay; - - LLSettingsSky::ptr_t mUserSky; - LLSettingsWater::ptr_t mUserWater; - LLSettingsDay::ptr_t mUserDay; -#endif - namedSettingMap_t mSkysByName; AssetSettingMap_t mSkysById; @@ -291,10 +278,11 @@ private: void updateCloudScroll(); void onRegionChange(); + void onParcelChange(); - void coroRequestEnvironment(LLUUID parcel_id); - void coroUpdateEnvironment(LLUUID parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset); - void coroResetEnvironment(LLUUID parcel_id); + void coroRequestEnvironment(LLUUID parcel_id, environment_apply_fn apply); + void coroUpdateEnvironment(LLUUID parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset, environment_apply_fn apply); + void coroResetEnvironment(LLUUID parcel_id, environment_apply_fn apply); void applyEnvironment(LLSD environment); -- cgit v1.2.3 From 1b8c2b5ebbe0d42f147730bc9b6528fa8c6796ce Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 23 Jan 2018 08:54:34 -0800 Subject: MAINT-8052: Initial support for new EEP cap --- indra/newview/llenvironment.h | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 4f8850683e..f5bd9be870 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -54,6 +54,23 @@ public: static const F32Seconds TRANSITION_DEFAULT; static const F32Seconds TRANSITION_SLOW; + struct EnvironmentInfo + { + EnvironmentInfo(); + + typedef boost::shared_ptr ptr_t; + + LLUUID mParcelId; + S64Seconds mDayLength; + S64Seconds mDayOffset; + LLSD mDaycycleData; + LLSD mAltitudes; + bool mIsDefault; + + static ptr_t extract(LLSD); + + }; + enum EnvSelection_t { ENV_LOCAL, @@ -99,7 +116,7 @@ public: typedef std::pair name_id_t; typedef std::vector list_name_id_t; typedef boost::signals2::signal change_signal_t; - typedef boost::function environment_apply_fn; + typedef boost::function environment_apply_fn; virtual ~LLEnvironment(); @@ -198,9 +215,11 @@ public: void requestRegion(); void updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); void resetRegion(); - void requestParcel(const LLUUID &parcel_id); - void updateParcel(const LLUUID &parcel_id, LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); - void resetParcel(const LLUUID &parcel_id); + void requestParcel(S32 parcel_id); + void updateParcel(S32 parcel_id, LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void resetParcel(S32 parcel_id); + + void selectAgentEnvironment(); protected: virtual void initSingleton(); @@ -280,11 +299,11 @@ private: void onRegionChange(); void onParcelChange(); - void coroRequestEnvironment(LLUUID parcel_id, environment_apply_fn apply); - void coroUpdateEnvironment(LLUUID parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset, environment_apply_fn apply); - void coroResetEnvironment(LLUUID parcel_id, environment_apply_fn apply); + void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); + void coroUpdateEnvironment(S32 parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset, environment_apply_fn apply); + void coroResetEnvironment(S32 parcel_id, environment_apply_fn apply); - void applyEnvironment(LLSD environment); + void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); //========================================================================= void legacyLoadAllPresets(); -- cgit v1.2.3 From fbd8a98300277bdbc1885c25eea290560fd8c6c1 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 25 Jan 2018 17:21:25 -0800 Subject: Selects correct day cycle. Fix an error validating legacy daycycles. --- indra/newview/llenvironment.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index f5bd9be870..451bab5f9e 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -60,12 +60,16 @@ public: typedef boost::shared_ptr ptr_t; - LLUUID mParcelId; + S32 mParcelId; + LLUUID mRegionId; S64Seconds mDayLength; S64Seconds mDayOffset; + size_t mDayHash; LLSD mDaycycleData; LLSD mAltitudes; bool mIsDefault; + bool mIsRegion; + static ptr_t extract(LLSD); @@ -296,7 +300,6 @@ private: void updateCloudScroll(); - void onRegionChange(); void onParcelChange(); void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); -- cgit v1.2.3 From 0bf50e2f8cfa5f3ccd6165ce935cf0fd9c174ced Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 30 Jan 2018 16:42:34 -0800 Subject: Cleanup on daycyle selection and stack. Move blenders into environment. (Transition bronken, instant only. Shaddows moved based on region, not parcel) --- indra/newview/llenvironment.h | 149 +++++++++++++++++++++++++----------------- 1 file changed, 90 insertions(+), 59 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 451bab5f9e..4230f76862 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -77,9 +77,11 @@ public: enum EnvSelection_t { + ENV_EDIT, ENV_LOCAL, ENV_PARCEL, ENV_REGION, + ENV_DEFAULT, ENV_END }; @@ -116,6 +118,8 @@ public: std::string mDayCycleName; }; + typedef std::pair fixedEnvironment_t; + typedef std::map namedSettingMap_t; typedef std::pair name_id_t; typedef std::vector list_name_id_t; @@ -130,56 +134,35 @@ public: bool canEdit() const; - LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentSky; } - LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentWater; } + LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } + LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } void update(const LLViewerCamera * cam); void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); - void addSky(const LLSettingsSky::ptr_t &sky); - void addWater(const LLSettingsWater::ptr_t &sky); - void addDayCycle(const LLSettingsDay::ptr_t &day); + void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT); + EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; } - void selectSky(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); - void selectSky(const LLSettingsSky::ptr_t &sky, F32Seconds transition = TRANSITION_DEFAULT); - void selectWater(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); - void selectWater(const LLSettingsWater::ptr_t &water, F32Seconds transition = TRANSITION_DEFAULT); - void selectDayCycle(const std::string &name, F32Seconds transition = TRANSITION_DEFAULT); - void selectDayCycle(const LLSettingsDay::ptr_t &daycycle, F32Seconds transition = TRANSITION_DEFAULT); + bool hasEnvironment(EnvSelection_t env); + void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); + void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed); + void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } + void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } + void clearEnvironment(EnvSelection_t env); + LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); + S64Seconds getEnvironmentDayLength(EnvSelection_t env); + S64Seconds getEnvironmentDayOffset(EnvSelection_t env); + fixedEnvironment_t getEnvironmentFixed(EnvSelection_t env); + LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env) { return getEnvironmentFixed(env).first; }; + LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env) { return getEnvironmentFixed(env).second; }; - void setUserSky(const LLSettingsSky::ptr_t &sky) - { - setSkyFor(ENV_LOCAL, sky); - } - void setUserWater(const LLSettingsWater::ptr_t &water) - { - setWaterFor(ENV_LOCAL, water); - } - void setUserDaycycle(const LLSettingsDay::ptr_t &day) - { - setDayFor(ENV_LOCAL, day); - } + void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT); - void setSelectedEnvironment(EnvSelection_t env); - EnvSelection_t getSelectedEnvironment() const - { - return mSelectedEnvironment; - } - void applyChosenEnvironment(); - LLSettingsSky::ptr_t getChosenSky() const; - LLSettingsWater::ptr_t getChosenWater() const; - LLSettingsDay::ptr_t getChosenDay() const; - - void setSkyFor(EnvSelection_t env, const LLSettingsSky::ptr_t &sky); - LLSettingsSky::ptr_t getSkyFor(EnvSelection_t env) const; - void setWaterFor(EnvSelection_t env, const LLSettingsWater::ptr_t &water); - LLSettingsWater::ptr_t getWaterFor(EnvSelection_t env) const; - void setDayFor(EnvSelection_t env, const LLSettingsDay::ptr_t &day); - LLSettingsDay::ptr_t getDayFor(EnvSelection_t env) const; - - void clearUserSettings(); + void addSky(const LLSettingsSky::ptr_t &sky); + void addWater(const LLSettingsWater::ptr_t &sky); + void addDayCycle(const LLSettingsDay::ptr_t &day); list_name_id_t getSkyList() const; list_name_id_t getWaterList() const; @@ -199,14 +182,10 @@ public: inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } - inline LLVector4 getLightDirection() const { return LLVector4(mCurrentSky->getLightDirection(), 0.0f); } - inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentSky->getClampedLightDirection(), 0.0f); } + inline LLVector4 getLightDirection() const { return ((mCurrentEnvironment->getSky()) ? LLVector4(mCurrentEnvironment->getSky()->getLightDirection(), 0.0f) : LLVector4()); } + inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentEnvironment->getSky()->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } - inline S64Seconds getDayLength() const { return mDayLength; } - void setDayLength(S64Seconds seconds); - inline S64Seconds getDayOffset() const { return mDayOffset; } - void setDayOffset(S64Seconds seconds); //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); connection_t setWaterListChange(const change_signal_t::slot_type& cb); @@ -229,6 +208,62 @@ protected: virtual void initSingleton(); private: + class DayInstance + { + public: + enum InstanceType_t + { + TYPE_INVALID, + TYPE_FIXED, + TYPE_CYCLED + }; + typedef boost::shared_ptr ptr_t; + + DayInstance(); + + void update(F64Seconds); + + void setDay(const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); + void setSky(const LLSettingsSky::ptr_t &psky); + void setWater(const LLSettingsWater::ptr_t &pwater); + + void initialize(); + bool isInitialized(); + + void clear(); + + LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; } + LLSettingsSky::ptr_t getSky() const { return mSky; } + LLSettingsWater::ptr_t getWater() const { return mWater; } + S64Seconds getDayLength() const { return mDayLength; } + S64Seconds getDayOffset() const { return mDayOffset; } + + void animate(); + + void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); + + private: + LLSettingsDay::ptr_t mDayCycle; + LLSettingsSky::ptr_t mSky; + LLSettingsWater::ptr_t mWater; + + InstanceType_t mType; + bool mInitialized; + + S64Seconds mDayLength; + S64Seconds mDayOffset; + + LLSettingsBlender::ptr_t mBlenderSky; + LLSettingsBlender::ptr_t mBlenderWater; + + + F64 secondsToKeyframe(S64Seconds seconds); + + void onTrackTransitionDone(S32 trackno, const LLSettingsBlender::ptr_t &blender); + }; + typedef std::array InstanceArray_t; + + static const F32 SUN_DELTA_YAW; static const F32 NIGHTTIME_ELEVATION_COS; @@ -236,6 +271,11 @@ private: LLVector2 mCloudScrollDelta; // cumulative cloud delta + InstanceArray_t mEnvironments; + + EnvSelection_t mSelectedEnvironment; + DayInstance::ptr_t mCurrentEnvironment; + LLSettingsSky::ptr_t mSelectedSky; LLSettingsWater::ptr_t mSelectedWater; LLSettingsDay::ptr_t mSelectedDay; @@ -243,20 +283,12 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - LLSettingsSky::ptr_t mCurrentSky; - LLSettingsWater::ptr_t mCurrentWater; LLSettingsDay::ptr_t mCurrentDay; - EnvSelection_t mSelectedEnvironment; - typedef std::vector SkyList_t; typedef std::vector WaterList_t; typedef std::vector DayList_t; - SkyList_t mSetSkys; - WaterList_t mSetWater; - DayList_t mSetDays; - namedSettingMap_t mSkysByName; AssetSettingMap_t mSkysById; @@ -275,11 +307,9 @@ private: change_signal_t mWaterListChange; change_signal_t mDayCycleListChange; - S64Seconds mDayLength; - S64Seconds mDayOffset; + DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); - void onSkyTransitionDone(const LLSettingsBlender::ptr_t &blender); - void onWaterTransitionDone(const LLSettingsBlender::ptr_t &blender); + DayInstance::ptr_t getSelectedEnvironmentInstance(); //void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); @@ -308,6 +338,7 @@ private: void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); + void onTransitionDone(const LLSettingsBlender::ptr_t &, bool isSky); //========================================================================= void legacyLoadAllPresets(); LLSD legacyLoadPreset(const std::string& path); -- cgit v1.2.3 From f07e5ee2a4907b9488a67a13db794c770878e648 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 5 Feb 2018 15:12:23 -0800 Subject: Transitions between skys. 1 --- indra/newview/llenvironment.h | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 4230f76862..2b045e483c 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -220,8 +220,9 @@ private: typedef boost::shared_ptr ptr_t; DayInstance(); + virtual ~DayInstance() { }; - void update(F64Seconds); + virtual void update(F64Seconds); void setDay(const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); void setSky(const LLSettingsSky::ptr_t &psky); @@ -238,11 +239,11 @@ private: S64Seconds getDayLength() const { return mDayLength; } S64Seconds getDayOffset() const { return mDayOffset; } - void animate(); + virtual void animate(); void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); - private: + protected: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; @@ -256,14 +257,31 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - F64 secondsToKeyframe(S64Seconds seconds); - void onTrackTransitionDone(S32 trackno, const LLSettingsBlender::ptr_t &blender); + void onTrackTransitionDone(S32 trackno, const LLSettingsBlender::ptr_t blender); }; typedef std::array InstanceArray_t; + class DayTransition : public DayInstance + { + public: + DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, S64Seconds time); + virtual ~DayTransition() { }; + + virtual void update(F64Seconds); + virtual void animate(); + + protected: + LLSettingsSky::ptr_t mStartSky; + LLSettingsWater::ptr_t mStartWater; + DayInstance::ptr_t mNextInstance; + S64Seconds mTransitionTime; + + void onTransitonDone(S32 trackno, const LLSettingsBlender::ptr_t blender); + }; + static const F32 SUN_DELTA_YAW; static const F32 NIGHTTIME_ELEVATION_COS; @@ -283,8 +301,6 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - LLSettingsDay::ptr_t mCurrentDay; - typedef std::vector SkyList_t; typedef std::vector WaterList_t; typedef std::vector DayList_t; @@ -338,7 +354,7 @@ private: void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); - void onTransitionDone(const LLSettingsBlender::ptr_t &, bool isSky); + void onTransitionDone(const LLSettingsBlender::ptr_t, bool isSky); //========================================================================= void legacyLoadAllPresets(); LLSD legacyLoadPreset(const std::string& path); -- cgit v1.2.3 From 7838189843ff3b9c800e458b2452943edbc202ea Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 6 Feb 2018 17:27:56 -0800 Subject: boost->std & same level interp --- indra/newview/llenvironment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 2b045e483c..06bcd368dd 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -58,7 +58,7 @@ public: { EnvironmentInfo(); - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; S32 mParcelId; LLUUID mRegionId; @@ -217,7 +217,7 @@ private: TYPE_FIXED, TYPE_CYCLED }; - typedef boost::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; DayInstance(); virtual ~DayInstance() { }; -- cgit v1.2.3 From e9edd37cdb39639e1ab24e2e63d4f83432282c88 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 9 Feb 2018 10:10:13 -0800 Subject: Update a couple constructs --- indra/newview/llenvironment.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 06bcd368dd..a7159ca84d 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -124,7 +124,7 @@ public: typedef std::pair name_id_t; typedef std::vector list_name_id_t; typedef boost::signals2::signal change_signal_t; - typedef boost::function environment_apply_fn; + typedef std::function environment_apply_fn; virtual ~LLEnvironment(); @@ -278,8 +278,6 @@ private: LLSettingsWater::ptr_t mStartWater; DayInstance::ptr_t mNextInstance; S64Seconds mTransitionTime; - - void onTransitonDone(S32 trackno, const LLSettingsBlender::ptr_t blender); }; static const F32 SUN_DELTA_YAW; -- cgit v1.2.3 From 79e4a8c28ad29b028ddb907a6ea01f4ef71e822a Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Wed, 14 Mar 2018 00:11:19 +0100 Subject: Fix up atmospheric helpers and transport shader for adv atmo path. Basic hook-up of sky settings to llatmosphere model. Moved mie aniso to be a top-level setting instead of a per-mie-layer setting. --- indra/newview/llenvironment.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index a7159ca84d..55ade803ac 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -41,6 +41,7 @@ //------------------------------------------------------------------------- class LLViewerCamera; class LLGLSLShader; +class AtmosphericModelSettings; //------------------------------------------------------------------------- class LLEnvironment : public LLSingleton @@ -137,6 +138,8 @@ public: LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } + static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky); + void update(const LLViewerCamera * cam); void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); -- cgit v1.2.3 From cf0e4f79f52b4fb24769aa6e355ec8c95c6d2afc Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 27 Apr 2018 17:12:13 -0700 Subject: Adding fixed water edit dialog. --- indra/newview/llenvironment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index a7159ca84d..95b24314cb 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -82,7 +82,8 @@ public: ENV_PARCEL, ENV_REGION, ENV_DEFAULT, - ENV_END + ENV_END, + ENV_CURRENT = -1 }; typedef boost::signals2::connection connection_t; -- cgit v1.2.3 From 438609699b838924becee89fa9d8ec83552f3236 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 30 Apr 2018 16:37:08 -0700 Subject: New water settings dialog. --- indra/newview/llenvironment.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 95b24314cb..cb6cd11608 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -143,7 +143,7 @@ public: void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); - void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT); + void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT, bool forced = false); EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; } bool hasEnvironment(EnvSelection_t env); @@ -159,7 +159,7 @@ public: LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env) { return getEnvironmentFixed(env).first; }; LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env) { return getEnvironmentFixed(env).second; }; - void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT); + void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT, bool forced = false); void addSky(const LLSettingsSky::ptr_t &sky); void addWater(const LLSettingsWater::ptr_t &sky); @@ -187,6 +187,9 @@ public: inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentEnvironment->getSky()->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } + static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename); + static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); + //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); connection_t setWaterListChange(const change_signal_t::slot_type& cb); @@ -356,7 +359,7 @@ private: void onTransitionDone(const LLSettingsBlender::ptr_t, bool isSky); //========================================================================= void legacyLoadAllPresets(); - LLSD legacyLoadPreset(const std::string& path); + static LLSD legacyLoadPreset(const std::string& path); static std::string getSysDir(const std::string &subdir); static std::string getUserDir(const std::string &subdir); -- cgit v1.2.3 From 3e33fc9130cdd5dc63cc6cc7b9f0e38b6e552f12 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 3 May 2018 14:59:29 -0700 Subject: Inventory context menus and increment attrib for settings panels. --- indra/newview/llenvironment.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index cb6cd11608..d8cb61d0bb 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -134,6 +134,8 @@ public: const UserPrefs & getPreferences() const { return mUserPrefs; } bool canEdit() const; + bool isExtendedEnvironmentEnabled() const; + bool isInventoryEnabled() const; LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } -- cgit v1.2.3 From c238fa3ac5a3f93dcbf95e3cf7a7f8b576ab751c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 8 May 2018 16:57:14 -0700 Subject: Add save/update functionality hooks to fixed editor. --- indra/newview/llenvironment.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d8cb61d0bb..ad7d93c3c8 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -151,6 +151,7 @@ public: bool hasEnvironment(EnvSelection_t env); void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed); + void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed); void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } void clearEnvironment(EnvSelection_t env); -- cgit v1.2.3 From 430c5cd23558ba42c7da0e31845a3677e66f1fed Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 17 May 2018 16:16:33 -0700 Subject: Self contained looping track blender. Will blend over time across an entire track in a day cycle. --- indra/newview/llenvironment.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index ad7d93c3c8..e21f46d5b0 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -240,11 +240,14 @@ private: void clear(); + void setSkyTrack(S32 trackno); + LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; } LLSettingsSky::ptr_t getSky() const { return mSky; } LLSettingsWater::ptr_t getWater() const { return mWater; } S64Seconds getDayLength() const { return mDayLength; } S64Seconds getDayOffset() const { return mDayOffset; } + S32 getSkyTrack() const { return mSkyTrack; } virtual void animate(); @@ -254,6 +257,7 @@ private: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; + S32 mSkyTrack; InstanceType_t mType; bool mInitialized; @@ -265,8 +269,6 @@ private: LLSettingsBlender::ptr_t mBlenderWater; F64 secondsToKeyframe(S64Seconds seconds); - - void onTrackTransitionDone(S32 trackno, const LLSettingsBlender::ptr_t blender); }; typedef std::array InstanceArray_t; @@ -359,7 +361,6 @@ private: void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); - void onTransitionDone(const LLSettingsBlender::ptr_t, bool isSky); //========================================================================= void legacyLoadAllPresets(); static LLSD legacyLoadPreset(const std::string& path); -- cgit v1.2.3 From 39fb9cc9b4221b6fb715e9f59ae5512b76baa1ba Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 18 May 2018 00:23:58 +0100 Subject: Fix Mie Config validation in sky settings. Start cleanup of heavenly body rendering. --- indra/newview/llenvironment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 2d3174306b..417e6d35c1 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -189,7 +189,7 @@ public: inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } - inline LLVector4 getLightDirection() const { return ((mCurrentEnvironment->getSky()) ? LLVector4(mCurrentEnvironment->getSky()->getLightDirection(), 0.0f) : LLVector4()); } + inline LLVector4 getLightDirection() const { return ((mCurrentEnvironment->getSky()) ? LLVector4(mCurrentEnvironment->getSky()->getLightDirection(), 0.0f) : LLVector4(0, 0, 1, 0)); } inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentEnvironment->getSky()->getClampedLightDirection(), 0.0f); } inline LLVector4 getRotatedLight() const { return mRotatedLight; } -- cgit v1.2.3 From 4c1a633c232880f4ac6e01807f1084e5d5c68b1e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 18 May 2018 13:27:11 -0700 Subject: Day cycle editor changes for loading settings. (Not complete) --- indra/newview/llenvironment.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index e21f46d5b0..fb3bb9f051 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -77,13 +77,14 @@ public: enum EnvSelection_t { - ENV_EDIT, + ENV_EDIT = 0, ENV_LOCAL, ENV_PARCEL, ENV_REGION, ENV_DEFAULT, ENV_END, - ENV_CURRENT = -1 + ENV_CURRENT = -1, + ENV_NONE = -2 }; typedef boost::signals2::connection connection_t; -- cgit v1.2.3 From 8082cb86682c008389cb8127f295e6566ec368e5 Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Fri, 18 May 2018 23:14:56 +0100 Subject: Make nighttime elev constant _SIN, since it uses a sin value. Put that constant in sky settings and eliminate dups. Fix up logic around when to use heavenly bodies (fix broken moon in basic sky). Remove unnecessary clip to horizon. Put in temp code to ena/dis sun/moon based on LLEnvironment::getIsDaytime(). --- indra/newview/llenvironment.h | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 30286d54fd..e4f891deca 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -293,7 +293,6 @@ private: }; static const F32 SUN_DELTA_YAW; - static const F32 NIGHTTIME_ELEVATION_COS; typedef std::map AssetSettingMap_t; -- cgit v1.2.3 From ae5f24eb4d8a215cc26ef45ababc6ddec8f28edb Mon Sep 17 00:00:00 2001 From: "Graham Linden graham@lindenlab.com" Date: Mon, 21 May 2018 19:10:32 +0100 Subject: Make rendering of sun / moon work with both in the sky (test visibility independently). --- indra/newview/llenvironment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index e4f891deca..0de92dc50b 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -183,8 +183,8 @@ public: F32 getCamHeight() const; F32 getWaterHeight() const; - bool getIsDayTime() const; // "Day Time" is defined as the sun above the horizon. - bool getIsNightTime() const { return !getIsDayTime(); } // "Not Day Time" + bool getIsSunUp() const; + bool getIsMoonUp() const; inline F32 getSceneLightStrength() const { return mSceneLightStrength; } inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } -- cgit v1.2.3 From 044b80e4e1a7b55f46e6f3b52c9cae6d9c6df3eb Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 May 2018 10:49:55 -0700 Subject: Manual blender for use in day editing dialog. --- indra/newview/llenvironment.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index fb3bb9f051..9f9eb614a4 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -155,6 +155,7 @@ public: void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed); void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } + void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); } void clearEnvironment(EnvSelection_t env); LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); S64Seconds getEnvironmentDayLength(EnvSelection_t env); @@ -370,6 +371,27 @@ private: }; +class LLTrackBlenderLoopingManual : public LLSettingsBlender +{ +public: + LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno); + + F64 setPosition(F64 position) override; + void switchTrack(S32 trackno, F64 position = -1.0); + S32 getTrack() const { return mTrackNo; } + + typedef std::shared_ptr ptr_t; +protected: + LLSettingsDay::TrackBound_t getBoundingEntries(F64 position); + F64 getSpanLength(const LLSettingsDay::TrackBound_t &bounds) const; + +private: + LLSettingsDay::ptr_t mDay; + S32 mTrackNo; + F64 mPosition; + + LLSettingsDay::CycleTrack_t::iterator mEndMarker; +}; #endif // LL_ENVIRONMENT_H -- cgit v1.2.3 From b29aa01056a1ea08d1d29dd610f6a1cd0aadcd9b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 May 2018 16:54:04 -0700 Subject: Enable save/load/import for day edit. --- indra/newview/llenvironment.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 9f9eb614a4..e8e5a74196 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -194,6 +194,7 @@ public: static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename); static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); + static LLSettingsDay::ptr_t createDayCycleFromLegacyPreset(const std::string filename); //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); -- cgit v1.2.3 From fa4ac065cb332c8c90fb59eeff0b983a1fd56691 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 24 May 2018 13:11:33 -0700 Subject: Enable sky changes with altitude. --- indra/newview/llenvironment.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index e8e5a74196..cdfac34d90 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -53,6 +53,7 @@ public: static const F32Seconds TRANSITION_FAST; static const F32Seconds TRANSITION_DEFAULT; static const F32Seconds TRANSITION_SLOW; + static const F32Seconds TRANSITION_ALTITUDE; struct EnvironmentInfo { @@ -214,6 +215,8 @@ public: void selectAgentEnvironment(); + S32 calculateSkyTrackForAltitude(F64 altitude); + protected: virtual void initSingleton(); @@ -267,6 +270,7 @@ private: S64Seconds mDayLength; S64Seconds mDayOffset; + S32 mLastTrackAltitude; LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; @@ -333,6 +337,8 @@ private: change_signal_t mWaterListChange; change_signal_t mDayCycleListChange; + S32 mCurrentTrack; + DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); DayInstance::ptr_t getSelectedEnvironmentInstance(); @@ -364,6 +370,7 @@ private: void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); + void onAgentPositionHasChanged(const LLVector3 &localpos); //========================================================================= void legacyLoadAllPresets(); static LLSD legacyLoadPreset(const std::string& path); @@ -378,7 +385,7 @@ public: LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno); F64 setPosition(F64 position) override; - void switchTrack(S32 trackno, F64 position = -1.0); + virtual void switchTrack(S32 trackno, F64 position) override; S32 getTrack() const { return mTrackNo; } typedef std::shared_ptr ptr_t; -- cgit v1.2.3 From acaf57100eade61262d73cf5b318c4545e921bd5 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 24 May 2018 17:09:01 -0700 Subject: switch track based on altitudes sent from region. --- indra/newview/llenvironment.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index cdfac34d90..398c97ebe9 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -61,18 +61,18 @@ public: typedef std::shared_ptr ptr_t; - S32 mParcelId; - LLUUID mRegionId; - S64Seconds mDayLength; - S64Seconds mDayOffset; - size_t mDayHash; - LLSD mDaycycleData; - LLSD mAltitudes; - bool mIsDefault; - bool mIsRegion; + S32 mParcelId; + LLUUID mRegionId; + S64Seconds mDayLength; + S64Seconds mDayOffset; + size_t mDayHash; + LLSD mDaycycleData; + std::array mAltitudes; + bool mIsDefault; + bool mIsRegion; - static ptr_t extract(LLSD); + static ptr_t extract(LLSD); }; @@ -338,6 +338,7 @@ private: change_signal_t mDayCycleListChange; S32 mCurrentTrack; + std::array mTrackAltitudes; DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); -- cgit v1.2.3 From 2ddad24c4d5e64711cdbffd98e290d3da8e9714a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 30 May 2018 17:08:28 -0700 Subject: Timeline behavior in day cycle edit. --- indra/newview/llenvironment.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 398c97ebe9..32ce99ccc9 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -129,6 +129,8 @@ public: typedef boost::signals2::signal change_signal_t; typedef std::function environment_apply_fn; + typedef std::array altitude_list_t; + virtual ~LLEnvironment(); void loadPreferences(); @@ -217,6 +219,8 @@ public: S32 calculateSkyTrackForAltitude(F64 altitude); + const altitude_list_t & getRegionAltitudes() const { return mTrackAltitudes; } + protected: virtual void initSingleton(); @@ -338,7 +342,7 @@ private: change_signal_t mDayCycleListChange; S32 mCurrentTrack; - std::array mTrackAltitudes; + altitude_list_t mTrackAltitudes; DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); -- cgit v1.2.3 From 64302d3000b69b31e72eb6a3bd8a981c80cb88de Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 00:18:36 +0100 Subject: Modify use of sky settings, reduce complexity, and name funcs to indicate coord systems in use. Fix class2 softenLightF shader. --- indra/newview/llenvironment.h | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 615318a4e6..27bb6e7fc2 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -188,15 +188,23 @@ public: bool getIsSunUp() const; bool getIsMoonUp() const; - inline F32 getSceneLightStrength() const { return mSceneLightStrength; } - inline void setSceneLightStrength(F32 light_strength) { mSceneLightStrength = light_strength; } + // Returns either sun or moon direction (depending on which is up and stronger) + // Light direction in +x right, +z up, +y at internal coord sys + LLVector3 getLightDirection() const; - inline LLVector4 getLightDirection() const { return ((mCurrentEnvironment->getSky()) ? LLVector4(mCurrentEnvironment->getSky()->getLightDirection(), 0.0f) : LLVector4(0, 0, 1, 0)); } - inline LLVector4 getClampedLightDirection() const { return LLVector4(mCurrentEnvironment->getSky()->getClampedLightDirection(), 0.0f); } - inline LLVector4 getRotatedLight() const { return mRotatedLight; } + // Returns light direction converted to CFR coord system + LLVector4 getLightDirectionCFR() const; + + // Returns light direction converted to OGL coord system + // and clamped above -0.1f in Y to avoid render artifacts in sky shaders + LLVector4 getClampedLightNorm() const; + + // Returns light direction converted to OGL coord system + // and rotated by last cam yaw needed by water rendering shaders + LLVector4 getRotatedLightNorm() const; static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename); - static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); + static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); @@ -220,6 +228,9 @@ protected: virtual void initSingleton(); private: + LLVector4 toCFR(const LLVector3 vec) const; + LLVector4 toLightNorm(const LLVector3 vec) const; + class DayInstance { public: @@ -295,6 +306,7 @@ private: }; static const F32 SUN_DELTA_YAW; + F32 mLastCamYaw = 0.0f; typedef std::map AssetSettingMap_t; @@ -325,9 +337,6 @@ private: namedSettingMap_t mDayCycleByName; AssetSettingMap_t mDayCycleById; - F32 mSceneLightStrength; - LLVector4 mRotatedLight; - UserPrefs mUserPrefs; change_signal_t mSkyListChange; -- cgit v1.2.3 From 8cfdc07e790a557e881fadaa1b6258e5b16751f4 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Fri, 1 Jun 2018 23:32:30 +0100 Subject: Code cleanup and move to using typedefs of S64Seconds/F64Seconds for ease in sync w/ sim side which has not llunits types. --- indra/newview/llenvironment.h | 48 +++++++++++++++++++++---------------------- 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 0fbc49bc7d..52f22ac8f1 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -62,15 +62,15 @@ public: typedef std::shared_ptr ptr_t; - S32 mParcelId; - LLUUID mRegionId; - S64Seconds mDayLength; - S64Seconds mDayOffset; - size_t mDayHash; - LLSD mDaycycleData; - std::array mAltitudes; - bool mIsDefault; - bool mIsRegion; + S32 mParcelId; + LLUUID mRegionId; + LLSettingsDay::Seconds mDayLength; + LLSettingsDay::Seconds mDayOffset; + size_t mDayHash; + LLSD mDaycycleData; + std::array mAltitudes; + bool mIsDefault; + bool mIsRegion; static ptr_t extract(LLSD); @@ -152,11 +152,11 @@ public: void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); - void setSelectedEnvironment(EnvSelection_t env, F64Seconds transition = TRANSITION_DEFAULT, bool forced = false); + void setSelectedEnvironment(EnvSelection_t env, LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; } bool hasEnvironment(EnvSelection_t env); - void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); + void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed); void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed); void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } @@ -164,13 +164,13 @@ public: void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); } void clearEnvironment(EnvSelection_t env); LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); - S64Seconds getEnvironmentDayLength(EnvSelection_t env); - S64Seconds getEnvironmentDayOffset(EnvSelection_t env); + LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env); + LLSettingsDay::Seconds getEnvironmentDayOffset(EnvSelection_t env); fixedEnvironment_t getEnvironmentFixed(EnvSelection_t env); LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env) { return getEnvironmentFixed(env).first; }; LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env) { return getEnvironmentFixed(env).second; }; - void updateEnvironment(F64Seconds transition = TRANSITION_DEFAULT, bool forced = false); + void updateEnvironment(LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); void addSky(const LLSettingsSky::ptr_t &sky); void addWater(const LLSettingsWater::ptr_t &sky); @@ -253,9 +253,9 @@ private: DayInstance(); virtual ~DayInstance() { }; - virtual void update(F64Seconds); + virtual void update(LLSettingsBase::Seconds); - void setDay(const LLSettingsDay::ptr_t &pday, S64Seconds daylength, S64Seconds dayoffset); + void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setSky(const LLSettingsSky::ptr_t &psky); void setWater(const LLSettingsWater::ptr_t &pwater); @@ -269,8 +269,8 @@ private: LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; } LLSettingsSky::ptr_t getSky() const { return mSky; } LLSettingsWater::ptr_t getWater() const { return mWater; } - S64Seconds getDayLength() const { return mDayLength; } - S64Seconds getDayOffset() const { return mDayOffset; } + LLSettingsDay::Seconds getDayLength() const { return mDayLength; } + LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; } S32 getSkyTrack() const { return mSkyTrack; } virtual void animate(); @@ -286,14 +286,14 @@ private: InstanceType_t mType; bool mInitialized; - S64Seconds mDayLength; - S64Seconds mDayOffset; + LLSettingsDay::Seconds mDayLength; + LLSettingsDay::Seconds mDayOffset; S32 mLastTrackAltitude; LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - F64 secondsToKeyframe(S64Seconds seconds); + F64 secondsToKeyframe(LLSettingsDay::Seconds seconds); }; typedef std::array InstanceArray_t; @@ -301,17 +301,17 @@ private: class DayTransition : public DayInstance { public: - DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, S64Seconds time); + DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, LLSettingsDay::Seconds time); virtual ~DayTransition() { }; - virtual void update(F64Seconds); + virtual void update(LLSettingsBase::Seconds); virtual void animate(); protected: LLSettingsSky::ptr_t mStartSky; LLSettingsWater::ptr_t mStartWater; DayInstance::ptr_t mNextInstance; - S64Seconds mTransitionTime; + LLSettingsDay::Seconds mTransitionTime; }; static const F32 SUN_DELTA_YAW; -- cgit v1.2.3 From 2a613d7363c4e91a7258d4f0ea3971db1569e788 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 1 Jun 2018 16:24:36 -0700 Subject: Rework preset loading and context menu from inventory. --- indra/newview/llenvironment.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 32ce99ccc9..7c8304a7ed 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -55,6 +55,14 @@ public: static const F32Seconds TRANSITION_SLOW; static const F32Seconds TRANSITION_ALTITUDE; + static const LLUUID KNOWN_SKY_DEFAULT; + static const LLUUID KNOWN_WATER_DEFAULT; + static const LLUUID KNOWN_DAY_DEFAULT; + static const LLUUID KNOWN_SKY_SUNRISE; + static const LLUUID KNOWN_SKY_MIDDAY; + static const LLUUID KNOWN_SKY_SUNSET; + static const LLUUID KNOWN_SKY_MIDNIGHT; + struct EnvironmentInfo { EnvironmentInfo(); @@ -159,6 +167,8 @@ public: void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); } + void setEnvironment(EnvSelection_t env, const LLUUID &assetId); + void clearEnvironment(EnvSelection_t env); LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); S64Seconds getEnvironmentDayLength(EnvSelection_t env); @@ -177,9 +187,11 @@ public: list_name_id_t getWaterList() const; list_name_id_t getDayCycleList() const; + // *LAPRAS* TODO : Remove these vvv LLSettingsSky::ptr_t findSkyByName(std::string name) const; LLSettingsWater::ptr_t findWaterByName(std::string name) const; LLSettingsDay::ptr_t findDayCycleByName(std::string name) const; + // *LAPRAS* TODO : Remove these ^^^ inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } @@ -376,9 +388,10 @@ private: void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); void onAgentPositionHasChanged(const LLVector3 &localpos); + + void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); //========================================================================= void legacyLoadAllPresets(); - static LLSD legacyLoadPreset(const std::string& path); static std::string getSysDir(const std::string &subdir); static std::string getUserDir(const std::string &subdir); -- cgit v1.2.3 From 7136956b90614bbd236be0e30231781c04346220 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Sat, 2 Jun 2018 23:28:48 +0100 Subject: Use more typedefs to simplify sync between viewer and sim env settings code. --- indra/newview/llenvironment.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 56be88f371..1be846b710 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -56,9 +56,6 @@ public: static const F32Seconds TRANSITION_SLOW; static const F32Seconds TRANSITION_ALTITUDE; - static const LLUUID KNOWN_SKY_DEFAULT; - static const LLUUID KNOWN_WATER_DEFAULT; - static const LLUUID KNOWN_DAY_DEFAULT; static const LLUUID KNOWN_SKY_SUNRISE; static const LLUUID KNOWN_SKY_MIDDAY; static const LLUUID KNOWN_SKY_SUNSET; @@ -413,8 +410,8 @@ class LLTrackBlenderLoopingManual : public LLSettingsBlender public: LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno); - F64 setPosition(F64 position) override; - virtual void switchTrack(S32 trackno, F64 position) override; + F64 setPosition(const LLSettingsBase::TrackPosition& position) override; + virtual void switchTrack(S32 trackno, const LLSettingsBase::TrackPosition& position) override; S32 getTrack() const { return mTrackNo; } typedef std::shared_ptr ptr_t; -- cgit v1.2.3 From cd8f0da2d187df69a99a665ea11faaa4e13b7a12 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Mon, 4 Jun 2018 23:12:21 +0100 Subject: Fix use of new typedefs in inventory settings code in llenvironment. --- indra/newview/llenvironment.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 1be846b710..b7a8ea84c4 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -262,7 +262,7 @@ private: DayInstance(); virtual ~DayInstance() { }; - virtual void update(LLSettingsBase::Seconds); + virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta); void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setSky(const LLSettingsSky::ptr_t &psky); @@ -302,7 +302,7 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - F64 secondsToKeyframe(LLSettingsDay::Seconds seconds); + LLSettingsBase::TrackPosition secondsToKeyframe(LLSettingsDay::Seconds seconds); }; typedef std::array InstanceArray_t; @@ -313,7 +313,7 @@ private: DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, LLSettingsDay::Seconds time); virtual ~DayTransition() { }; - virtual void update(LLSettingsBase::Seconds); + virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta); virtual void animate(); protected: @@ -410,7 +410,7 @@ class LLTrackBlenderLoopingManual : public LLSettingsBlender public: LLTrackBlenderLoopingManual(const LLSettingsBase::ptr_t &target, const LLSettingsDay::ptr_t &day, S32 trackno); - F64 setPosition(const LLSettingsBase::TrackPosition& position) override; + F64 setPosition(const LLSettingsBase::TrackPosition& position); virtual void switchTrack(S32 trackno, const LLSettingsBase::TrackPosition& position) override; S32 getTrack() const { return mTrackNo; } -- cgit v1.2.3 From b06803225bff30e863ea18cae1d33f42a4fd937e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 4 Jun 2018 16:50:13 -0700 Subject: Reconnect apply to region and parcel reconnected to interface. --- indra/newview/llenvironment.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7c8304a7ed..6382e0afd4 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -148,6 +148,8 @@ public: bool canEdit() const; bool isExtendedEnvironmentEnabled() const; bool isInventoryEnabled() const; + bool canAgentUpdateParcelEnvironment(bool useselected = false) const; + bool canAgentUpdateRegionEnvironment() const; LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } @@ -211,6 +213,9 @@ public: static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); static LLSettingsDay::ptr_t createDayCycleFromLegacyPreset(const std::string filename); + // Construct a new day cycle based on the environment. Replacing either the water or the sky tracks. + LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); + //------------------------------------------- connection_t setSkyListChange(const change_signal_t::slot_type& cb); connection_t setWaterListChange(const change_signal_t::slot_type& cb); @@ -221,10 +226,16 @@ public: void onLegacyRegionSettings(LLSD data); void requestRegion(); + void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset); void updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void updateRegion(LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); + void updateRegion(LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); void resetRegion(); void requestParcel(S32 parcel_id); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset); void updateParcel(S32 parcel_id, LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void updateParcel(S32 parcel_id, LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); + void updateParcel(S32 parcel_id, LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); void resetParcel(S32 parcel_id); void selectAgentEnvironment(); @@ -390,6 +401,8 @@ private: void onAgentPositionHasChanged(const LLVector3 &localpos); void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); + void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); + //========================================================================= void legacyLoadAllPresets(); static std::string getSysDir(const std::string &subdir); -- cgit v1.2.3 From 499993e3aa89f49412861a6b7daff8e0e6f1c196 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 5 Jun 2018 17:29:58 +0100 Subject: Restore dropped header include and make constness match sim code. --- indra/newview/llenvironment.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d79a1b408a..66950b0625 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -36,6 +36,8 @@ #include "llsettingswater.h" #include "llsettingsdaycycle.h" +#include "llatmosphere.h" + #include //------------------------------------------------------------------------- -- cgit v1.2.3 From 610a793aa8fb9f918fc25eeab02b7415ac18b33b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 5 Jun 2018 11:19:22 -0700 Subject: EOL in llsetingssky.cpp and llrender.cpp. const on ptr_t & in llenvironment --- indra/newview/llenvironment.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 66950b0625..8202564ce7 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -239,15 +239,15 @@ public: void requestRegion(); void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset); - void updateRegion(LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); - void updateRegion(LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); - void updateRegion(LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); + void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); + void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); void resetRegion(); void requestParcel(S32 parcel_id); void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); + void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); + void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); + void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); void resetParcel(S32 parcel_id); void selectAgentEnvironment(); -- cgit v1.2.3 From 97da85de0b1e0f8c2fc60c156c31b237b869230a Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 11 Jun 2018 11:43:50 -0700 Subject: remove legacy environmental edit floater and some lingering transition functions. Change floater environment switch behavior. --- indra/newview/llenvironment.h | 64 +++---------------------------------------- 1 file changed, 4 insertions(+), 60 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 8202564ce7..9da6de60ae 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -133,12 +133,11 @@ public: typedef std::pair fixedEnvironment_t; - typedef std::map namedSettingMap_t; - typedef std::pair name_id_t; - typedef std::vector list_name_id_t; - typedef boost::signals2::signal change_signal_t; typedef std::function environment_apply_fn; + typedef boost::signals2::signal environment_changed_signal_t; + typedef environment_changed_signal_t::slot_type environment_changed_fn; + typedef std::array altitude_list_t; virtual ~LLEnvironment(); @@ -185,20 +184,6 @@ public: void updateEnvironment(LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); - void addSky(const LLSettingsSky::ptr_t &sky); - void addWater(const LLSettingsWater::ptr_t &sky); - void addDayCycle(const LLSettingsDay::ptr_t &day); - - list_name_id_t getSkyList() const; - list_name_id_t getWaterList() const; - list_name_id_t getDayCycleList() const; - - // *LAPRAS* TODO : Remove these vvv - LLSettingsSky::ptr_t findSkyByName(std::string name) const; - LLSettingsWater::ptr_t findWaterByName(std::string name) const; - LLSettingsDay::ptr_t findDayCycleByName(std::string name) const; - // *LAPRAS* TODO : Remove these ^^^ - inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } F32 getCamHeight() const; @@ -229,9 +214,7 @@ public: LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); //------------------------------------------- - connection_t setSkyListChange(const change_signal_t::slot_type& cb); - connection_t setWaterListChange(const change_signal_t::slot_type& cb); - connection_t setDayCycleListChange(const change_signal_t::slot_type& cb); + connection_t setEnvironmentChanged(environment_changed_fn cb); void requestRegionEnvironment(); @@ -341,8 +324,6 @@ private: static const F32 SUN_DELTA_YAW; F32 mLastCamYaw = 0.0f; - typedef std::map AssetSettingMap_t; - LLVector2 mCloudScrollDelta; // cumulative cloud delta InstanceArray_t mEnvironments; @@ -357,25 +338,8 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; - typedef std::vector SkyList_t; - typedef std::vector WaterList_t; - typedef std::vector DayList_t; - - namedSettingMap_t mSkysByName; - AssetSettingMap_t mSkysById; - - namedSettingMap_t mWaterByName; - AssetSettingMap_t mWaterById; - - namedSettingMap_t mDayCycleByName; - AssetSettingMap_t mDayCycleById; - UserPrefs mUserPrefs; - change_signal_t mSkyListChange; - change_signal_t mWaterListChange; - change_signal_t mDayCycleListChange; - S32 mCurrentTrack; altitude_list_t mTrackAltitudes; @@ -384,22 +348,6 @@ private: DayInstance::ptr_t getSelectedEnvironmentInstance(); - //void addSky(const LLUUID &id, const LLSettingsSky::ptr_t &sky); - void removeSky(const std::string &name); - //void removeSky(const LLUUID &id); - void clearAllSkys(); - - //void addWater(const LLUUID &id, const LLSettingsSky::ptr_t &sky); - void removeWater(const std::string &name); - //void removeWater(const LLUUID &id); - void clearAllWater(); - - //void addDayCycle(const LLUUID &id, const LLSettingsSky::ptr_t &sky); - void removeDayCycle(const std::string &name); - //void removeDayCycle(const LLUUID &id); - void clearAllDayCycles(); - - void updateCloudScroll(); void onParcelChange(); @@ -415,10 +363,6 @@ private: void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); - //========================================================================= - void legacyLoadAllPresets(); - static std::string getSysDir(const std::string &subdir); - static std::string getUserDir(const std::string &subdir); }; -- cgit v1.2.3 From 67ab0084f87c40bf31d7fadded55cc9ea6299ca2 Mon Sep 17 00:00:00 2001 From: Graham Linden Date: Tue, 12 Jun 2018 18:42:07 +0100 Subject: Fix env panel forward action. Make env panel update environment when jumping frame to frame. Add separate funcs for sun/moon vectors in various coord systems. Make haze glow only pay attention to sun (i.e. fix sun glow when moon is near horizon in daytime). --- indra/newview/llenvironment.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 9da6de60ae..0fdedb91f7 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -193,14 +193,20 @@ public: // Returns either sun or moon direction (depending on which is up and stronger) // Light direction in +x right, +z up, +y at internal coord sys - LLVector3 getLightDirection() const; + LLVector3 getLightDirection() const; // returns sun or moon depending on which is up + LLVector3 getSunDirection() const; + LLVector3 getMoonDirection() const; // Returns light direction converted to CFR coord system - LLVector4 getLightDirectionCFR() const; + LLVector4 getLightDirectionCFR() const; // returns sun or moon depending on which is up + LLVector4 getSunDirectionCFR() const; + LLVector4 getMoonDirectionCFR() const; // Returns light direction converted to OGL coord system // and clamped above -0.1f in Y to avoid render artifacts in sky shaders - LLVector4 getClampedLightNorm() const; + LLVector4 getClampedLightNorm() const; // returns sun or moon depending on which is up + LLVector4 getClampedSunNorm() const; + LLVector4 getClampedMoonNorm() const; // Returns light direction converted to OGL coord system // and rotated by last cam yaw needed by water rendering shaders -- cgit v1.2.3 From d25f80181463d373c317835a219903bcdf9b91c8 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 25 Jun 2018 14:44:09 -0700 Subject: Fix cloud scroll adjustment in the editor, pause clouds method, set sun disk UUID to null. --- indra/newview/llenvironment.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 0fdedb91f7..d2664717dd 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -185,6 +185,9 @@ public: void updateEnvironment(LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); inline LLVector2 getCloudScrollDelta() const { return mCloudScrollDelta; } + void pauseCloudScroll() { mCloudScrollPaused = true; } + void resumeCloudScroll() { mCloudScrollPaused = false; } + bool isCloudScrollPaused() const { return mCloudScrollPaused; } F32 getCamHeight() const; F32 getWaterHeight() const; @@ -331,6 +334,7 @@ private: F32 mLastCamYaw = 0.0f; LLVector2 mCloudScrollDelta; // cumulative cloud delta + bool mCloudScrollPaused; InstanceArray_t mEnvironments; -- cgit v1.2.3 From a4137d72ebc9f49dfd8bd124b255da0dfbc4ba92 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 3 Jul 2018 14:18:24 -0700 Subject: MAINT-8821: New "My Environments" floater. First pass. --- indra/newview/llenvironment.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d2664717dd..d9a1494424 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -152,6 +152,7 @@ public: bool canAgentUpdateParcelEnvironment(bool useselected = false) const; bool canAgentUpdateRegionEnvironment() const; + LLSettingsDay::ptr_t getCurrentDay() const { return mCurrentEnvironment->getDayCycle(); } LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } -- cgit v1.2.3 From 294793b9a983a0c26c0e82bd432d4cc311ecb1ba Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 10 Jul 2018 15:15:47 -0700 Subject: MAINT-8821: Tighten up floater. Allow apply from gear menu. --- indra/newview/llenvironment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d9a1494424..6f8d4b5203 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -149,14 +149,14 @@ public: bool canEdit() const; bool isExtendedEnvironmentEnabled() const; bool isInventoryEnabled() const; - bool canAgentUpdateParcelEnvironment(bool useselected = false) const; + bool canAgentUpdateParcelEnvironment(bool useselected = true) const; bool canAgentUpdateRegionEnvironment() const; LLSettingsDay::ptr_t getCurrentDay() const { return mCurrentEnvironment->getDayCycle(); } LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } - static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky); + static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky); void update(const LLViewerCamera * cam); -- cgit v1.2.3 From b50d546d5ffb520228926ff1f4e6b03c69b3f857 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 3 Aug 2018 16:13:22 -0700 Subject: MAINT-7699: More robust cap protocol, better support for delete and support for individual tracks, support for setting environment by asset id in the cap MAINT-7703: Initial flags sent in message protocol for parcels --- indra/newview/llenvironment.h | 44 ++++++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 24 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 6f8d4b5203..80d186c9e6 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -65,25 +65,24 @@ public: static const LLUUID KNOWN_SKY_SUNSET; static const LLUUID KNOWN_SKY_MIDNIGHT; + static const S32 NO_TRACK; + struct EnvironmentInfo { EnvironmentInfo(); typedef std::shared_ptr ptr_t; - S32 mParcelId; - LLUUID mRegionId; - S64Seconds mDayLength; - S64Seconds mDayOffset; - size_t mDayHash; - LLSD mDaycycleData; - std::array mAltitudes; - bool mIsDefault; - bool mIsRegion; - - - static ptr_t extract(LLSD); + S32 mParcelId; + LLUUID mRegionId; + S64Seconds mDayLength; + S64Seconds mDayOffset; + size_t mDayHash; + LLSettingsDay::ptr_t mDayCycle; + std::array mAltitudes; + bool mIsDefault; + static ptr_t extract(LLSD); }; enum EnvSelection_t @@ -226,8 +225,6 @@ public: //------------------------------------------- connection_t setEnvironmentChanged(environment_changed_fn cb); - void requestRegionEnvironment(); - void onLegacyRegionSettings(LLSD data); void requestRegion(); @@ -359,21 +356,20 @@ private: DayInstance::ptr_t getSelectedEnvironmentInstance(); - void updateCloudScroll(); - - void onParcelChange(); + void updateCloudScroll(); - void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); - void coroUpdateEnvironment(S32 parcel_id, LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset, environment_apply_fn apply); - void coroResetEnvironment(S32 parcel_id, environment_apply_fn apply); + void onParcelChange(); - void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); + void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); + void coroUpdateEnvironment(S32 parcel_id, S32 track_no, LLSettingsDay::ptr_t pday, LLUUID settings_asset, S32 day_length, S32 day_offset, environment_apply_fn apply); + void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); - void onAgentPositionHasChanged(const LLVector3 &localpos); + void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); - void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); - void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); + void onAgentPositionHasChanged(const LLVector3 &localpos); + void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); + void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); }; -- cgit v1.2.3 From 881ee670d92f13ac518a74e1bff81bf69e07ccfa Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 8 Aug 2018 15:41:28 -0700 Subject: Fix for mac build MAINT-8870, MAINT-8871: When legacy windlight fails load the default day cycle asset and use that. --- indra/newview/llenvironment.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 80d186c9e6..eba1b737c8 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -172,6 +172,7 @@ public: void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); } + void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setEnvironment(EnvSelection_t env, const LLUUID &assetId); void clearEnvironment(EnvSelection_t env); @@ -368,7 +369,7 @@ private: void onAgentPositionHasChanged(const LLVector3 &localpos); - void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status); + void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 status); void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); }; -- cgit v1.2.3 From eadf0b910174274e7c83fe37e417f576a7350edb Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 15 Aug 2018 13:35:53 -0700 Subject: MAINT-8990, MAINT-9002: First pass rework on environment panels, region/parcel --- indra/newview/llenvironment.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index eba1b737c8..5acec97bd9 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -43,6 +43,7 @@ //------------------------------------------------------------------------- class LLViewerCamera; class LLGLSLShader; +class LLParcel; //------------------------------------------------------------------------- class LLEnvironment : public LLSingleton @@ -81,6 +82,7 @@ public: LLSettingsDay::ptr_t mDayCycle; std::array mAltitudes; bool mIsDefault; + LLUUID mAssetId; static ptr_t extract(LLSD); }; @@ -148,7 +150,8 @@ public: bool canEdit() const; bool isExtendedEnvironmentEnabled() const; bool isInventoryEnabled() const; - bool canAgentUpdateParcelEnvironment(bool useselected = true) const; + bool canAgentUpdateParcelEnvironment() const; + bool canAgentUpdateParcelEnvironment(LLParcel *parcel) const; bool canAgentUpdateRegionEnvironment() const; LLSettingsDay::ptr_t getCurrentDay() const { return mCurrentEnvironment->getDayCycle(); } @@ -228,13 +231,13 @@ public: void onLegacyRegionSettings(LLSD data); - void requestRegion(); + void requestRegion(environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); void resetRegion(); - void requestParcel(S32 parcel_id); + void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); -- cgit v1.2.3 From 68158f0340729d9f7e5a4b3e64bfc154a105ab6c Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Thu, 16 Aug 2018 09:43:54 -0700 Subject: Pass call backs into parcel and region change methods. --- indra/newview/llenvironment.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 5acec97bd9..eadbb3e941 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -232,17 +232,17 @@ public: void onLegacyRegionSettings(LLSD data); void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset); - void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); - void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); - void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); - void resetRegion(); + void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset); - void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset); - void resetParcel(S32 parcel_id); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void resetParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); void selectAgentEnvironment(); -- cgit v1.2.3 From 8fc3956a5eeaa2dffabdcda60800d9c4d4e49c43 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 20 Aug 2018 14:59:02 -0700 Subject: Use the EnvironmentInfo structure to pass information back from legacy environment requests. --- indra/newview/llenvironment.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index eadbb3e941..b5bd353066 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -83,8 +83,10 @@ public: std::array mAltitudes; bool mIsDefault; LLUUID mAssetId; + bool mIsLegacy; static ptr_t extract(LLSD); + static ptr_t extractLegacy(LLSD); }; enum EnvSelection_t @@ -229,8 +231,6 @@ public: //------------------------------------------- connection_t setEnvironmentChanged(environment_changed_fn cb); - void onLegacyRegionSettings(LLSD data); - void requestRegion(environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); -- cgit v1.2.3 From cae08e0096f75827851a8c9447e163ddb0132f2d Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 19 Sep 2018 15:31:23 -0700 Subject: SL-9661: Trigger an event when the settings on a parcel or region are changed. Environment panel montiors this event and updates itself when it occurs. --- indra/newview/llenvironment.h | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index b5bd353066..32a99c4286 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -135,15 +135,12 @@ public: }; typedef std::pair fixedEnvironment_t; + typedef std::function environment_apply_fn; + typedef boost::signals2::signal env_changed_signal_t; + typedef env_changed_signal_t::slot_type env_changed_fn; + typedef std::array altitude_list_t; - typedef std::function environment_apply_fn; - - typedef boost::signals2::signal environment_changed_signal_t; - typedef environment_changed_signal_t::slot_type environment_changed_fn; - - typedef std::array altitude_list_t; - - virtual ~LLEnvironment(); + virtual ~LLEnvironment(); void loadPreferences(); void updatePreferences(); @@ -229,7 +226,7 @@ public: LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); //------------------------------------------- - connection_t setEnvironmentChanged(environment_changed_fn cb); + connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); @@ -350,6 +347,8 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; + env_changed_signal_t mSignalEnvChanged; + UserPrefs mUserPrefs; S32 mCurrentTrack; -- cgit v1.2.3 From 50ec228b02026a4ddc3e108df6a8d7709c713d53 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Mon, 1 Oct 2018 16:45:19 +0300 Subject: SL-9660 EEP Remove residual code (LLFloaterEditDayCycle and LLEnvironment::UserPrefs) --- indra/newview/llenvironment.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 32a99c4286..aa7afd14bd 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 fixedEnvironment_t; typedef std::function environment_apply_fn; typedef boost::signals2::signal env_changed_signal_t; @@ -142,10 +111,6 @@ public: virtual ~LLEnvironment(); - void loadPreferences(); - void updatePreferences(); - const UserPrefs & getPreferences() const { return mUserPrefs; } - bool canEdit() const; bool isExtendedEnvironmentEnabled() const; bool isInventoryEnabled() const; @@ -349,8 +314,6 @@ private: env_changed_signal_t mSignalEnvChanged; - UserPrefs mUserPrefs; - S32 mCurrentTrack; altitude_list_t mTrackAltitudes; -- cgit v1.2.3 From 6e7d794b01673c138a50859c0e513732cb89fc8b Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 1 Oct 2018 16:10:19 -0700 Subject: MAINT-9738: Wire the altitude slider to the protocol and send new altitudes to simulator. --- indra/newview/llenvironment.h | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 32a99c4286..a605f791a5 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -139,6 +139,7 @@ public: typedef boost::signals2::signal env_changed_signal_t; typedef env_changed_signal_t::slot_type env_changed_fn; typedef std::array altitude_list_t; + typedef std::vector altitudes_vect_t; virtual ~LLEnvironment(); @@ -229,16 +230,16 @@ public: connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); void selectAgentEnvironment(); @@ -364,7 +365,7 @@ private: void onParcelChange(); void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); - void coroUpdateEnvironment(S32 parcel_id, S32 track_no, LLSettingsDay::ptr_t pday, LLUUID settings_asset, S32 day_length, S32 day_offset, environment_apply_fn apply); + void coroUpdateEnvironment(S32 parcel_id, S32 track_no, LLSettingsDay::ptr_t pday, LLUUID settings_asset, S32 day_length, S32 day_offset, altitudes_vect_t altitudes, environment_apply_fn apply); void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); @@ -372,7 +373,7 @@ private: void onAgentPositionHasChanged(const LLVector3 &localpos); void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 status); - void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset); + void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes); }; -- cgit v1.2.3 From 6cdcc7fe2edcb6c001f2dabf48c87e00d907a4db Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 17 Oct 2018 12:16:24 -0700 Subject: SL-9889: New reconverted default assets --- indra/newview/llenvironment.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 65c4748d02..31c9d290be 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -58,9 +58,6 @@ public: static const F32Seconds TRANSITION_SLOW; static const F32Seconds TRANSITION_ALTITUDE; - static const LLUUID KNOWN_SKY_DEFAULT; - static const LLUUID KNOWN_WATER_DEFAULT; - static const LLUUID KNOWN_DAY_DEFAULT; static const LLUUID KNOWN_SKY_SUNRISE; static const LLUUID KNOWN_SKY_MIDDAY; static const LLUUID KNOWN_SKY_SUNSET; -- cgit v1.2.3 From 659d14504f6ab4ad283efe4ecd950a4483e1498f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 29 Oct 2018 18:18:20 +0200 Subject: SL-1476 EEP Better shader resets and transitions --- indra/newview/llenvironment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 31c9d290be..63020ab5d7 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -124,7 +124,7 @@ public: void update(const LLViewerCamera * cam); - void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); + static void updateGLVariablesForSettings(LLGLSLShader *shader, const LLSettingsBase::ptr_t &psetting); void updateShaderUniforms(LLGLSLShader *shader); void setSelectedEnvironment(EnvSelection_t env, LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); -- cgit v1.2.3 From 51772e6083d8af786704cee18f5eb3c9b3dfefda Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 2 Nov 2018 09:17:19 -0700 Subject: SL-9886: Viewer send and receive new day_name(s) information in the environment protocol for viewer specified names on individual tracks. --- indra/newview/llenvironment.h | 42 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 37 insertions(+), 5 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 63020ab5d7..9e943cce00 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -69,7 +69,8 @@ public: { EnvironmentInfo(); - typedef std::shared_ptr ptr_t; + typedef std::shared_ptr ptr_t; + typedef std::array namelist_t; S32 mParcelId; LLUUID mRegionId; @@ -81,6 +82,8 @@ public: bool mIsDefault; LLUUID mAssetId; bool mIsLegacy; + std::string mDayCycleName; + namelist_t mNameList; static ptr_t extract(LLSD); static ptr_t extractLegacy(LLSD); @@ -192,13 +195,13 @@ public: connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); @@ -319,13 +322,42 @@ private: DayInstance::ptr_t getSelectedEnvironmentInstance(); - void updateCloudScroll(); void onParcelChange(); + struct UpdateInfo + { + typedef std::shared_ptr ptr_t; + + UpdateInfo(LLSettingsDay::ptr_t pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes): + mDayp(pday), + mSettingsAsset(), + mDayLength(day_length), + mDayOffset(day_offset), + mAltitudes(altitudes), + mDayName() + {} + + UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes) : + mDayp(), + mSettingsAsset(settings_asset), + mDayLength(day_length), + mDayOffset(day_offset), + mAltitudes(altitudes), + mDayName(name) + {} + + LLSettingsDay::ptr_t mDayp; + LLUUID mSettingsAsset; + S32 mDayLength; + S32 mDayOffset; + altitudes_vect_t mAltitudes; + std::string mDayName; + }; + void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); - void coroUpdateEnvironment(S32 parcel_id, S32 track_no, LLSettingsDay::ptr_t pday, LLUUID settings_asset, S32 day_length, S32 day_offset, altitudes_vect_t altitudes, environment_apply_fn apply); + void coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply); void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); -- cgit v1.2.3 From bda785e8b1bef35ecd9d45a7092b0ab66c17d1f4 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 12 Nov 2018 20:11:00 +0200 Subject: SL-10033 [EEP] Use fast environment transition for teleports --- indra/newview/llenvironment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 9e943cce00..a72a08c68e 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -360,7 +360,7 @@ private: void coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply); void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); - void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment); + void recordEnvironment(S32 parcel_id, EnvironmentInfo::ptr_t environment, LLSettingsBase::Seconds transition); void onAgentPositionHasChanged(const LLVector3 &localpos); -- cgit v1.2.3 From 29130c5483146d4d27272ef12e986520778ca2c8 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 20 Nov 2018 10:59:38 -0800 Subject: SL-10093: Client code to support experiences changing an environment. Handle generic messages with "commands" to be executed. --- indra/newview/llenvironment.h | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index a72a08c68e..55881f1c75 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -93,6 +93,7 @@ public: { ENV_EDIT = 0, ENV_LOCAL, + ENV_PUSH, ENV_PARCEL, ENV_REGION, ENV_DEFAULT, @@ -213,6 +214,8 @@ public: const altitude_list_t & getRegionAltitudes() const { return mTrackAltitudes; } + void handleEnvironmentPush(LLSD &message); + protected: virtual void initSingleton(); @@ -278,6 +281,17 @@ private: }; typedef std::array InstanceArray_t; + struct ExpEnvironmentEntry + { + typedef std::shared_ptr ptr_t; + + S32Seconds mTime; + LLUUID mExperienceId; + LLSD mEnvironmentOverrides; + }; + typedef std::deque mPushOverrides; + + LLUUID mPushEnvironmentExpId; class DayTransition : public DayInstance { @@ -324,6 +338,7 @@ private: void updateCloudScroll(); + void onRegionChange(); void onParcelChange(); struct UpdateInfo @@ -364,9 +379,16 @@ private: void onAgentPositionHasChanged(const LLVector3 &localpos); - void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 status); + void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, LLSettingsBase::Seconds transition, S32 status); void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes); + void handleEnvironmentPushClear(LLUUID experience_id, LLSD &message, F32 transition); + void handleEnvironmentPushFull(LLUUID experience_id, LLSD &message, F32 transition); + void handleEnvironmentPushPartial(LLUUID experience_id, LLSD &message, F32 transition); + + void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time); + void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time); + void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); }; class LLTrackBlenderLoopingManual : public LLSettingsBlender -- cgit v1.2.3 From d66012f85e885679738cf8c488fd8ff460319c85 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 30 Nov 2018 17:48:08 +0200 Subject: SL-9716 [EEP] "Use Shared Environment" does not enable when applying an environment to a parcel or region --- indra/newview/llenvironment.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 55881f1c75..7e35fdcfac 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -144,6 +144,8 @@ public: void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); void setEnvironment(EnvSelection_t env, const LLUUID &assetId); + void setSharedEnvironment(); + void clearEnvironment(EnvSelection_t env); LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env); -- cgit v1.2.3 From 76071d4fe8f2b88e33d0393fe00dc2ce88f71935 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Wed, 5 Dec 2018 22:13:49 +0200 Subject: SL-10091 EEP Filter out dupplicate refreshes and callbacks --- indra/newview/llenvironment.h | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7e35fdcfac..c5ac43704a 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -64,6 +64,8 @@ public: static const LLUUID KNOWN_SKY_MIDNIGHT; static const S32 NO_TRACK; + static const S32 NO_VERSION; + static const S32 VERSION_CLEANUP; struct EnvironmentInfo { @@ -84,6 +86,7 @@ public: bool mIsLegacy; std::string mDayCycleName; namelist_t mNameList; + S32 mEnvVersion; static ptr_t extract(LLSD); static ptr_t extractLegacy(LLSD); @@ -106,7 +109,7 @@ public: typedef std::pair fixedEnvironment_t; typedef std::function environment_apply_fn; - typedef boost::signals2::signal env_changed_signal_t; + typedef boost::signals2::signal env_changed_signal_t; typedef env_changed_signal_t::slot_type env_changed_fn; typedef std::array altitude_list_t; typedef std::vector altitudes_vect_t; @@ -135,14 +138,14 @@ public: EnvSelection_t getSelectedEnvironment() const { return mSelectedEnvironment; } bool hasEnvironment(EnvSelection_t env); - void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); - void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed); - void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed); - void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t())); } - void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed)); } - void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw)); } - void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); - void setEnvironment(EnvSelection_t env, const LLUUID &assetId); + void setEnvironment(EnvSelection_t env, const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 env_version = NO_VERSION); + void setEnvironment(EnvSelection_t env, fixedEnvironment_t fixed, S32 env_version = NO_VERSION); + void setEnvironment(EnvSelection_t env, const LLSettingsBase::ptr_t &fixed, S32 env_version = NO_VERSION); + void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixed, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(fixed, LLSettingsWater::ptr_t()), env_version); } + void setEnvironment(EnvSelection_t env, const LLSettingsWater::ptr_t & fixed, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(LLSettingsSky::ptr_t(), fixed), env_version); } + void setEnvironment(EnvSelection_t env, const LLSettingsSky::ptr_t & fixeds, const LLSettingsWater::ptr_t & fixedw, S32 env_version = NO_VERSION) { setEnvironment(env, fixedEnvironment_t(fixeds, fixedw), env_version); } + void setEnvironment(EnvSelection_t env, const LLUUID &assetId, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, S32 env_version = NO_VERSION); + void setEnvironment(EnvSelection_t env, const LLUUID &assetId, S32 env_version = NO_VERSION); void setSharedEnvironment(); @@ -381,7 +384,7 @@ private: void onAgentPositionHasChanged(const LLVector3 &localpos); - void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, LLSettingsBase::Seconds transition, S32 status); + void onSetEnvAssetLoaded(EnvSelection_t env, LLUUID asset_id, LLSettingsBase::ptr_t settings, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset, LLSettingsBase::Seconds transition, S32 status, S32 env_version); void onUpdateParcelAssetLoaded(LLUUID asset_id, LLSettingsBase::ptr_t settings, S32 status, S32 parcel_id, S32 day_length, S32 day_offset, altitudes_vect_t altitudes); void handleEnvironmentPushClear(LLUUID experience_id, LLSD &message, F32 transition); -- cgit v1.2.3 From 70ac8d9fa7049891ed1b65f68f112127dfb5f5f7 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 12 Dec 2018 14:07:23 -0800 Subject: SL-10238: Viewer spport for push notifications from the simulator contaiting partial groups of settings. Blend these settings into the current environment. --- indra/newview/llenvironment.h | 89 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 74 insertions(+), 15 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 7e35fdcfac..613bcdb4f8 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -121,8 +121,8 @@ public: bool canAgentUpdateRegionEnvironment() const; LLSettingsDay::ptr_t getCurrentDay() const { return mCurrentEnvironment->getDayCycle(); } - LLSettingsSky::ptr_t getCurrentSky() const { return mCurrentEnvironment->getSky(); } - LLSettingsWater::ptr_t getCurrentWater() const { return mCurrentEnvironment->getWater(); } + LLSettingsSky::ptr_t getCurrentSky() const; + LLSettingsWater::ptr_t getCurrentWater() const; static void getAtmosphericModelSettings(AtmosphericModelSettings& settingsOut, const LLSettingsSky::ptr_t &psky); @@ -218,13 +218,6 @@ public: void handleEnvironmentPush(LLSD &message); -protected: - virtual void initSingleton(); - -private: - LLVector4 toCFR(const LLVector3 vec) const; - LLVector4 toLightNorm(const LLVector3 vec) const; - class DayInstance { public: @@ -236,14 +229,16 @@ private: }; typedef std::shared_ptr ptr_t; - DayInstance(); + DayInstance(EnvSelection_t env); virtual ~DayInstance() { }; + ptr_t clone() const; + virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta); - void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); - void setSky(const LLSettingsSky::ptr_t &psky); - void setWater(const LLSettingsWater::ptr_t &pwater); + virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); + virtual void setSky(const LLSettingsSky::ptr_t &psky); + virtual void setWater(const LLSettingsWater::ptr_t &pwater); void initialize(); bool isInitialized(); @@ -263,12 +258,24 @@ private: void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); + EnvSelection_t getEnvironmentSelection() const { return mEnv; } + + void setBackup(bool backup); + bool getBackup() const { return mBackup; } + bool hasBackupSky() const { return !mBackupSky.isUndefined() || !mBackupWater.isUndefined(); } + void backup(); + void restore(); + protected: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; S32 mSkyTrack; + bool mBackup; + LLSD mBackupSky; + LLSD mBackupWater; + InstanceType_t mType; bool mInitialized; @@ -279,8 +286,21 @@ private: LLSettingsBlender::ptr_t mBlenderSky; LLSettingsBlender::ptr_t mBlenderWater; + EnvSelection_t mEnv; + LLSettingsBase::TrackPosition secondsToKeyframe(LLSettingsDay::Seconds seconds); }; + + DayInstance::ptr_t getSelectedEnvironmentInstance(); + DayInstance::ptr_t getSharedEnvironmentInstance(); + +protected: + virtual void initSingleton(); + +private: + LLVector4 toCFR(const LLVector3 vec) const; + LLVector4 toLightNorm(const LLVector3 vec) const; + typedef std::array InstanceArray_t; struct ExpEnvironmentEntry @@ -334,9 +354,12 @@ private: S32 mCurrentTrack; altitude_list_t mTrackAltitudes; - DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); + LLSD mSkyOverrides; + LLSD mWaterOverrides; + LLSD mSkyOverrideBlends; + LLSD mWaterOverrideBlends; - DayInstance::ptr_t getSelectedEnvironmentInstance(); + DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); void updateCloudScroll(); @@ -373,6 +396,31 @@ private: std::string mDayName; }; + struct ExpBlendValue + { + ExpBlendValue(F32Seconds transition, const std::string &keyname, LLSD value, bool blendin, S32 index = -1) : + mTransition(transition), + mTimeRemaining(transition), + mKeyName(keyname), + mValue(value), + mValueInitial(), + mIndex(index), + mBlendIn(blendin) + {} + + F32Seconds mTransition; + F32Seconds mTimeRemaining; + std::string mKeyName; + LLSD mValue; + LLSD mValueInitial; + S32 mIndex; + bool mBlendIn; + + typedef std::shared_ptr ptr_t; + }; + + typedef std::deque exerienceBlendValues_t; + void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); void coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply); void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); @@ -391,6 +439,17 @@ private: void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); + void setInstanceBackup(bool dobackup); + + void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin); + + void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta); + void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection); + void blendInjectedValues(LLSettingsBase::ptr_t psetting, exerienceBlendValues_t &blends, LLSD &overrides, F32Seconds delta); + + exerienceBlendValues_t mSkyExperienceBlends; + exerienceBlendValues_t mWaterExperienceBlends; + bool mMakeBackups; }; class LLTrackBlenderLoopingManual : public LLSettingsBlender -- cgit v1.2.3 From 8227a0b270f6e7cc521adeb7b97ad2d5fb646973 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 21 Dec 2018 15:30:57 -0800 Subject: SL-10279: Rework the environment pannel. Still in progress. --- indra/newview/llenvironment.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 47e0f0208b..1dd7496b02 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -380,7 +380,10 @@ private: mDayOffset(day_offset), mAltitudes(altitudes), mDayName() - {} + { + if (mDayp) + mDayName = mDayp->getName(); + } UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes) : mDayp(), -- cgit v1.2.3 From 1871f03d12e7a8e388d188f87e612117bcda75c1 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 7 Jan 2019 17:00:01 -0800 Subject: SL-10067, SL-9917: Updated UUIDs for sun and moon textures and to corrected known skies. --- indra/newview/llenvironment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 1dd7496b02..d9b667cd79 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -447,7 +447,7 @@ private: void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); void setInstanceBackup(bool dobackup); - void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin); + void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin); void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta); void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection); -- cgit v1.2.3 From 00d8caa359a216620db46d49696bc79a95fe8dc2 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 10 Jan 2019 22:11:11 +0200 Subject: SL-10279 Finalize drag and drop support --- indra/newview/llenvironment.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index d9b667cd79..c925ea6e7c 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -201,13 +201,14 @@ public: connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); -- cgit v1.2.3 From f42ac5b94e384c789de0b2c4e865b087589a940e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 Jan 2019 09:24:11 -0800 Subject: SL-10387: Move settings intjection to a setting object (and out of llEnvironment) --- indra/newview/llenvironment.h | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index c925ea6e7c..9d951202a9 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -48,7 +48,7 @@ class LLParcel; //------------------------------------------------------------------------- class LLEnvironment : public LLSingleton { - LLSINGLETON(LLEnvironment); + LLSINGLETON_C11(LLEnvironment); LOG_CLASS(LLEnvironment); public: @@ -153,9 +153,9 @@ public: LLSettingsDay::ptr_t getEnvironmentDay(EnvSelection_t env); LLSettingsDay::Seconds getEnvironmentDayLength(EnvSelection_t env); LLSettingsDay::Seconds getEnvironmentDayOffset(EnvSelection_t env); - fixedEnvironment_t getEnvironmentFixed(EnvSelection_t env); - LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env) { return getEnvironmentFixed(env).first; }; - LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env) { return getEnvironmentFixed(env).second; }; + fixedEnvironment_t getEnvironmentFixed(EnvSelection_t env, bool resolve = false); + LLSettingsSky::ptr_t getEnvironmentFixedSky(EnvSelection_t env, bool resolve = false) { return getEnvironmentFixed(env, resolve).first; }; + LLSettingsWater::ptr_t getEnvironmentFixedWater(EnvSelection_t env, bool resolve = false) { return getEnvironmentFixed(env, resolve).second; }; void updateEnvironment(LLSettingsBase::Seconds transition = TRANSITION_DEFAULT, bool forced = false); @@ -299,7 +299,9 @@ public: DayInstance::ptr_t getSharedEnvironmentInstance(); protected: - virtual void initSingleton(); + virtual void initSingleton() override; + virtual void cleanupSingleton() override; + private: LLVector4 toCFR(const LLVector3 vec) const; @@ -360,8 +362,8 @@ private: LLSD mSkyOverrides; LLSD mWaterOverrides; - LLSD mSkyOverrideBlends; - LLSD mWaterOverrideBlends; + typedef std::map experience_overrides_t; + experience_overrides_t mExperienceOverrides; DayInstance::ptr_t getEnvironmentInstance(EnvSelection_t env, bool create = false); @@ -453,6 +455,9 @@ private: void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta); void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection); void blendInjectedValues(LLSettingsBase::ptr_t psetting, exerienceBlendValues_t &blends, LLSD &overrides, F32Seconds delta); + void removeExperinceInjections(const LLUUID &experience_id); + void removeExperinceSetting(const LLUUID &experience_id); + void listenExperiencePump(const LLSD &message); exerienceBlendValues_t mSkyExperienceBlends; exerienceBlendValues_t mWaterExperienceBlends; -- cgit v1.2.3 From b465a5bf6f4f63026ff66bfee4671584c47c4119 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 22 Jan 2019 16:53:14 -0800 Subject: SL-10387: Inject individual settings. Still freezes parcel/region settings. --- indra/newview/llenvironment.h | 36 ------------------------------------ 1 file changed, 36 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 9d951202a9..415e9de6a4 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -405,31 +405,6 @@ private: std::string mDayName; }; - struct ExpBlendValue - { - ExpBlendValue(F32Seconds transition, const std::string &keyname, LLSD value, bool blendin, S32 index = -1) : - mTransition(transition), - mTimeRemaining(transition), - mKeyName(keyname), - mValue(value), - mValueInitial(), - mIndex(index), - mBlendIn(blendin) - {} - - F32Seconds mTransition; - F32Seconds mTimeRemaining; - std::string mKeyName; - LLSD mValue; - LLSD mValueInitial; - S32 mIndex; - bool mBlendIn; - - typedef std::shared_ptr ptr_t; - }; - - typedef std::deque exerienceBlendValues_t; - void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); void coroUpdateEnvironment(S32 parcel_id, S32 track_no, UpdateInfo::ptr_t updates, environment_apply_fn apply); void coroResetEnvironment(S32 parcel_id, S32 track_no, environment_apply_fn apply); @@ -448,20 +423,9 @@ private: void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); - void setInstanceBackup(bool dobackup); - - void injectSettings(LLUUID experience_id, exerienceBlendValues_t &blends, LLSD injections, LLSettingsBase::Seconds transition, bool blendin); - void applyInjectedSettings(DayInstance::ptr_t environment, F32Seconds delta); - void applyInjectedValues(LLSettingsBase::ptr_t psetting, LLSD injection); - void blendInjectedValues(LLSettingsBase::ptr_t psetting, exerienceBlendValues_t &blends, LLSD &overrides, F32Seconds delta); - void removeExperinceInjections(const LLUUID &experience_id); - void removeExperinceSetting(const LLUUID &experience_id); void listenExperiencePump(const LLSD &message); - exerienceBlendValues_t mSkyExperienceBlends; - exerienceBlendValues_t mWaterExperienceBlends; - bool mMakeBackups; }; class LLTrackBlenderLoopingManual : public LLSettingsBlender -- cgit v1.2.3 From c7e02b0835cbb50777c677f618c4a957e69fabee Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 30 Jan 2019 14:36:46 -0800 Subject: SL-9925: Viewer now shows an error message if import from legacy windlight fails. --- indra/newview/llenvironment.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 415e9de6a4..09a0aea426 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -190,9 +190,9 @@ public: // and rotated by last cam yaw needed by water rendering shaders LLVector4 getRotatedLightNorm() const; - static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename); - static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename); - static LLSettingsDay::ptr_t createDayCycleFromLegacyPreset(const std::string filename); + static LLSettingsWater::ptr_t createWaterFromLegacyPreset(const std::string filename, LLSD &messages); + static LLSettingsSky::ptr_t createSkyFromLegacyPreset(const std::string filename, LLSD &messages); + static LLSettingsDay::ptr_t createDayCycleFromLegacyPreset(const std::string filename, LLSD &messages); // Construct a new day cycle based on the environment. Replacing either the water or the sky tracks. LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); @@ -327,8 +327,8 @@ private: DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, LLSettingsDay::Seconds time); virtual ~DayTransition() { }; - virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta); - virtual void animate(); + virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta) override; + virtual void animate() override; protected: LLSettingsSky::ptr_t mStartSky; -- cgit v1.2.3 From 2a740309d01ca2ab80fd054ea8d8a79fb7ebbbe0 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 11 Feb 2019 16:50:15 -0800 Subject: SL-10406, SL-10464: Experience injections now have their own sub class of day instance (DayInjection) Montitors underlying environments and switches the sources as needed. --- indra/newview/llenvironment.h | 53 ++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 31 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 09a0aea426..1798c6dd61 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -109,7 +109,7 @@ public: typedef std::pair fixedEnvironment_t; typedef std::function environment_apply_fn; - typedef boost::signals2::signal env_changed_signal_t; + typedef boost::signals2::signal env_changed_signal_t; typedef env_changed_signal_t::slot_type env_changed_fn; typedef std::array altitude_list_t; typedef std::vector altitudes_vect_t; @@ -222,7 +222,7 @@ public: void handleEnvironmentPush(LLSD &message); - class DayInstance + class DayInstance: public std::enable_shared_from_this { public: enum InstanceType_t @@ -236,9 +236,9 @@ public: DayInstance(EnvSelection_t env); virtual ~DayInstance() { }; - ptr_t clone() const; + virtual ptr_t clone() const; - virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta); + virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta); virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); virtual void setSky(const LLSettingsSky::ptr_t &psky); @@ -263,23 +263,13 @@ public: void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); EnvSelection_t getEnvironmentSelection() const { return mEnv; } - - void setBackup(bool backup); - bool getBackup() const { return mBackup; } - bool hasBackupSky() const { return !mBackupSky.isUndefined() || !mBackupWater.isUndefined(); } - void backup(); - void restore(); - + void setEnvironmentSelection(EnvSelection_t env) { mEnv = env; } protected: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; S32 mSkyTrack; - bool mBackup; - LLSD mBackupSky; - LLSD mBackupWater; - InstanceType_t mType; bool mInitialized; @@ -295,6 +285,22 @@ public: LLSettingsBase::TrackPosition secondsToKeyframe(LLSettingsDay::Seconds seconds); }; + class DayTransition : public DayInstance + { + public: + DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, LLSettingsDay::Seconds time); + virtual ~DayTransition() { }; + + virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta) override; + virtual void animate() override; + + protected: + LLSettingsSky::ptr_t mStartSky; + LLSettingsWater::ptr_t mStartWater; + DayInstance::ptr_t mNextInstance; + LLSettingsDay::Seconds mTransitionTime; + }; + DayInstance::ptr_t getSelectedEnvironmentInstance(); DayInstance::ptr_t getSharedEnvironmentInstance(); @@ -321,22 +327,6 @@ private: LLUUID mPushEnvironmentExpId; - class DayTransition : public DayInstance - { - public: - DayTransition(const LLSettingsSky::ptr_t &skystart, const LLSettingsWater::ptr_t &waterstart, DayInstance::ptr_t &end, LLSettingsDay::Seconds time); - virtual ~DayTransition() { }; - - virtual void applyTimeDelta(const LLSettingsBase::Seconds& delta) override; - virtual void animate() override; - - protected: - LLSettingsSky::ptr_t mStartSky; - LLSettingsWater::ptr_t mStartWater; - DayInstance::ptr_t mNextInstance; - LLSettingsDay::Seconds mTransitionTime; - }; - static const F32 SUN_DELTA_YAW; F32 mLastCamYaw = 0.0f; @@ -423,6 +413,7 @@ private: void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); + void onSetExperienceEnvAssetLoaded(LLUUID experience_id, LLSettingsBase::ptr_t setting, F32 transition_time, S32 status); void listenExperiencePump(const LLSD &message); -- cgit v1.2.3 From 5d9915243ba1a93934969e7e203a25c6f4c9f9d1 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 12 Feb 2019 14:44:37 -0800 Subject: SL-10406, SL-10464: Remove experience injections and destroy push environment when finished. --- indra/newview/llenvironment.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 1798c6dd61..6a930959bb 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -410,7 +410,7 @@ private: void handleEnvironmentPushFull(LLUUID experience_id, LLSD &message, F32 transition); void handleEnvironmentPushPartial(LLUUID experience_id, LLSD &message, F32 transition); - void clearExperienceEnvironment(LLUUID experience_id, F32 transition_time); + void clearExperienceEnvironment(LLUUID experience_id, LLSettingsBase::Seconds transition_time); void setExperienceEnvironment(LLUUID experience_id, LLUUID asset_id, F32 transition_time); void setExperienceEnvironment(LLUUID experience_id, LLSD environment, F32 transition_time); void onSetExperienceEnvAssetLoaded(LLUUID experience_id, LLSettingsBase::ptr_t setting, F32 transition_time, S32 status); -- cgit v1.2.3 From 2401712d1073e85b4b9183d20c6e9274bc874f64 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 20 Feb 2019 15:20:30 -0800 Subject: SL-9660: Next pass cleanup. Removed and downgraded a number of logs. Removed refs to LAPAS. Better sync with legacy regions. --- indra/newview/llenvironment.h | 51 +++++++++++++++++++++++++------------------ 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 6a930959bb..64350c42e8 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -197,6 +197,10 @@ public: // Construct a new day cycle based on the environment. Replacing either the water or the sky tracks. LLSettingsDay::ptr_t createDayCycleFromEnvironment(EnvSelection_t env, LLSettingsBase::ptr_t settings); + F32 getProgress() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getProgress() : -1.0f; } + F32 getRegionProgress() const { return (mEnvironments[ENV_REGION]) ? mEnvironments[ENV_REGION]->getProgress() : -1.0f; } + void adjustRegionOffset(F32 adjust); // only used on legacy regions, to better sync the viewer with other agents + //------------------------------------------- connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } @@ -233,37 +237,42 @@ public: }; typedef std::shared_ptr ptr_t; - DayInstance(EnvSelection_t env); - virtual ~DayInstance() { }; + DayInstance(EnvSelection_t env); + virtual ~DayInstance() { }; + + virtual ptr_t clone() const; + + virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta); + + virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); + virtual void setSky(const LLSettingsSky::ptr_t &psky); + virtual void setWater(const LLSettingsWater::ptr_t &pwater); - virtual ptr_t clone() const; + void initialize(); + bool isInitialized(); - virtual bool applyTimeDelta(const LLSettingsBase::Seconds& delta); + void clear(); - virtual void setDay(const LLSettingsDay::ptr_t &pday, LLSettingsDay::Seconds daylength, LLSettingsDay::Seconds dayoffset); - virtual void setSky(const LLSettingsSky::ptr_t &psky); - virtual void setWater(const LLSettingsWater::ptr_t &pwater); + void setSkyTrack(S32 trackno); - void initialize(); - bool isInitialized(); + LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; } + LLSettingsSky::ptr_t getSky() const { return mSky; } + LLSettingsWater::ptr_t getWater() const { return mWater; } + LLSettingsDay::Seconds getDayLength() const { return mDayLength; } + LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; } + S32 getSkyTrack() const { return mSkyTrack; } - void clear(); + void setDayOffset(LLSettingsBase::Seconds offset) { mDayOffset = offset; animate(); } - void setSkyTrack(S32 trackno); + virtual void animate(); - LLSettingsDay::ptr_t getDayCycle() const { return mDayCycle; } - LLSettingsSky::ptr_t getSky() const { return mSky; } - LLSettingsWater::ptr_t getWater() const { return mWater; } - LLSettingsDay::Seconds getDayLength() const { return mDayLength; } - LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; } - S32 getSkyTrack() const { return mSkyTrack; } + void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); - virtual void animate(); + EnvSelection_t getEnvironmentSelection() const { return mEnv; } + void setEnvironmentSelection(EnvSelection_t env) { mEnv = env; } - void setBlenders(const LLSettingsBlender::ptr_t &skyblend, const LLSettingsBlender::ptr_t &waterblend); + LLSettingsBase::TrackPosition getProgress() const; - EnvSelection_t getEnvironmentSelection() const { return mEnv; } - void setEnvironmentSelection(EnvSelection_t env) { mEnv = env; } protected: LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; -- cgit v1.2.3 From e24237b6af504ff8faea02c8ab22344f2452364e Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 3 Apr 2019 14:52:59 -0700 Subject: SL-10189, SL-10880: Mark the day instance so that it does not try to reanimate a day cycle when setting a fixed sky. Add new floater for setting the shared environment to local and allowing modifications. --- indra/newview/llenvironment.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 64350c42e8..327e34d856 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -235,8 +235,12 @@ public: TYPE_FIXED, TYPE_CYCLED }; + typedef std::shared_ptr ptr_t; + static const U32 NO_ANIMATE_SKY; + static const U32 NO_ANIMATE_WATER; + DayInstance(EnvSelection_t env); virtual ~DayInstance() { }; @@ -273,7 +277,12 @@ public: LLSettingsBase::TrackPosition getProgress() const; + void setFlags(U32 flag) { mAnimateFlags |= flag; } + void clearFlags(U32 flag) { mAnimateFlags &= ~flag; } + protected: + + LLSettingsDay::ptr_t mDayCycle; LLSettingsSky::ptr_t mSky; LLSettingsWater::ptr_t mWater; @@ -291,6 +300,8 @@ public: EnvSelection_t mEnv; + U32 mAnimateFlags; + LLSettingsBase::TrackPosition secondsToKeyframe(LLSettingsDay::Seconds seconds); }; -- cgit v1.2.3 From fdf0d49614b820ffa85d2aa9258e4592bc0e45f3 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Tue, 28 May 2019 18:06:08 +0300 Subject: SL-11279 [EEP] Automatically toggle the beacon checkboxes --- indra/newview/llenvironment.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 327e34d856..0e23693c86 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -169,6 +169,9 @@ public: bool getIsSunUp() const; bool getIsMoonUp() const; + void saveBeaconsState(); + void revertBeaconsState(); + // Returns either sun or moon direction (depending on which is up and stronger) // Light direction in +x right, +z up, +y at internal coord sys LLVector3 getLightDirection() const; // returns sun or moon depending on which is up @@ -382,6 +385,10 @@ private: void onRegionChange(); void onParcelChange(); + bool mShowSunBeacon; + bool mShowMoonBeacon; + S32 mEditorCounter; + struct UpdateInfo { typedef std::shared_ptr ptr_t; -- cgit v1.2.3 From 1f656735d339fc4d83da86efbb400af1361c27db Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Mon, 26 Aug 2019 11:43:45 -0700 Subject: SL-11705, SL-11706: New flags in llsettings base for tracking by simulator. --- indra/newview/llenvironment.h | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 0e23693c86..3ae1d37a8c 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -208,13 +208,13 @@ public: connection_t setEnvironmentChanged(env_changed_fn cb) { return mSignalEnvChanged.connect(cb); } void requestRegion(environment_apply_fn cb = environment_apply_fn()); - void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateRegion(const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateRegion(const LLSettingsWater::ptr_t &pwater, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void resetRegion(environment_apply_fn cb = environment_apply_fn()); void requestParcel(S32 parcel_id, environment_apply_fn cb = environment_apply_fn()); - void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); + void updateParcel(S32 parcel_id, const LLUUID &asset_id, std::string display_name, S32 track_num, S32 day_length, S32 day_offset, U32 flags, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 track_num, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsDay::ptr_t &pday, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); void updateParcel(S32 parcel_id, const LLSettingsSky::ptr_t &psky, S32 day_length, S32 day_offset, altitudes_vect_t altitudes = altitudes_vect_t(), environment_apply_fn cb = environment_apply_fn()); @@ -399,19 +399,24 @@ private: mDayLength(day_length), mDayOffset(day_offset), mAltitudes(altitudes), - mDayName() + mDayName(), + mFlags(0) { if (mDayp) + { mDayName = mDayp->getName(); + mFlags = mDayp->getFlags(); + } } - UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes) : + UpdateInfo(LLUUID settings_asset, std::string name, S32 day_length, S32 day_offset, altitudes_vect_t altitudes, U32 flags) : mDayp(), mSettingsAsset(settings_asset), mDayLength(day_length), mDayOffset(day_offset), mAltitudes(altitudes), - mDayName(name) + mDayName(name), + mFlags(flags) {} LLSettingsDay::ptr_t mDayp; @@ -420,6 +425,7 @@ private: S32 mDayOffset; altitudes_vect_t mAltitudes; std::string mDayName; + U32 mFlags; }; void coroRequestEnvironment(S32 parcel_id, environment_apply_fn apply); -- cgit v1.2.3 From a7849c6ec4fa31597121e7c8601fe427e222db0b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Thu, 26 Mar 2020 18:09:09 +0200 Subject: Removed obsolete and misleading variable --- indra/newview/llenvironment.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 3ae1d37a8c..97cc3c8740 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -232,13 +232,6 @@ public: class DayInstance: public std::enable_shared_from_this { public: - enum InstanceType_t - { - TYPE_INVALID, - TYPE_FIXED, - TYPE_CYCLED - }; - typedef std::shared_ptr ptr_t; static const U32 NO_ANIMATE_SKY; @@ -291,7 +284,6 @@ public: LLSettingsWater::ptr_t mWater; S32 mSkyTrack; - InstanceType_t mType; bool mInitialized; LLSettingsDay::Seconds mDayLength; -- cgit v1.2.3 From 6620211bff5dca7df0667cf9220da1a9e7ce079c Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 27 Mar 2020 00:13:33 +0200 Subject: SL-12911 Add Debug setting EnvironmentPersistAcrossLogin --- indra/newview/llenvironment.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index 97cc3c8740..cf8231168f 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -169,6 +169,8 @@ public: bool getIsSunUp() const; bool getIsMoonUp() const; + void saveToSettings(); + bool loadFromSettings(); void saveBeaconsState(); void revertBeaconsState(); @@ -275,6 +277,7 @@ public: void setFlags(U32 flag) { mAnimateFlags |= flag; } void clearFlags(U32 flag) { mAnimateFlags &= ~flag; } + U32 getFlags() { return mAnimateFlags; } protected: -- cgit v1.2.3 From 483c459e2e013e3bf1c813c3bb5030d0c0631963 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Sat, 11 Apr 2020 00:23:08 +0300 Subject: SL-13029 Environment update was not applying properly --- indra/newview/llenvironment.h | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/llenvironment.h') diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h index cf8231168f..91c4b85135 100644 --- a/indra/newview/llenvironment.h +++ b/indra/newview/llenvironment.h @@ -444,6 +444,7 @@ private: void onSetExperienceEnvAssetLoaded(LLUUID experience_id, LLSettingsBase::ptr_t setting, F32 transition_time, S32 status); void listenExperiencePump(const LLSD &message); + void loadSkyWaterFromSettings(const LLSD &env_data, bool &valid, bool &assets_present); // for use in loadFromSettings() }; -- cgit v1.2.3