diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 4046ca21bc..a4f7e1e0e5 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -227,13 +227,18 @@ set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express
set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.")
# When using Havok, we have to turn OpenSim support off
-if( HAVOK_TPV )
- if( OPENSIM )
- message( "compiling with Havok libraries, disabling OpenSim support" )
- endif( OPENSIM )
-
- set( OPENSIM OFF )
-endif( HAVOK_TPV )
+if (HAVOK_TPV)
+ if (OPENSIM)
+ message("compiling with Havok libraries, disabling OpenSim support")
+ endif (OPENSIM)
+
+ if (LINUX)
+ message("compiling with Havok libraries is not supported on Linux - switching to HACD")
+ set(HAVOK_TPV OFF)
+ endif (LINUX)
+
+ set(OPENSIM OFF)
+endif (HAVOK_TPV)
#
source_group("CMake Rules" FILES CMakeLists.txt)
diff --git a/indra/llinventory/llinventorysettings.cpp b/indra/llinventory/llinventorysettings.cpp
index fdad50e8d4..a2ed9e1596 100644
--- a/indra/llinventory/llinventorysettings.cpp
+++ b/indra/llinventory/llinventorysettings.cpp
@@ -54,7 +54,15 @@ struct SettingsEntry : public LLDictionaryEntry
{
mLabel = transdname;
}
- }
+
+ // Name of newly created setting is not translated
+ transdname = sTranslator->getString(mDefaultNewName);
+ if (!transdname.empty())
+ {
+ mDefaultNewName = transdname;
+ }
+ //
+}
std::string mLabel;
std::string mDefaultNewName; //keep mLabel for backward compatibility
diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp
index 5d6947d058..9abe8d1082 100644
--- a/indra/llmath/llvolume.cpp
+++ b/indra/llmath/llvolume.cpp
@@ -5331,21 +5331,14 @@ bool LLVolumeFace::cacheOptimize()
llassert(!mOptimized);
mOptimized = TRUE;
- // FIRE-23370/BUG-8801/MAIN-5060
+ // FIRE-23370/BUG-8801/MAIN-5060/FIRE-29492
// cacheOptimize will destroy triangles. This is due to LLVCacheVertexData pointing to vertices in the vector vertex_data.
// Once vertex_data is sorted (std::sort(triangle_data.begin(), triangle_data.end()) ) this will invalidate those pointers and
// LLVCacheVertexData suddenly does point to unrelated vertices. It is an interesting fact that this is no problem for the
// windows version.
//
- // To solve the issue with the pointer invalidation it use a std::vector< U16 > for triangle indices, sort this using
- // std::sort( v.begin(), v.end(), [&triangle_data](U16 rhs, U16 lhs ){ return triangle_data[rhs].mScore > triangle_data[lhs].mScore; }
- // Then access all LLVCacheTriangleData> via triangle_data[ v[ idx ] ].
- //
- // Unfortunately this is a bit of a messy interwoven change all of this method, alternative is to copy a Linux specific version. Which
- // won't be that great either
- // NB The change really should be safe for Winows too, in fact it is surprising Windows does not suffer fro the sae bug. Just cannot test
- // the windows versions right now.
+#ifndef LL_LINUX
LLVCacheLRU cache;
if (mNumVertices < 3 || mNumIndices < 3)
@@ -5380,13 +5373,6 @@ bool LLVolumeFace::cacheOptimize()
triangle_data[tri_idx].mVertex[i%3] = &(vertex_data[idx]);
}
-// FIRE-23370/BUG-8801/MAIN-5060
-#ifdef LL_LINUX
- std::vector< U32 > v;
- for (U32 j = 0; j < triangle_data.size(); ++j)
- v.push_back( j );
-#endif
-
/*F32 pre_acmr = 1.f;
//measure cache misses from before rebuild
{
@@ -5418,27 +5404,14 @@ bool LLVolumeFace::cacheOptimize()
}
//sort triangle data by score
-// FIRE-23370/BUG-8801/MAIN-5060
-#ifndef LL_LINUX
std::sort(triangle_data.begin(), triangle_data.end());
-#else
- std::sort( v.begin(), v.end(),
- [&triangle_data](U16 rhs, U16 lhs )
- { return triangle_data[rhs].mScore > triangle_data[lhs].mScore; }
- );
-#endif
std::vector new_indices;
LLVCacheTriangleData* tri;
//prime pump by adding first triangle to cache;
-// FIRE-23370/BUG-8801/MAIN-5060
-#ifndef LL_LINUX
tri = &(triangle_data[0]);
-#else
- tri = &(triangle_data[v[0]]);
-#endif
cache.addTriangle(tri);
new_indices.push_back(tri->mVertex[0]->mIdx);
@@ -5456,21 +5429,11 @@ bool LLVolumeFace::cacheOptimize()
breaks++;
for (U32 j = 0; j < triangle_data.size(); ++j)
{
-// FIRE-23370/BUG-8801/MAIN-5060
-#ifndef LL_LINUX
if (triangle_data[j].mActive)
{
tri = &(triangle_data[j]);
break;
}
-#else
- if (triangle_data[v[j]].mActive)
- {
- tri = &(triangle_data[v[j]]);
- break;
- }
-#endif
-
}
}
@@ -5607,7 +5570,8 @@ bool LLVolumeFace::cacheOptimize()
//std::string result = llformat("ACMR pre/post: %.3f/%.3f -- %d triangles %d breaks", pre_acmr, post_acmr, mNumIndices/3, breaks);
//LL_INFOS() << result << LL_ENDL;
-
+#endif
+
return true;
}
diff --git a/indra/newview/fspanellogin.cpp b/indra/newview/fspanellogin.cpp
index 63c2b4bd9b..4e7dbab972 100644
--- a/indra/newview/fspanellogin.cpp
+++ b/indra/newview/fspanellogin.cpp
@@ -84,6 +84,7 @@ FSPanelLogin *FSPanelLogin::sInstance = NULL;
BOOL FSPanelLogin::sCapslockDidNotification = FALSE;
BOOL FSPanelLogin::sCredentialSet = FALSE;
std::string FSPanelLogin::sPassword = "";
+std::string FSPanelLogin::sPendingNewGridURI{};
// Helper for converting a user name into the canonical "Firstname Lastname" form.
// For new accounts without a last name "Resident" is added as a last name.
@@ -227,6 +228,9 @@ FSPanelLogin::FSPanelLogin(const LLRect &rect,
LLComboBox* server_choice_combo = getChild("server_combo");
server_choice_combo->setCommitCallback(boost::bind(&FSPanelLogin::onSelectServer, this));
+#ifdef OPENSIM
+ server_choice_combo->setToolTip(getString("ServerComboTooltip"));
+#endif
#ifdef SINGLEGRID
server_choice_combo->setEnabled(FALSE);
#endif
@@ -1091,7 +1095,19 @@ void FSPanelLogin::onSelectServer()
LLComboBox* server_combo = getChild("server_combo");
LLSD server_combo_val = server_combo->getSelectedValue();
- LL_INFOS("AppInit") << "grid "<getValue().asString())<< LL_ENDL;
+ if (server_combo_val.isUndefined() && sPendingNewGridURI.empty())
+ {
+ sPendingNewGridURI = server_combo->getValue().asString();
+ LLStringUtil::trim(sPendingNewGridURI);
+ LL_INFOS("AppInit") << "requesting unknown grid "<< sPendingNewGridURI << LL_ENDL;
+ // Previously unknown gridname was entered
+ LLGridManager::getInstance()->addGridListChangedCallback(boost::bind(&FSPanelLogin::gridListChanged, this, _1));
+ LLGridManager::getInstance()->addGrid(sPendingNewGridURI);
+ }
+#endif
+
LLGridManager::getInstance()->setGridChoice(server_combo_val.asString());
/*
@@ -1361,6 +1377,16 @@ void FSPanelLogin::updateServerCombo()
LLComboBox* server_choice_combo = sInstance->getChild("server_combo");
server_choice_combo->removeall();
+#if OPENSIM && !SINGLEGRID
+ if (!sPendingNewGridURI.empty())
+ {
+ LLSD grid_name = LLGridManager::getInstance()->getGridByAttribute(GRID_LOGIN_URI_VALUE, sPendingNewGridURI, false);
+ LL_INFOS("AppInit") << "new grid for ["<setSelectedByValue(grid_name, true);
+ LLGridManager::getInstance()->setGridChoice(grid_name.asString());
+ }
+#endif
+
std::string current_grid = LLGridManager::getInstance()->getGrid();
std::map known_grids = LLGridManager::getInstance()->getKnownGrids();
@@ -1401,10 +1427,11 @@ std::string FSPanelLogin::credentialName()
return username + "@" + LLGridManager::getInstance()->getGrid();
}
-// static
+
void FSPanelLogin::gridListChanged(bool success)
{
updateServer();
+ sPendingNewGridURI.clear(); // success or fail we clear the pending URI as we will not get another callback.
}
// static
diff --git a/indra/newview/fspanellogin.h b/indra/newview/fspanellogin.h
index 2c3a2ac56f..9ce2509404 100644
--- a/indra/newview/fspanellogin.h
+++ b/indra/newview/fspanellogin.h
@@ -89,6 +89,7 @@ public:
static void clearPassword() { sPassword.clear(); }
+ void gridListChanged(bool success);
private:
void addFavoritesToStartLocation();
void addUsersToCombo(BOOL show_server);
@@ -109,7 +110,6 @@ private:
static void onClickRemove(void*);
static void onRemoveCallback(const LLSD& notification, const LLSD& response);
static void onClickGridMgrHelp(void*);
- static void gridListChanged(bool success);
static std::string credentialName();
private:
@@ -132,6 +132,7 @@ private:
std::string mPreviousUsername;
static std::string sPassword;
+ static std::string sPendingNewGridURI;
bool mInitialized;
};
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index 13c2d94f6c..342ee3ccf5 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -2444,7 +2444,6 @@ LLEnvironment::DayInstance::DayInstance(EnvSelection_t env) :
mWater(),
mDayLength(LLSettingsDay::DEFAULT_DAYLENGTH),
mDayOffset(LLSettingsDay::DEFAULT_DAYOFFSET),
- mDayOffsetOverride(LLSettingsDay::MINIMUM_DAYOFFSET), // KC
mBlenderSky(),
mBlenderWater(),
mInitialized(false),
@@ -2554,7 +2553,6 @@ void LLEnvironment::DayInstance::clear()
mWater.reset();
mDayLength = LLSettingsDay::DEFAULT_DAYLENGTH;
mDayOffset = LLSettingsDay::DEFAULT_DAYOFFSET;
- mDayOffsetOverride = LLSettingsDay::MINIMUM_DAYOFFSET; // KC
mBlenderSky.reset();
mBlenderWater.reset();
mSkyTrack = 1;
@@ -2578,8 +2576,7 @@ void LLEnvironment::DayInstance::setBlenders(const LLSettingsBlender::ptr_t &sky
LLSettingsBase::TrackPosition LLEnvironment::DayInstance::getProgress() const
{
LLSettingsBase::Seconds now(LLDate::now().secondsSinceEpoch());
- // now += mDayOffset;
- now += mDayOffset + mDayOffsetOverride; // KC
+ now += mDayOffset;
if ((mDayLength <= 0) || !mDayCycle)
return -1.0f; // no actual day cycle.
@@ -2596,8 +2593,7 @@ void LLEnvironment::DayInstance::animate()
{
LLSettingsBase::Seconds now(LLDate::now().secondsSinceEpoch());
- // now += mDayOffset;
- now += mDayOffset + mDayOffsetOverride; // KC
+ now += mDayOffset;
if (!mDayCycle)
return;
@@ -2615,8 +2611,7 @@ void LLEnvironment::DayInstance::animate()
{
mWater = LLSettingsVOWater::buildDefaultWater();
mBlenderWater = std::make_shared(mWater, mDayCycle, 0,
- // mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
- mDayLength, mDayOffset + mDayOffsetOverride, DEFAULT_UPDATE_THRESHOLD); // KC
+ mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
}
}
@@ -2634,8 +2629,7 @@ void LLEnvironment::DayInstance::animate()
{
mSky = LLSettingsVOSky::buildDefaultSky();
mBlenderSky = std::make_shared(mSky, mDayCycle, 1,
- // mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
- mDayLength, mDayOffset + mDayOffsetOverride, DEFAULT_UPDATE_THRESHOLD); // KC
+ mDayLength, mDayOffset, DEFAULT_UPDATE_THRESHOLD);
mBlenderSky->switchTrack(mSkyTrack, 0.0);
}
}
diff --git a/indra/newview/llenvironment.h b/indra/newview/llenvironment.h
index b80a606c12..91c4b85135 100644
--- a/indra/newview/llenvironment.h
+++ b/indra/newview/llenvironment.h
@@ -262,11 +262,9 @@ public:
LLSettingsWater::ptr_t getWater() const { return mWater; }
LLSettingsDay::Seconds getDayLength() const { return mDayLength; }
LLSettingsDay::Seconds getDayOffset() const { return mDayOffset; }
- LLSettingsDay::Seconds getDayOffsetOverride() const { return mDayOffsetOverride; } //KC
S32 getSkyTrack() const { return mSkyTrack; }
void setDayOffset(LLSettingsBase::Seconds offset) { mDayOffset = offset; animate(); }
- void setDayOffsetOverride(LLSettingsBase::Seconds offset) { mDayOffsetOverride = offset; animate(); } //KC
virtual void animate();
@@ -293,7 +291,6 @@ public:
LLSettingsDay::Seconds mDayLength;
LLSettingsDay::Seconds mDayOffset;
- LLSettingsDay::Seconds mDayOffsetOverride;
S32 mLastTrackAltitude;
LLSettingsBlender::ptr_t mBlenderSky;
@@ -325,14 +322,6 @@ public:
DayInstance::ptr_t getSelectedEnvironmentInstance();
DayInstance::ptr_t getSharedEnvironmentInstance();
-//
-public:
- LLSettingsDay::Seconds getDayLength() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayLength() : LLSettingsDay::MINIMUM_DAYOFFSET; }
- LLSettingsDay::Seconds getDayOffset() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayOffset() : LLSettingsDay::INVALID_DAYOFFSET; }
- void setDayOffsetOverride(LLSettingsBase::Seconds offset) { if (mCurrentEnvironment) mCurrentEnvironment->setDayOffsetOverride(offset); }
- LLSettingsDay::Seconds getDayOffsetOverride() const { return (mCurrentEnvironment) ? mCurrentEnvironment->getDayOffsetOverride() : LLSettingsDay::MINIMUM_DAYOFFSET; }
-//
-
protected:
virtual void initSingleton() override;
virtual void cleanupSingleton() override;
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index c9db61723b..fb4a2efc75 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3299,7 +3299,7 @@ void LLModelPreview::updateStatusMessages()
// physStatusIcon->setImage(img);
// }
//}
-#ifdef OPENSIM
+#ifndef HAVOK_TPV
has_physics_error |= PhysicsError::NOHAVOK;
#endif
diff --git a/indra/newview/llfloatersnapshot.cpp b/indra/newview/llfloatersnapshot.cpp
index b56ca2a01d..3abdecf955 100644
--- a/indra/newview/llfloatersnapshot.cpp
+++ b/indra/newview/llfloatersnapshot.cpp
@@ -84,7 +84,9 @@ LLSnapshotModel::ESnapshotType LLFloaterSnapshotBase::ImplBase::getActiveSnapsho
{
return spanel->getSnapshotType();
}
- return LLSnapshotModel::SNAPSHOT_WEB;
+ // Fix XUI parser warnings
+ //return LLSnapshotModel::SNAPSHOT_WEB;
+ return LLSnapshotModel::SNAPSHOT_NONE;
}
// virtual
@@ -322,7 +324,10 @@ void LLFloaterSnapshot::Impl::updateControls(LLFloaterSnapshotBase* floater)
floater->getChildView("layer_types")->setEnabled(shot_type == LLSnapshotModel::SNAPSHOT_LOCAL);
LLPanelSnapshot* active_panel = getActivePanel(floater);
- if (active_panel)
+ // Fix XUI parser warning
+ //if (active_panel)
+ if (active_panel && active_panel->getName() != "panel_snapshot_options")
+ //
{
LLSpinCtrl* width_ctrl = getWidthSpinner(floater);
LLSpinCtrl* height_ctrl = getHeightSpinner(floater);
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index a2ce9e0ff0..d9a99df522 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -1348,18 +1348,39 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
}
else // IM_TASK_INVENTORY_OFFERED
{
- info->mType = (LLAssetType::EType) binary_bucket[0];
- info->mObjectID = LLUUID::null;
- info->mFromObject = TRUE;
- }
+ if (offline == IM_OFFLINE && session_id.isNull() && aux_id.notNull() && binary_bucket_size > sizeof(S8)* 5)
+ {
+ // cap received offline message
+ std::string str_bucket = ll_safe_string((char*)binary_bucket, binary_bucket_size);
+ typedef boost::tokenizer > tokenizer;
+ boost::char_separator sep("|", "", boost::keep_empty_tokens);
+ tokenizer tokens(str_bucket, sep);
+ tokenizer::iterator iter = tokens.begin();
- // In the case of an offline message, the transaction id will be in aux_id and th session_id will be null
- // (conversely when online the transaction id is passed as session_id)
- info->mTransactionID = session_id.isNull() ? aux_id : session_id;
+ info->mType = (LLAssetType::EType)(atoi((*(iter++)).c_str()));
+ // Note There is more elements in 'tokens' ...
+
+ info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
+ }
+ else
+ {
+ if (sizeof(S8) != binary_bucket_size)
+ {
+ LL_WARNS("Messaging") << "Malformed inventory offer from object" << LL_ENDL;
+ delete info;
+ break;
+ }
+ info->mType = (LLAssetType::EType) binary_bucket[0];
+ info->mObjectID = LLUUID::null;
+ info->mFromObject = TRUE;
+ }
+ }
info->mIM = dialog;
info->mFromID = from_id;
info->mFromGroup = from_group;
+ info->mTransactionID = session_id;
info->mFolderID = gInventory.findCategoryUUIDForType(LLFolderType::assetTypeToFolderType(info->mType));
info->mFromName = name;
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 1420a04edd..81aa1e444b 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -8498,7 +8498,9 @@ void LLFolderViewGroupedItemBridge::groupFilterContextMenu(folder_view_item_dequ
menuentry_vec_t disabled_items;
if (get_selection_item_uuids(selected_items, ids))
{
- if (!LLAppearanceMgr::instance().canAddWearables(ids) && canWearSelected(ids))
+ // Fix broken add wearable check
+ //if (!LLAppearanceMgr::instance().canAddWearables(ids) && canWearSelected(ids))
+ if (!canWearSelected(ids) || !LLAppearanceMgr::instance().canAddWearables(ids))
{
disabled_items.push_back(std::string("Wearable And Object Wear"));
disabled_items.push_back(std::string("Wearable Add"));
@@ -8514,7 +8516,9 @@ bool LLFolderViewGroupedItemBridge::canWearSelected(uuid_vec_t item_ids)
for (uuid_vec_t::const_iterator it = item_ids.begin(); it != item_ids.end(); ++it)
{
LLViewerInventoryItem* item = gInventory.getItem(*it);
- if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE))
+ // Fix broken add wearable check
+ //if (!item || (item->getType() >= LLAssetType::AT_COUNT) || (item->getType() <= LLAssetType::AT_NONE))
+ if (!item || (item->getType() != LLAssetType::AT_CLOTHING && item->getType() != LLAssetType::AT_OBJECT && item->getType() != LLAssetType::AT_BODYPART && item->getType() != LLAssetType::AT_GESTURE))
{
return false;
}
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index 6d9bcad16a..9cbda7bbba 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -2925,7 +2925,7 @@ void LLPanelObject::onCopyParams(const LLSD& data)
mParamsClipboard["Light Intensity"] = volobjp->getLightIntensity();
mParamsClipboard["Light Radius"] = volobjp->getLightRadius();
mParamsClipboard["Light Falloff"] = volobjp->getLightFalloff();
- LLColor3 color = volobjp->getLightSRGBBaseColor();
+ LLColor3 color = volobjp->getLightSRGBColor();
mParamsClipboard["r"] = color.mV[0];
mParamsClipboard["g"] = color.mV[1];
mParamsClipboard["b"] = color.mV[2];
diff --git a/indra/newview/llpanelsnapshot.cpp b/indra/newview/llpanelsnapshot.cpp
index ce12c5ea2a..2ee1fae655 100644
--- a/indra/newview/llpanelsnapshot.cpp
+++ b/indra/newview/llpanelsnapshot.cpp
@@ -61,7 +61,14 @@ LLPanelSnapshot::LLPanelSnapshot()
// virtual
BOOL LLPanelSnapshot::postBuild()
{
- getChild("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
+ // Fix XUI parser warning
+ //getChild("save_btn")->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
+ LLUICtrl* save_btn = findChild("save_btn");
+ if (save_btn)
+ {
+ save_btn->setLabelArg("[UPLOAD_COST]", std::to_string(LLAgentBenefitsMgr::current().getTextureUploadCost()));
+ }
+ //
getChild(getImageSizeComboName())->setCommitCallback(boost::bind(&LLPanelSnapshot::onResolutionComboCommit, this, _1));
if (!getWidthSpinnerName().empty())
{
diff --git a/indra/newview/llpanelsnapshotlocal.cpp b/indra/newview/llpanelsnapshotlocal.cpp
index c2cc4d26a1..2f1e97c7e4 100644
--- a/indra/newview/llpanelsnapshotlocal.cpp
+++ b/indra/newview/llpanelsnapshotlocal.cpp
@@ -145,7 +145,14 @@ void LLPanelSnapshotLocal::updateControls(const LLSD& info)
const bool show_quality_ctrls = (fmt == LLSnapshotModel::SNAPSHOT_FORMAT_JPEG);
getChild("image_quality_slider")->setVisible(show_quality_ctrls);
- getChild("image_quality_level")->setVisible(show_quality_ctrls);
+ // Fix XUI parser warning
+ //getChild("image_quality_level")->setVisible(show_quality_ctrls);
+ LLUICtrl* image_quality_level = findChild("image_quality_level");
+ if (image_quality_level)
+ {
+ image_quality_level->setVisible(show_quality_ctrls);
+ }
+ //
getChild("image_quality_slider")->setValue(gSavedSettings.getS32("SnapshotQuality"));
updateImageQualityLevel();
diff --git a/indra/newview/llsnapshotmodel.h b/indra/newview/llsnapshotmodel.h
index 02f8ea1b84..c359b800ec 100644
--- a/indra/newview/llsnapshotmodel.h
+++ b/indra/newview/llsnapshotmodel.h
@@ -36,7 +36,8 @@ public:
SNAPSHOT_TEXTURE,
SNAPSHOT_LOCAL,
SNAPSHOT_WEB,
- SNAPSHOT_FLICKR
+ SNAPSHOT_FLICKR,
+ SNAPSHOT_NONE // Fix XUI parser warnings
};
typedef enum e_snapshot_format
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 7a62535ff5..3c73ed7857 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -551,7 +551,7 @@ void LLToolBarView::onToolBarButtonAdded(LLView* button)
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{
LLTransientFloaterMgr::getInstance()->addControlView(button);
- FloaterQuickPrefs* quickprefs_floater = LLFloaterReg::getTypedInstance("quickprefs");
+ FloaterQuickPrefs* quickprefs_floater = LLFloaterReg::findTypedInstance("quickprefs");
if (quickprefs_floater && quickprefs_floater->isShown())
{
quickprefs_floater->dockToToolbarButton();
@@ -601,7 +601,7 @@ void LLToolBarView::onToolBarButtonRemoved(LLView* button)
else if (button->getName() == "quickprefs" && !FSCommon::isLegacySkin())
{
LLTransientFloaterMgr::getInstance()->removeControlView(button);
- FloaterQuickPrefs* quickprefs_floater = LLFloaterReg::getTypedInstance("quickprefs");
+ FloaterQuickPrefs* quickprefs_floater = LLFloaterReg::findTypedInstance("quickprefs");
if (quickprefs_floater && quickprefs_floater->isShown())
{
quickprefs_floater->setUseTongue(false);
diff --git a/indra/newview/quickprefs.cpp b/indra/newview/quickprefs.cpp
index 5f0454835c..e1a8f6bb2f 100644
--- a/indra/newview/quickprefs.cpp
+++ b/indra/newview/quickprefs.cpp
@@ -47,9 +47,7 @@
#include "llfloaterreg.h"
#include "llinventoryfunctions.h"
#include "lllayoutstack.h"
-#include "llmultisliderctrl.h"
#include "llnotificationsutil.h"
-#include "llsettingsvo.h"
#include "llsliderctrl.h"
#include "llspinctrl.h"
#include "lltoolbarview.h"
@@ -57,10 +55,7 @@
#include "llviewerregion.h"
#include "llvoavatar.h"
#include "llvoavatarself.h"
-#include "llvirtualtrackball.h"
#include "rlvhandler.h"
-#include
-
std::string unescape_name(const std::string& name);
class FSSettingsCollector : public LLInventoryCollectFunctor
@@ -109,6 +104,7 @@ FloaterQuickPrefs::FloaterQuickPrefs(const LLSD& key)
: LLTransientDockableFloater(NULL, false, key),
mAvatarZOffsetSlider(NULL),
mRlvBehaviorCallbackConnection(),
+ mEnvChangedConnection(),
mRegionChangedSlot()
{
// For Phototools
@@ -132,6 +128,11 @@ FloaterQuickPrefs::~FloaterQuickPrefs()
mRegionChangedSlot.disconnect();
}
+ if (mEnvChangedConnection.connected())
+ {
+ mEnvChangedConnection.disconnect();
+ }
+
if (!getIsPhototools() && !FSCommon::isLegacySkin())
{
LLTransientFloaterMgr::getInstance()->removeControlView(this);
@@ -195,8 +196,6 @@ void FloaterQuickPrefs::initCallbacks()
getChild("DCPrevPreset")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickDayCyclePrev, this));
getChild("DCNextPreset")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickDayCycleNext, this));
getChild("ResetToRegionDefault")->setCommitCallback(boost::bind(&FloaterQuickPrefs::onClickResetToRegionDefault, this));
- getChild("time_offset")->setSliderMouseUpCallback(boost::bind(&FloaterQuickPrefs::onDayOffset, this));
- getChild("sun_rotation")->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSunMoved(); });
// Phototools additions
if (getIsPhototools())
@@ -269,7 +268,7 @@ void FloaterQuickPrefs::initCallbacks()
mRlvBehaviorCallbackConnection = gRlvHandler.setBehaviourCallback(boost::bind(&FloaterQuickPrefs::updateRlvRestrictions, this, _1, _2));
gSavedSettings.getControl("IndirectMaxNonImpostors")->getCommitSignal()->connect(boost::bind(&FloaterQuickPrefs::updateMaxNonImpostors, this, _2));
- LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t, S32){ setSelectedEnvironment(); });
+ mEnvChangedConnection = LLEnvironment::instance().setEnvironmentChanged([this](LLEnvironment::EnvSelection_t env, S32 version){ setSelectedEnvironment(); });
}
void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap& daycycle_map)
@@ -292,7 +291,6 @@ void FloaterQuickPrefs::loadDayCyclePresets(const std::multimap& sky_map)
{
mWLPresetsCombo->operateOnAll(LLComboBox::OP_DELETE);
@@ -336,13 +334,19 @@ void FloaterQuickPrefs::loadWaterPresets(const std::multimap sky_map;
std::multimap water_map;
@@ -377,136 +381,47 @@ void FloaterQuickPrefs::loadPresets()
void FloaterQuickPrefs::setSelectedEnvironment()
{
- LL_INFOS() << "EEP: setSelectedEnvironment: " << LLEnvironment::instance().getSelectedEnvironment() << LL_ENDL;
+ //LL_INFOS() << "EEP: getSelectedEnvironment: " << LLEnvironment::instance().getSelectedEnvironment() << LL_ENDL;
- switch (LLEnvironment::instance().getSelectedEnvironment())
+ mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
+ mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
+ mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
+
+ if (LLEnvironment::instance().getSelectedEnvironment() == LLEnvironment::ENV_LOCAL)
{
- case LLEnvironment::ENV_REGION:
- case LLEnvironment::ENV_PARCEL:
+ // Day cycle, fixed sky and fixed water may all be set at the same time
+ // Check and set day cycle first. Fixed sky and water both override
+ // the sky and water settings in a day cycle, so check them after the
+ // day cycle. If no fixed sky or fixed water is set, they are either
+ // defined in the day cycle or inherited from a higher environment level.
+ LLSettingsDay::ptr_t day = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_LOCAL);
+ if (day && day->getAssetId().notNull())
{
- LL_INFOS() << "EEP: ENV_REGION / ENV_PARCEL" << LL_ENDL;
+ //LL_INFOS() << "EEP: day name = " << day->getName() << " - asset id = " << day->getAssetId() << LL_ENDL;
- mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
- mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
- mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_REGION_DEFAULT));
- break;
+ mDayCyclePresetsCombo->selectByValue(LLSD(day->getAssetId()));
+
+ // Water is part of a day cycle
+ mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
+ mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
}
- case LLEnvironment::ENV_LOCAL:
+ LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
+ if (sky && sky->getAssetId().notNull())
{
- //LLSettingsDay::ptr_t day = LLEnvironment::instance().getCurrentDay();
- LLSettingsDay::ptr_t day = LLEnvironment::instance().getEnvironmentDay(LLEnvironment::ENV_LOCAL);
- if (day)
- {
- LL_INFOS() << "EEP: day name = " << day->getName() << LL_ENDL;
+ //LL_INFOS() << "EEP: sky name = " << sky->getName() << " - asset id = " << sky->getAssetId() << LL_ENDL;
- LLUUID asset_id = day->getAssetId();
- if (asset_id.notNull())
- {
- mDayCyclePresetsCombo->selectByValue(LLSD(asset_id));
-
- // Water is part of a day cycle
- mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
- mWaterPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
- }
- else
- {
- //mDayCyclePresetsCombo->selectByValue(LLSD(day->getName()));
- std::string preset_name = day->getName();
- if (preset_name == "_default_")
- {
- preset_name = "Default";
- }
- mDayCyclePresetsCombo->selectByValue(preset_name);
-
- mWLPresetsCombo->selectByValue(LLSD(PRESET_NAME_DAY_CYCLE));
-
- // Legacy daycycle has no water. Need to find out what is currently selected
- // as water preset. Seems it will always be default fixed water ("_default_").
- LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
- if (water)
- {
- LL_INFOS() << "EEP: water name = " << water->getName() << LL_ENDL;
-
- LLUUID asset_id = water->getAssetId();
- if (asset_id.notNull())
- {
- mWaterPresetsCombo->selectByValue(LLSD(asset_id));
- }
- else
- {
- //mWaterPresetsCombo->selectByValue(LLSD(water->getName()));
- std::string preset_name = water->getName();
- if (preset_name == "_default_")
- {
- preset_name = "Default";
- }
- mWaterPresetsCombo->selectByValue(preset_name);
- }
- }
- }
- }
- else
- {
- mDayCyclePresetsCombo->selectByValue(LLSD(PRESET_NAME_NONE));
-
- //LLSettingsSky::ptr_t sky = LLEnvironment::instance().getCurrentSky();
- LLSettingsSky::ptr_t sky = LLEnvironment::instance().getEnvironmentFixedSky(LLEnvironment::ENV_LOCAL);
- if (sky)
- {
- LL_INFOS() << "EEP: sky name = " << sky->getName() << LL_ENDL;
-
- LLUUID asset_id = sky->getAssetId();
- if (asset_id.notNull())
- {
- mWLPresetsCombo->selectByValue(LLSD(asset_id));
- }
- else
- {
- //mWLPresetsCombo->selectByValue(LLSD(sky->getName()));
- std::string preset_name = sky->getName();
- if (preset_name == "_default_")
- {
- preset_name = "Default";
- }
- mWLPresetsCombo->selectByValue(preset_name);
- }
- }
-
- // LLEnvironment::instance().getCurrentWater() will return correct preset only after
- // calling updateEnvironment(), which is too late.
- //LLSettingsWater::ptr_t water = LLEnvironment::instance().getCurrentWater();
- LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
- if (water)
- {
- LL_INFOS() << "EEP: water name = " << water->getName() << LL_ENDL;
-
- LLUUID asset_id = water->getAssetId();
- if (asset_id.notNull())
- {
- mWaterPresetsCombo->selectByValue(LLSD(asset_id));
- }
- else
- {
- // What if preset name is empty???
- //mWaterPresetsCombo->selectByValue(LLSD(water->getName()));
- std::string preset_name = water->getName();
- if (preset_name == "_default_")
- {
- preset_name = "Default";
- }
- mWaterPresetsCombo->selectByValue(preset_name);
- }
- }
-
- }
- break;
+ mWLPresetsCombo->selectByValue(LLSD(sky->getAssetId()));
+ }
+
+ LLSettingsWater::ptr_t water = LLEnvironment::instance().getEnvironmentFixedWater(LLEnvironment::ENV_LOCAL);
+ if (water && water->getAssetId().notNull())
+ {
+ //LL_INFOS() << "EEP: water name = " << water->getName() << " - asset id = " << water->getAssetId() << LL_ENDL;
+
+ mWaterPresetsCombo->selectByValue(LLSD(water->getAssetId()));
}
- default:
- break;
}
-
- updateDayOffset();
}
BOOL FloaterQuickPrefs::postBuild()
@@ -519,7 +434,6 @@ BOOL FloaterQuickPrefs::postBuild()
mCtrlUseSSAO = getChild("UseSSAO");
mCtrlUseDoF = getChild("UseDepthofField");
mCtrlShadowDetail = getChild("ShadowDetail");
- mCtrlAvatarShadowDetail = getChild("AvatarShadowDetail");
mCtrlReflectionDetail = getChild("Reflections");
// Vignette UI controls
@@ -558,9 +472,6 @@ BOOL FloaterQuickPrefs::postBuild()
mWaterPresetsCombo = getChild("WaterPresetsCombo");
mWLPresetsCombo = getChild("WLPresetsCombo");
mDayCyclePresetsCombo = getChild("DCPresetsCombo");
- mWLSunRot = getChild("sun_rotation");
- mWLDayOffset = getChild("time_offset");
- mWLDayOffset->addSlider(0);
initCallbacks();
loadPresets();
@@ -666,7 +577,7 @@ void FloaterQuickPrefs::loadSavedSettingsFromFile(const std::string& settings_pa
bool save_settings = false;
// add the elements from the XML file to the internal list of controls
- BOOST_FOREACH(const QuickPrefsXMLEntry& xml_entry, xml.entries)
+ for (const QuickPrefsXMLEntry& xml_entry : xml.entries)
{
// get the label
std::string label = xml_entry.label;
@@ -866,76 +777,16 @@ void FloaterQuickPrefs::onClickDayCycleNext()
selectDayCyclePreset(mDayCyclePresetsCombo->getSelectedValue());
}
-void FloaterQuickPrefs::draw()
-{
- updateSun();
- LLTransientDockableFloater::draw();
-}
-
-void FloaterQuickPrefs::updateDayOffset()
-{
- // KC: Limit day cycle offset max to day length if less than a full real day
- LLSettingsDay::Seconds day_length = LLEnvironment::instance().getDayLength();
- if (day_length > LLSettingsDay::MINIMUM_DAYOFFSET)
- {
- if (day_length < LLSettingsDay::MAXIMUM_DAYOFFSET)
- {
- mWLDayOffset->setMaxValue(day_length);
- }
- else
- {
- mWLDayOffset->setMaxValue(LLSettingsDay::MAXIMUM_DAYOFFSET);
- }
- mWLDayOffset->setCurSliderValue(LLEnvironment::instance().getDayOffsetOverride());
- }
- else
- {
- mWLDayOffset->setCurSliderValue(0);
- }
-}
-
-const F32 SUN_ROTATION_PRECISION = 0.1f;
-
-void FloaterQuickPrefs::updateSun()
-{
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- mWLSunRot->setRotation(psky->getSunRotation());
-}
-
-void FloaterQuickPrefs::onDayOffset()
-{
- //KC: Forces the environment time by an additional offset
- if (LLEnvironment::instance().getDayOffset() > LLSettingsDay::INVALID_DAYOFFSET)
- {
- LLSettingsDay::Seconds day_offset(mWLDayOffset->getCurSliderValue());
- LLEnvironment::instance().setDayOffsetOverride(day_offset);
- LLEnvironment::instance().updateEnvironment();
- }
-}
-
-void FloaterQuickPrefs::onSunMoved()
-{
- LLSettingsSky::ptr_t psky = LLEnvironment::instance().getCurrentSky();
- psky->setSunRotation(mWLSunRot->getRotation());
- psky->updateSettings();
-}
-
void FloaterQuickPrefs::onClickResetToRegionDefault()
{
mWLPresetsCombo->setValue(LLSD(PRESET_NAME_REGION_DEFAULT));
mWaterPresetsCombo->setValue(LLSD(PRESET_NAME_REGION_DEFAULT));
-
- LLEnvironment::instance().setDayOffsetOverride(LLSettingsDay::MINIMUM_DAYOFFSET);
- mWLDayOffset->setCurSliderValue(0);
- LLEnvironment::instance().clearEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().setSelectedEnvironment(LLEnvironment::ENV_LOCAL);
- LLEnvironment::instance().updateEnvironment();
+ LLEnvironment::instance().setSharedEnvironment();
}
void FloaterQuickPrefs::setSelectedSky(const std::string& preset_name)
{
mWLPresetsCombo->setValue(LLSD(preset_name));
- mDayCyclePresetsCombo->setValue(LLSD(PRESET_NAME_NONE));
}
void FloaterQuickPrefs::setSelectedWater(const std::string& preset_name)
@@ -985,8 +836,6 @@ void FloaterQuickPrefs::refreshSettings()
mCtrlShadowDetail->setEnabled(enabled);
- mCtrlAvatarShadowDetail->setEnabled(enabled && mCtrlShadowDetail->getValue().asInteger() > 0);
-
// disabled windlight
if (!LLFeatureManager::getInstance()->isFeatureAvailable("WindLightUseAtmosShaders"))
{
@@ -1001,9 +850,6 @@ void FloaterQuickPrefs::refreshSettings()
//deferred needs windlight, disable deferred
mCtrlShadowDetail->setEnabled(FALSE);
mCtrlShadowDetail->setValue(0);
-
- mCtrlAvatarShadowDetail->setEnabled(FALSE);
- mCtrlAvatarShadowDetail->setValue(0);
mCtrlUseSSAO->setEnabled(FALSE);
mCtrlUseSSAO->setValue(FALSE);
@@ -1022,9 +868,6 @@ void FloaterQuickPrefs::refreshSettings()
mCtrlShadowDetail->setEnabled(FALSE);
mCtrlShadowDetail->setValue(0);
- mCtrlAvatarShadowDetail->setEnabled(FALSE);
- mCtrlAvatarShadowDetail->setValue(0);
-
mCtrlUseSSAO->setEnabled(FALSE);
mCtrlUseSSAO->setValue(FALSE);
@@ -1047,9 +890,6 @@ void FloaterQuickPrefs::refreshSettings()
{
mCtrlShadowDetail->setEnabled(FALSE);
mCtrlShadowDetail->setValue(0);
-
- mCtrlAvatarShadowDetail->setEnabled(FALSE);
- mCtrlAvatarShadowDetail->setValue(0);
}
// disabled reflections
@@ -1066,10 +906,6 @@ void FloaterQuickPrefs::refreshSettings()
mCtrlShadowDetail->setEnabled(FALSE);
mCtrlShadowDetail->setValue(0);
- mCtrlAvatarShadowDetail->setEnabled(FALSE);
- mCtrlAvatarShadowDetail->setValue(0);
-
-
mCtrlUseSSAO->setEnabled(FALSE);
mCtrlUseSSAO->setValue(FALSE);
@@ -1135,10 +971,7 @@ void FloaterQuickPrefs::enableWindlightButtons(BOOL enable)
childSetEnabled("DCPresetsCombo", enable);
childSetEnabled("DCPrevPreset", enable);
childSetEnabled("DCNextPreset", enable);
- // FIRE-13448: Quickprefs daycycle slider allows evading @setenv=n
- childSetEnabled("time_offset", enable);
- childSetEnabled("sun_rotation", enable);
- // FIRE-13448
+ childSetEnabled("btn_personal_lighting", enable);
if (getIsPhototools())
{
@@ -2071,14 +1904,13 @@ void FloaterQuickPrefs::onClickResetRenderSSAOEffectX()
gSavedSettings.setVector3("RenderSSAOEffect", renderSSAOEffect);
}
-// FIRE-9407 - Restore Quickprefs Defaults
void FloaterQuickPrefs::callbackRestoreDefaults(const LLSD& notification, const LLSD& response)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if ( option == 0 ) // YES
{
selectControl("");
- BOOST_FOREACH(const std::string& control, mControlsOrder)
+ for (const auto& control : mControlsOrder)
{
removeControl(control);
}
@@ -2098,7 +1930,6 @@ void FloaterQuickPrefs::onClickRestoreDefaults()
{
LLNotificationsUtil::add("ConfirmRestoreQuickPrefsDefaults", LLSD(), LLSD(), boost::bind(&FloaterQuickPrefs::callbackRestoreDefaults, this, _1, _2));
}
-//
void FloaterQuickPrefs::dockToToolbarButton()
{
diff --git a/indra/newview/quickprefs.h b/indra/newview/quickprefs.h
index 102bbaad12..187ce3e10d 100644
--- a/indra/newview/quickprefs.h
+++ b/indra/newview/quickprefs.h
@@ -30,8 +30,8 @@
#ifndef QUICKPREFS_H
#define QUICKPREFS_H
+#include "llenvironment.h"
#include "lltransientdockablefloater.h"
-//#include "llwlparamset.h" // [EEPMERGE]
#include "rlvdefines.h"
const std::string PHOTOTOOLS_FLOATER = "phototools";
@@ -41,12 +41,10 @@ class LLComboBox;
class LLLayoutPanel;
class LLLayoutStack;
class LLLineEditor;
-class LLMultiSliderCtrl;
class LLSlider;
class LLSliderCtrl;
class LLSpinCtrl;
class LLTextBox;
-class LLVirtualTrackball;
#define PRESET_NAME_REGION_DEFAULT "__Regiondefault__"
#define PRESET_NAME_DAY_CYCLE "__Day_Cycle__"
@@ -67,9 +65,6 @@ private:
FloaterQuickPrefs(const LLSD& key);
~FloaterQuickPrefs();
- void onDayOffset();
- void onSunMoved();
-
void selectSkyPreset(const LLSD& preset);
void selectWaterPreset(const LLSD& preset);
void selectDayCyclePreset(const LLSD& preset);
@@ -98,12 +93,8 @@ private:
void updateRlvRestrictions(ERlvBehaviour behavior, ERlvParamType type);
void enableWindlightButtons(BOOL enable);
- void updateSun();
- void updateDayOffset();
-
public:
/*virtual*/ BOOL postBuild();
- /*virtual*/ void draw();
virtual void onOpen(const LLSD& key);
void setSelectedSky(const std::string& preset_name);
@@ -119,9 +110,7 @@ public:
private:
- // Windlight controls
- LLMultiSliderCtrl* mWLDayOffset;
- LLVirtualTrackball* mWLSunRot;
+ // Windlight controls
LLComboBox* mWLPresetsCombo;
LLComboBox* mWaterPresetsCombo;
LLComboBox* mDayCyclePresetsCombo;
@@ -132,7 +121,6 @@ private:
LLCheckBoxCtrl* mCtrlUseSSAO;
LLCheckBoxCtrl* mCtrlUseDoF;
LLComboBox* mCtrlShadowDetail;
- LLComboBox* mCtrlAvatarShadowDetail;
LLComboBox* mCtrlReflectionDetail;
// Vignette UI controls
@@ -161,6 +149,11 @@ private:
LLSliderCtrl* mMaxComplexitySlider;
LLTextBox* mMaxComplexityLabel;
+ LLSettingsSky::ptr_t mLiveSky;
+ LLSettingsWater::ptr_t mLiveWater;
+ LLSettingsDay::ptr_t mLiveDay;
+ LLEnvironment::connection_t mEnvChangedConnection;
+
// Vignette UI callbacks
void onChangeVignetteX();
void onChangeVignetteY();
diff --git a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml
index e1c085d903..1d9d75c805 100644
--- a/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml
+++ b/indra/newview/skins/ansastorm/xui/de/panel_main_inventory.xml
@@ -49,6 +49,11 @@
+
-