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/llwlhandlers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index ea65a0c6d9..c3543f051d 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -34,6 +34,8 @@ #include "llnotificationsutil.h" #include "llcorehttputil.h" +#include "llenvironment.h" + /**** * LLEnvironmentRequest ****/ @@ -114,7 +116,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) if (!status) { LL_WARNS("WindlightCaps") << "Got an error, not using region windlight... " << LL_ENDL; - LLEnvManagerNew::getInstance()->onRegionSettingsResponse(LLSD()); + LLEnvironment::instance().onLegacyRegionSettings(LLSD()); + return; } result = result["content"]; @@ -134,7 +137,7 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) return; } - LLEnvManagerNew::getInstance()->onRegionSettingsResponse(result); + LLEnvironment::instance().onLegacyRegionSettings(result); } -- 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/llwlhandlers.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index c3543f051d..0e4017a1c0 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -30,7 +30,6 @@ #include "llagent.h" #include "llviewerregion.h" -#include "llenvmanager.h" #include "llnotificationsutil.h" #include "llcorehttputil.h" @@ -245,13 +244,13 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content) } LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << result["regionID"].asUUID() << LL_ENDL; - LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true); + //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true); } while (false); if (!notify.isUndefined()) { LLNotificationsUtil::add("WLRegionApplyFail", notify); - LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false); + //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false); } } -- 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/llwlhandlers.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 0e4017a1c0..cd3310d5cb 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -164,7 +164,7 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content) sLastUpdate = current; // Send update request. - std::string url = gAgent.getRegionCapability("EnvironmentSettings"); + std::string url = gAgent.getRegionCapability("ExtEnvironment"); if (url.empty()) { LL_WARNS("WindlightCaps") << "Applying windlight settings not supported" << LL_ENDL; @@ -244,13 +244,11 @@ void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content) } LL_DEBUGS("WindlightCaps") << "Success in applying windlight settings to region " << result["regionID"].asUUID() << LL_ENDL; - //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(true); } while (false); if (!notify.isUndefined()) { LLNotificationsUtil::add("WLRegionApplyFail", notify); - //LLEnvManagerNew::instance().onRegionSettingsApplyResponse(false); } } -- cgit v1.2.3 From 2d41de9007ce485e2c7e96c487d609cfe1690c29 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Wed, 24 Jan 2018 13:36:59 -0800 Subject: MAINT-8052: Parcel environments. Set, clear and get. --- indra/newview/llwlhandlers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index cd3310d5cb..acec028489 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -104,6 +104,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) LLSD result = httpAdapter->getAndSuspend(httpRequest, url); + LL_WARNS("WindlightCaps") << "Using legacy Windlight caps." << LL_ENDL; + if (requestId != LLEnvironmentRequest::sLastRequest) { LL_INFOS("WindlightCaps") << "Got superseded by another responder; ignoring..." << LL_ENDL; @@ -120,7 +122,7 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) return; } result = result["content"]; - LL_INFOS("WindlightCaps") << "Received region windlight settings" << LL_ENDL; + LL_INFOS("WindlightCaps") << "Received region legacy windlight settings" << LL_ENDL; LLUUID regionId; if (gAgent.getRegion()) -- 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/llwlhandlers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index acec028489..6aa379e0de 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -52,7 +52,7 @@ bool LLEnvironmentRequest::initiate() if (!cur_region->capabilitiesReceived()) { LL_INFOS("WindlightCaps") << "Deferring windlight settings request until we've got region caps" << LL_ENDL; - cur_region->setCapabilitiesReceivedCallback(boost::bind(&LLEnvironmentRequest::onRegionCapsReceived, _1)); + cur_region->setCapabilitiesReceivedCallback([](LLUUID region_id) { LLEnvironmentRequest::onRegionCapsReceived(region_id); }); return false; } @@ -85,7 +85,7 @@ bool LLEnvironmentRequest::doRequest() std::string coroname = LLCoros::instance().launch("LLEnvironmentRequest::environmentRequestCoro", - boost::bind(&LLEnvironmentRequest::environmentRequestCoro, url)); + [url]() { LLEnvironmentRequest::environmentRequestCoro(url); }); LL_INFOS("WindlightCaps") << "Requesting region windlight settings via " << url << LL_ENDL; return true; @@ -178,7 +178,7 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content) std::string coroname = LLCoros::instance().launch("LLEnvironmentApply::environmentApplyCoro", - boost::bind(&LLEnvironmentApply::environmentApplyCoro, url, content)); + [url, content]() { LLEnvironmentApply::environmentApplyCoro(url, content); }); return true; } -- 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/llwlhandlers.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index 6aa379e0de..f0453b4d6d 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -80,6 +80,9 @@ bool LLEnvironmentRequest::doRequest() { LL_INFOS("WindlightCaps") << "Skipping windlight setting request - we don't have this capability" << LL_ENDL; // region is apparently not capable of this; don't respond at all + // (there shouldn't be any regions where this is the case... but + LL_INFOS("ENVIRONMENT") << "No legacy windlight caps... just set the region to be the default day." << LL_ENDL; + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_REGION, LLSettingsDay::GetDefaultAssetId()); return false; } @@ -117,8 +120,8 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) if (!status) { LL_WARNS("WindlightCaps") << "Got an error, not using region windlight... " << LL_ENDL; - LLEnvironment::instance().onLegacyRegionSettings(LLSD()); - + LLEnvironment::instance().setEnvironment(LLEnvironment::ENV_REGION, LLSettingsDay::GetDefaultAssetId()); + return; } result = result["content"]; -- 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/llwlhandlers.cpp | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'indra/newview/llwlhandlers.cpp') diff --git a/indra/newview/llwlhandlers.cpp b/indra/newview/llwlhandlers.cpp index f0453b4d6d..6b8374fd48 100644 --- a/indra/newview/llwlhandlers.cpp +++ b/indra/newview/llwlhandlers.cpp @@ -33,13 +33,12 @@ #include "llnotificationsutil.h" #include "llcorehttputil.h" -#include "llenvironment.h" - +#include "llparcel.h" /**** * LLEnvironmentRequest ****/ // static -bool LLEnvironmentRequest::initiate() +bool LLEnvironmentRequest::initiate(LLEnvironment::environment_apply_fn cb) { LLViewerRegion* cur_region = gAgent.getRegion(); @@ -52,15 +51,15 @@ bool LLEnvironmentRequest::initiate() if (!cur_region->capabilitiesReceived()) { LL_INFOS("WindlightCaps") << "Deferring windlight settings request until we've got region caps" << LL_ENDL; - cur_region->setCapabilitiesReceivedCallback([](LLUUID region_id) { LLEnvironmentRequest::onRegionCapsReceived(region_id); }); + cur_region->setCapabilitiesReceivedCallback([cb](LLUUID region_id) { LLEnvironmentRequest::onRegionCapsReceived(region_id, cb); }); return false; } - return doRequest(); + return doRequest(cb); } // static -void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id) +void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id, LLEnvironment::environment_apply_fn cb) { if (region_id != gAgent.getRegion()->getRegionID()) { @@ -69,11 +68,11 @@ void LLEnvironmentRequest::onRegionCapsReceived(const LLUUID& region_id) } LL_DEBUGS("WindlightCaps") << "Received region capabilities" << LL_ENDL; - doRequest(); + doRequest(cb); } // static -bool LLEnvironmentRequest::doRequest() +bool LLEnvironmentRequest::doRequest(LLEnvironment::environment_apply_fn cb) { std::string url = gAgent.getRegionCapability("EnvironmentSettings"); if (url.empty()) @@ -88,7 +87,7 @@ bool LLEnvironmentRequest::doRequest() std::string coroname = LLCoros::instance().launch("LLEnvironmentRequest::environmentRequestCoro", - [url]() { LLEnvironmentRequest::environmentRequestCoro(url); }); + [url, cb]() { LLEnvironmentRequest::environmentRequestCoro(url, cb); }); LL_INFOS("WindlightCaps") << "Requesting region windlight settings via " << url << LL_ENDL; return true; @@ -97,7 +96,7 @@ bool LLEnvironmentRequest::doRequest() S32 LLEnvironmentRequest::sLastRequest = 0; //static -void LLEnvironmentRequest::environmentRequestCoro(std::string url) +void LLEnvironmentRequest::environmentRequestCoro(std::string url, LLEnvironment::environment_apply_fn cb) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); S32 requestId = ++LLEnvironmentRequest::sLastRequest; @@ -141,7 +140,12 @@ void LLEnvironmentRequest::environmentRequestCoro(std::string url) return; } - LLEnvironment::instance().onLegacyRegionSettings(result); + if (cb) + { + LLEnvironment::EnvironmentInfo::ptr_t pinfo = LLEnvironment::EnvironmentInfo::extractLegacy(result); + + cb(INVALID_PARCEL_ID, pinfo); + } } @@ -153,7 +157,7 @@ clock_t LLEnvironmentApply::UPDATE_WAIT_SECONDS = clock_t(3.f); clock_t LLEnvironmentApply::sLastUpdate = clock_t(0.f); // static -bool LLEnvironmentApply::initiateRequest(const LLSD& content) +bool LLEnvironmentApply::initiateRequest(const LLSD& content, LLEnvironment::environment_apply_fn cb) { clock_t current = clock(); @@ -181,11 +185,11 @@ bool LLEnvironmentApply::initiateRequest(const LLSD& content) std::string coroname = LLCoros::instance().launch("LLEnvironmentApply::environmentApplyCoro", - [url, content]() { LLEnvironmentApply::environmentApplyCoro(url, content); }); + [url, content, cb]() { LLEnvironmentApply::environmentApplyCoro(url, content, cb); }); return true; } -void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content) +void LLEnvironmentApply::environmentApplyCoro(std::string url, LLSD content, LLEnvironment::environment_apply_fn cb) { LLCore::HttpRequest::policy_t httpPolicy(LLCore::HttpRequest::DEFAULT_POLICY_ID); LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t -- cgit v1.2.3