From e045d212d35354d679c2d2e05c6d4689f9f8ac95 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Mon, 27 Sep 2010 22:56:08 -0400 Subject: STORM-1126 WIP Windlight Estate Settings port from 1.23: first pass at merging in windlight estate settings to viewer-dev codebase. not built, not tested. Probably needs a bunch of fixes to be able to be integrated. (resubmitted by Vadim ProductEngine) --- indra/newview/llfloaterregioninfo.cpp | 148 +++++++++++++++++++++++++++++++++- 1 file changed, 146 insertions(+), 2 deletions(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index ed81fdec16..f6377d50fa 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -40,6 +40,8 @@ #include "llxfermanager.h" #include "indra_constants.h" #include "message.h" +#include "llsd.h" +#include "llsdserialize.h" #include "llagent.h" #include "llappviewer.h" @@ -47,6 +49,7 @@ #include "llbutton.h" #include "llcheckboxctrl.h" #include "llcombobox.h" +#include "llenvmanager.h" #include "llfilepicker.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() #include "llfloatertopobjects.h" // added to fix SL-32336 @@ -81,6 +84,9 @@ #include "lltrans.h" #include "llagentui.h" +// contains includes needed for WL estate settings +#include "llfloaterwater.h" + const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; @@ -287,6 +293,10 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg) return; } + + // currently, region can send this message when its windlight settings change + LLEnvManager::instance().refreshFromStorage(LLEnvKey::SCOPE_REGION); + LLTabContainer* tab = floater->getChild("region_panels"); LLViewerRegion* region = gAgent.getRegion(); @@ -1144,9 +1154,32 @@ void LLPanelRegionTextureInfo::onClickDump(void* data) ///////////////////////////////////////////////////////////////////////////// // LLPanelRegionTerrainInfo ///////////////////////////////////////////////////////////////////////////// +// Initialize statics +LLPanelRegionTerrainInfo* LLPanelRegionTerrainInfo::sPanelRegionTerrainInfo = NULL; + +LLPanelRegionTerrainInfo* LLPanelRegionTerrainInfo::instance() +{ + if (!sPanelRegionTerrainInfo) + { + sPanelRegionTerrainInfo = new LLPanelRegionTerrainInfo(); + } + return sPanelRegionTerrainInfo; +} + +// virtual +void LLPanelRegionTerrainInfo::close(bool app_quitting) +{ + if (sPanelRegionTerrainInfo) + { + sPanelRegionTerrainInfo = NULL; + } +} + BOOL LLPanelRegionTerrainInfo::postBuild() { LLPanelRegionInfo::postBuild(); + + sPanelRegionTerrainInfo = this; // singleton instance pointer initCtrl("water_height_spin"); initCtrl("terrain_raise_spin"); @@ -1161,20 +1194,42 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("upload_raw_btn", onClickUploadRaw, this); childSetAction("bake_terrain_btn", onClickBakeTerrain, this); + // WL advanced buttons + childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, this); + childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, this); + childSetAction("EnvUseEstateTimeButton", onUseEstateTime, this); + + // Commit, cancel, and default + childSetAction("WLRegionApply", onCommitRegionWL, this); + childSetAction("WLRegionCancel", onCancelRegionWL, this); + childSetAction("WLRegionDefault", onSetRegionToDefaultWL, this); + return TRUE; } +F32 LLPanelRegionTerrainInfo::getSunHour() +{ + if (childIsEnabled("sun_hour_slider")) + { + return (F32)childGetValue("sun_hour_slider").asReal(); + } + return 0.f; +} + // virtual bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) { - llinfos << "LLPanelRegionTerrainInfo::refreshFromRegion" << llendl; - BOOL owner_or_god = gAgent.isGodlike() || (region && (region->getOwner() == gAgent.getID())); BOOL owner_or_god_or_manager = owner_or_god || (region && region->isEstateManager()); setCtrlsEnabled(owner_or_god_or_manager); + + // Disable select children + LLPanelRegionTerrainInfo::instance()->setCommitControls(false); + LLPanelRegionTerrainInfo::instance()->setEnvControls(LLEnvManager::getInstance()->regionCapable()); getChildView("apply_btn")->setEnabled(FALSE); + LLEnvManager::instance().maybeClearEditingScope(LLEnvKey::SCOPE_REGION, false, false); getChildView("download_raw_btn")->setEnabled(owner_or_god); getChildView("upload_raw_btn")->setEnabled(owner_or_god); @@ -1183,6 +1238,24 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) return LLPanelRegionInfo::refreshFromRegion(region); } +void LLPanelRegionTerrainInfo::setEnvControls(bool available) +{ + getChildView("EnvUseEstateTimeButton")->setVisible(available); + getChildView("EnvAdvancedSkyButton")->setVisible(available); + getChildView("EnvAdvancedWaterButton")->setVisible(available); + getChildView("WLRegionApply")->setVisible(available); + getChildView("WLRegionCancel")->setVisible(available); + getChildView("WLRegionDefault")->setVisible(available); + getChildView("wl_settings_unavailable")->setVisible(!available); +} + +void LLPanelRegionTerrainInfo::setCommitControls(bool available) +{ + getChildView("WLRegionApply")->setEnabled(available); + getChildView("WLRegionCancel")->setEnabled(available); + refresh(); +} + // virtual BOOL LLPanelRegionTerrainInfo::sendUpdate() { @@ -1320,9 +1393,70 @@ bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, con strings.push_back("bake"); LLUUID invoice(LLFloaterRegionInfo::getLastInvoice()); sendEstateOwnerMessage(gMessageSystem, "terrain", invoice, strings); + return false; } +/////////////////////////////////////////////////////////////// +// Callbacks for WindLight additions to Region terrain panel + +void LLPanelRegionTerrainInfo::onOpenAdvancedSky(void* userData) +{ + LLFloaterWindLight::show(LLEnvKey::SCOPE_REGION); +} + +void LLPanelRegionTerrainInfo::onOpenAdvancedWater(void* userData) +{ + LLFloaterWater::show(LLEnvKey::SCOPE_REGION); +} + + +void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) +{ + if(LLFloaterWindLight::isOpen()) + { + // select the blank value in + LLFloaterWindLight* wl = LLFloaterWindLight::instance(); + LLComboBox* box = wl->getChild("WLPresetsCombo"); + box->selectByValue(""); + } + + LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN); +} + +/////////////////////////////////////////////////////// +// Advanced handling for WL region estate integration + +// Handle commit of WL settings to region +void LLPanelRegionTerrainInfo::onCommitRegionWL(void* userData) +{ + LLEnvManager::getInstance()->commitSettings(LLEnvKey::SCOPE_REGION); + LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); +} + +// Handle cancel of WL settings for region +void LLPanelRegionTerrainInfo::onCancelRegionWL(void* userData) +{ + LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); +} + +// Handle reversion of region WL settings to default +void LLPanelRegionTerrainInfo::onSetRegionToDefaultWL(void* userData) +{ + LLEnvManager::instance().resetInternalsToDefault(LLEnvKey::SCOPE_REGION); + LLEnvManager::instance().startEditingScope(LLEnvKey::SCOPE_REGION); +} + +void LLPanelRegionTerrainInfo::cancelChanges() +{ + LLFloaterWindLight::instance()->close(); + LLFloaterWater::instance()->close(); + LLFloaterDayCycle::instance()->close(); + + // disable commmit and cancel + LLPanelRegionTerrainInfo::instance()->setCommitControls(false); +} + ///////////////////////////////////////////////////////////////////////////// // LLPanelEstateInfo // @@ -1996,6 +2130,16 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) return rv; } +void LLFloaterRegionInfo::close(bool app_quitting) +{ + if(!app_quitting) + { + LLEnvManager::getInstance()->maybeClearEditingScope(true, false); + LLPanelRegionTerrainInfo::close(app_quitting); + } + LLFloater::close(app_quitting); +} + void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) { if (checkRemovalButton(child_ctrl->getName())) -- cgit v1.2.3 From 2fb337bc12984f9abecfbc7f3918c372a7b5ac6c Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 30 Sep 2010 23:21:23 -0400 Subject: STORM-1126 WIP Windlight Estate Settings port from 1.23: second pass at getting windlight ported to V2. Lots of cleanup in the floater classes. Not sure every decision was correct but it compiles now. Doesn't link yet. (resubmitted by Vadim ProductEngine) --- indra/newview/llfloaterregioninfo.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index f6377d50fa..7617b98f20 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -51,6 +51,7 @@ #include "llcombobox.h" #include "llenvmanager.h" #include "llfilepicker.h" +#include "llfloaterdaycycle.h" #include "llfloatergodtools.h" // for send_sim_wide_deletes() #include "llfloatertopobjects.h" // added to fix SL-32336 #include "llfloatergroups.h" @@ -1167,7 +1168,7 @@ LLPanelRegionTerrainInfo* LLPanelRegionTerrainInfo::instance() } // virtual -void LLPanelRegionTerrainInfo::close(bool app_quitting) +void LLPanelRegionTerrainInfo::closeFloater(bool app_quitting) { if (sPanelRegionTerrainInfo) { @@ -1407,7 +1408,7 @@ void LLPanelRegionTerrainInfo::onOpenAdvancedSky(void* userData) void LLPanelRegionTerrainInfo::onOpenAdvancedWater(void* userData) { - LLFloaterWater::show(LLEnvKey::SCOPE_REGION); + LLFloaterWater::instance()->show(LLEnvKey::SCOPE_REGION); } @@ -1449,9 +1450,9 @@ void LLPanelRegionTerrainInfo::onSetRegionToDefaultWL(void* userData) void LLPanelRegionTerrainInfo::cancelChanges() { - LLFloaterWindLight::instance()->close(); - LLFloaterWater::instance()->close(); - LLFloaterDayCycle::instance()->close(); + LLFloaterWindLight::instance()->closeFloater(); + LLFloaterWater::instance()->closeFloater(); + LLFloaterDayCycle::instance()->closeFloater(); // disable commmit and cancel LLPanelRegionTerrainInfo::instance()->setCommitControls(false); @@ -2130,14 +2131,14 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) return rv; } -void LLFloaterRegionInfo::close(bool app_quitting) +void LLFloaterRegionInfo::closeFloater(bool app_quitting) { if(!app_quitting) { LLEnvManager::getInstance()->maybeClearEditingScope(true, false); - LLPanelRegionTerrainInfo::close(app_quitting); + LLPanelRegionTerrainInfo::closeFloater(app_quitting); } - LLFloater::close(app_quitting); + LLFloater::closeFloater(app_quitting); } void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) -- cgit v1.2.3 From 758fdbfe125d75bd2253a69337eab7fec7406ecf Mon Sep 17 00:00:00 2001 From: "tiggs@lindenlab.com" Date: Wed, 23 Feb 2011 17:44:18 -0500 Subject: STORM-1126 WIP Windlight Estate Settings port from 1.23: baseline: read only windlight works (resubmitted by Vadim ProductEngine) --- indra/newview/llfloaterregioninfo.cpp | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 7617b98f20..1f42b483d7 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1403,17 +1403,18 @@ bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, con void LLPanelRegionTerrainInfo::onOpenAdvancedSky(void* userData) { - LLFloaterWindLight::show(LLEnvKey::SCOPE_REGION); +// LLFloaterWindLight::show(LLEnvKey::SCOPE_REGION); } void LLPanelRegionTerrainInfo::onOpenAdvancedWater(void* userData) { - LLFloaterWater::instance()->show(LLEnvKey::SCOPE_REGION); +// LLFloaterWater::instance()->show(LLEnvKey::SCOPE_REGION); } void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) { +#if 0 if(LLFloaterWindLight::isOpen()) { // select the blank value in @@ -1423,6 +1424,7 @@ void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) } LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN); +#endif } /////////////////////////////////////////////////////// @@ -1431,29 +1433,36 @@ void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) // Handle commit of WL settings to region void LLPanelRegionTerrainInfo::onCommitRegionWL(void* userData) { +#if 0 LLEnvManager::getInstance()->commitSettings(LLEnvKey::SCOPE_REGION); LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); +#endif } // Handle cancel of WL settings for region void LLPanelRegionTerrainInfo::onCancelRegionWL(void* userData) { +#if 0 LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); +#endif } // Handle reversion of region WL settings to default void LLPanelRegionTerrainInfo::onSetRegionToDefaultWL(void* userData) { +#if 0 LLEnvManager::instance().resetInternalsToDefault(LLEnvKey::SCOPE_REGION); LLEnvManager::instance().startEditingScope(LLEnvKey::SCOPE_REGION); +#endif } void LLPanelRegionTerrainInfo::cancelChanges() { - LLFloaterWindLight::instance()->closeFloater(); - LLFloaterWater::instance()->closeFloater(); - LLFloaterDayCycle::instance()->closeFloater(); - +#if 0 + LLFloaterWindLight::instance().closeFloater(); + LLFloaterWater::instance().closeFloater(); + LLFloaterDayCycle::instance().closeFloater(); +#endif // disable commmit and cancel LLPanelRegionTerrainInfo::instance()->setCommitControls(false); } -- cgit v1.2.3 From 79fb8e2ec26dc2c5a42ef1ee48ebaaa39183c67b Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 31 Mar 2011 18:24:01 +0300 Subject: STORM-1126 WIP Windlight Estate Settings integration: pass 4 Changes: * Fixed incorrect way to pass parameters to notifications. * Fixed crashes in the Advanced Sky floater and the Region Terrain panel. * Fixed initialization and multiple instantiation of the Day Cycle floater (that might lead to incorrect behavior). * Fixed and re-enabled committing env. settings changes to region. * Fixed day cycle and sky settings being sent as empty arrays and therefore not passing validation on server. It is now possible to change region environment settings. * Added debug messages. --- indra/newview/llfloaterregioninfo.cpp | 54 +++++++++++++++++++++-------------- 1 file changed, 33 insertions(+), 21 deletions(-) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 1f42b483d7..874cc1a030 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -408,6 +408,23 @@ LLPanelEstateCovenant* LLFloaterRegionInfo::getPanelCovenant() return panel; } +// static +LLPanelRegionTerrainInfo* LLFloaterRegionInfo::getPanelRegionTerrain() +{ + LLFloaterRegionInfo* floater = LLFloaterReg::getTypedInstance("region_info"); + if (!floater) + { + llassert(floater); + return NULL; + } + + LLTabContainer* tab_container = floater->getChild("region_panels"); + LLPanelRegionTerrainInfo* panel = + dynamic_cast(tab_container->getChild("Terrain")); + llassert(panel); + return panel; +} + void LLFloaterRegionInfo::refreshFromRegion(LLViewerRegion* region) { if (!region) @@ -1158,20 +1175,23 @@ void LLPanelRegionTextureInfo::onClickDump(void* data) // Initialize statics LLPanelRegionTerrainInfo* LLPanelRegionTerrainInfo::sPanelRegionTerrainInfo = NULL; +// static LLPanelRegionTerrainInfo* LLPanelRegionTerrainInfo::instance() { if (!sPanelRegionTerrainInfo) { - sPanelRegionTerrainInfo = new LLPanelRegionTerrainInfo(); + sPanelRegionTerrainInfo = LLFloaterRegionInfo::getPanelRegionTerrain(); + lldebugs << llformat("Instantiating sPanelRegionTerrainInfo: %p", sPanelRegionTerrainInfo) << llendl; } return sPanelRegionTerrainInfo; } -// virtual -void LLPanelRegionTerrainInfo::closeFloater(bool app_quitting) +// static +void LLPanelRegionTerrainInfo::onFloaterClose(bool app_quitting) { if (sPanelRegionTerrainInfo) { + lldebugs << "Setting LLPanelRegionTerrainInfo to NULL" << llendl; sPanelRegionTerrainInfo = NULL; } } @@ -1181,6 +1201,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() LLPanelRegionInfo::postBuild(); sPanelRegionTerrainInfo = this; // singleton instance pointer + lldebugs << llformat("Setting sPanelRegionTerrainInfo to: %p", sPanelRegionTerrainInfo) << llendl; initCtrl("water_height_spin"); initCtrl("terrain_raise_spin"); @@ -1403,18 +1424,17 @@ bool LLPanelRegionTerrainInfo::callbackBakeTerrain(const LLSD& notification, con void LLPanelRegionTerrainInfo::onOpenAdvancedSky(void* userData) { -// LLFloaterWindLight::show(LLEnvKey::SCOPE_REGION); + LLFloaterWindLight::show(LLEnvKey::SCOPE_REGION); } void LLPanelRegionTerrainInfo::onOpenAdvancedWater(void* userData) { -// LLFloaterWater::instance()->show(LLEnvKey::SCOPE_REGION); + LLFloaterWater::show(LLEnvKey::SCOPE_REGION); } void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) { -#if 0 if(LLFloaterWindLight::isOpen()) { // select the blank value in @@ -1424,7 +1444,6 @@ void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) } LLWLParamManager::getInstance()->mAnimator.activate(LLWLAnimator::TIME_LINDEN); -#endif } /////////////////////////////////////////////////////// @@ -1433,36 +1452,29 @@ void LLPanelRegionTerrainInfo::onUseEstateTime(void* userData) // Handle commit of WL settings to region void LLPanelRegionTerrainInfo::onCommitRegionWL(void* userData) { -#if 0 LLEnvManager::getInstance()->commitSettings(LLEnvKey::SCOPE_REGION); LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); -#endif } // Handle cancel of WL settings for region void LLPanelRegionTerrainInfo::onCancelRegionWL(void* userData) { -#if 0 LLEnvManager::getInstance()->maybeClearEditingScope(LLEnvKey::SCOPE_REGION, true, false); -#endif } // Handle reversion of region WL settings to default void LLPanelRegionTerrainInfo::onSetRegionToDefaultWL(void* userData) { -#if 0 LLEnvManager::instance().resetInternalsToDefault(LLEnvKey::SCOPE_REGION); LLEnvManager::instance().startEditingScope(LLEnvKey::SCOPE_REGION); -#endif } void LLPanelRegionTerrainInfo::cancelChanges() { -#if 0 - LLFloaterWindLight::instance().closeFloater(); - LLFloaterWater::instance().closeFloater(); - LLFloaterDayCycle::instance().closeFloater(); -#endif + LLFloaterReg::hideInstance("env_windlight"); + LLFloaterReg::hideInstance("env_water"); + LLFloaterReg::hideInstance("env_day_cycle"); + // disable commmit and cancel LLPanelRegionTerrainInfo::instance()->setCommitControls(false); } @@ -2140,14 +2152,14 @@ bool LLPanelEstateInfo::refreshFromRegion(LLViewerRegion* region) return rv; } -void LLFloaterRegionInfo::closeFloater(bool app_quitting) +// virtual +void LLFloaterRegionInfo::onClose(bool app_quitting) { if(!app_quitting) { LLEnvManager::getInstance()->maybeClearEditingScope(true, false); - LLPanelRegionTerrainInfo::closeFloater(app_quitting); + LLPanelRegionTerrainInfo::onFloaterClose(app_quitting); } - LLFloater::closeFloater(app_quitting); } void LLPanelEstateInfo::updateChild(LLUICtrl* child_ctrl) -- cgit v1.2.3 From 7419abc12ba07380593fa3c0571155b248b8c8a6 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Thu, 31 Mar 2011 18:24:01 +0300 Subject: STORM-1126 WIP Windlight Estate Settings integration: pass 5 * Added "Apply Local to Region" button to the region terrain setttings panel. * Fixed previewing presets via a combomox in the Advanced Sky Editor floater. --- indra/newview/llfloaterregioninfo.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 874cc1a030..c09baf1e09 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -1225,6 +1225,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("WLRegionApply", onCommitRegionWL, this); childSetAction("WLRegionCancel", onCancelRegionWL, this); childSetAction("WLRegionDefault", onSetRegionToDefaultWL, this); + childSetAction("WLCurrentApply", onApplyCurrentWL, this); return TRUE; } @@ -1469,6 +1470,13 @@ void LLPanelRegionTerrainInfo::onSetRegionToDefaultWL(void* userData) LLEnvManager::instance().startEditingScope(LLEnvKey::SCOPE_REGION); } +// static +void LLPanelRegionTerrainInfo::onApplyCurrentWL(void* userData) +{ + // Immediately apply current environment settings to region. + LLEnvManager::instance().applyLocalSettingsToRegion(); +} + void LLPanelRegionTerrainInfo::cancelChanges() { LLFloaterReg::hideInstance("env_windlight"); -- cgit v1.2.3 From fc71ae3e69e78a2e34832418c6c120c9e633bbb6 Mon Sep 17 00:00:00 2001 From: Vadim ProductEngine Date: Mon, 18 Apr 2011 22:13:49 +0300 Subject: STORM-1180 FIX Temporarily disabled region environment controls. Besides, adding a workaround for a crash on exit I've experienced. --- indra/newview/llfloaterregioninfo.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'indra/newview/llfloaterregioninfo.cpp') diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp index 085d118c52..2acb0936dc 100644 --- a/indra/newview/llfloaterregioninfo.cpp +++ b/indra/newview/llfloaterregioninfo.cpp @@ -92,6 +92,8 @@ const S32 TERRAIN_TEXTURE_COUNT = 4; const S32 CORNER_COUNT = 4; +#define TMP_DISABLE_WLES // STORM-1180 + ///---------------------------------------------------------------------------- /// Local class declaration ///---------------------------------------------------------------------------- @@ -1217,6 +1219,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("upload_raw_btn", onClickUploadRaw, this); childSetAction("bake_terrain_btn", onClickBakeTerrain, this); +#ifdef TMP_DISABLE_WLES // WL advanced buttons childSetAction("EnvAdvancedSkyButton", onOpenAdvancedSky, this); childSetAction("EnvAdvancedWaterButton", onOpenAdvancedWater, this); @@ -1227,6 +1230,7 @@ BOOL LLPanelRegionTerrainInfo::postBuild() childSetAction("WLRegionCancel", onCancelRegionWL, this); childSetAction("WLRegionDefault", onSetRegionToDefaultWL, this); childSetAction("WLCurrentApply", onApplyCurrentWL, this); +#endif return TRUE; } @@ -1264,17 +1268,27 @@ bool LLPanelRegionTerrainInfo::refreshFromRegion(LLViewerRegion* region) void LLPanelRegionTerrainInfo::setEnvControls(bool available) { +#ifdef TMP_DISABLE_WLES + available = false; + getChild("wl_settings_unavailable")->setValue("Temporarily disabled."); +#endif + getChildView("EnvUseEstateTimeButton")->setVisible(available); getChildView("EnvAdvancedSkyButton")->setVisible(available); getChildView("EnvAdvancedWaterButton")->setVisible(available); getChildView("WLRegionApply")->setVisible(available); getChildView("WLRegionCancel")->setVisible(available); getChildView("WLRegionDefault")->setVisible(available); + getChildView("WLCurrentApply")->setVisible(available); getChildView("wl_settings_unavailable")->setVisible(!available); } void LLPanelRegionTerrainInfo::setCommitControls(bool available) { +#ifdef TMP_DISABLE_WLES + available = false; +#endif + getChildView("WLRegionApply")->setEnabled(available); getChildView("WLRegionCancel")->setEnabled(available); refresh(); -- cgit v1.2.3