summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterfixedenvironment.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2018-10-09 19:00:48 +0000
committerRider Linden <rider@lindenlab.com>2018-10-09 19:00:48 +0000
commitac6d2b09c048d8589c572acb2965a0643b07d5ce (patch)
tree4592bf63d6fc464c9e1a961e4b64af4233ab93bf /indra/newview/llfloaterfixedenvironment.cpp
parentc2cbb40a0eecb1c3b4a21ffa4d169f23f1e7006b (diff)
parent83b508a656aebedff915b2fdcd292432a8aaa7b2 (diff)
Merged in andreykproductengine/maint-eep2 (pull request #137)
SL-9746 [EEP] Local Texture options should work with EEP Approved-by: Andrey Lihatskiy <andreylproductengine@lindenlab.com> Approved-by: Maxim Nikolenko <maximnproductengine@lindenlab.com>
Diffstat (limited to 'indra/newview/llfloaterfixedenvironment.cpp')
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 5cd99e6ad2..201c6679b3 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -37,6 +37,7 @@
#include "llsliderctrl.h"
#include "lltabcontainer.h"
#include "llfilepicker.h"
+#include "lllocalbitmaps.h"
#include "llsettingspicker.h"
#include "llviewermenufile.h" // LLFilePickerReplyThread
#include "llviewerparcelmgr.h"
@@ -51,6 +52,7 @@
#include "llenvironment.h"
#include "llagent.h"
#include "llparcel.h"
+#include "lltrans.h"
#include "llsettingsvo.h"
#include "llinventorymodel.h"
@@ -340,6 +342,62 @@ void LLFloaterFixedEnvironment::onButtonApply(LLUICtrl *ctrl, const LLSD &data)
{
std::string ctrl_action = ctrl->getName();
+ std::string local_desc;
+ bool is_local = false; // because getString can be empty
+ if (mSettings->getSettingsType() == "water")
+ {
+ LLSettingsWater::ptr_t water = std::static_pointer_cast<LLSettingsWater>(mSettings);
+ if (water)
+ {
+ // LLViewerFetchedTexture and check for FTT_LOCAL_FILE or check LLLocalBitmapMgr
+ if (LLLocalBitmapMgr::isLocal(water->getNormalMapID()))
+ {
+ local_desc = LLTrans::getString("EnvironmentNormalMap");
+ is_local = true;
+ }
+ else if (LLLocalBitmapMgr::isLocal(water->getTransparentTextureID()))
+ {
+ local_desc = LLTrans::getString("EnvironmentTransparent");
+ is_local = true;
+ }
+ }
+ }
+ else if (mSettings->getSettingsType() == "sky")
+ {
+ LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(mSettings);
+ if (sky)
+ {
+ if (LLLocalBitmapMgr::isLocal(sky->getSunTextureId()))
+ {
+ local_desc = LLTrans::getString("EnvironmentSun");
+ is_local = true;
+ }
+ else if (LLLocalBitmapMgr::isLocal(sky->getMoonTextureId()))
+ {
+ local_desc = LLTrans::getString("EnvironmentMoon");
+ is_local = true;
+ }
+ else if (LLLocalBitmapMgr::isLocal(sky->getCloudNoiseTextureId()))
+ {
+ local_desc = LLTrans::getString("EnvironmentCloudNoise");
+ is_local = true;
+ }
+ else if (LLLocalBitmapMgr::isLocal(sky->getBloomTextureId()))
+ {
+ local_desc = LLTrans::getString("EnvironmentBloom");
+ is_local = true;
+ }
+ }
+ }
+
+ if (is_local)
+ {
+ LLSD args;
+ args["FIELD"] = local_desc;
+ LLNotificationsUtil::add("WLLocalTextureFixedBlock", args);
+ return;
+ }
+
if (ctrl_action == ACTION_SAVE)
{
doApplyUpdateInventory();