summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt2
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/app_settings/settings.xml4
-rw-r--r--indra/newview/app_settings/settings_per_account.xml2
-rw-r--r--indra/newview/llagent.cpp57
-rw-r--r--indra/newview/llagentcamera.h1
-rw-r--r--indra/newview/llaisapi.cpp2
-rw-r--r--indra/newview/llappearancemgr.cpp6
-rw-r--r--indra/newview/llappviewer.cpp17
-rw-r--r--indra/newview/llavatarrenderinfoaccountant.cpp2
-rw-r--r--indra/newview/llavatarrendernotifier.cpp2
-rw-r--r--indra/newview/llavatarrendernotifier.h4
-rw-r--r--indra/newview/llcontrolavatar.cpp16
-rw-r--r--indra/newview/llconversationlog.cpp2
-rw-r--r--indra/newview/llfloater360capture.cpp15
-rw-r--r--indra/newview/llfloatermyenvironment.cpp129
-rw-r--r--indra/newview/llfloatermyenvironment.h3
-rw-r--r--indra/newview/llfloaterpreference.cpp16
-rw-r--r--indra/newview/llhudeffectresetskeleton.cpp210
-rw-r--r--indra/newview/llhudeffectresetskeleton.h59
-rw-r--r--indra/newview/llhudobject.cpp4
-rw-r--r--indra/newview/llhudobject.h3
-rw-r--r--indra/newview/llimview.cpp2
-rw-r--r--indra/newview/llinspecttexture.cpp19
-rw-r--r--indra/newview/llpanelgroupcreate.cpp11
-rw-r--r--indra/newview/llpanelgroupgeneral.cpp1
-rw-r--r--indra/newview/llpanelpeoplemenus.cpp5
-rw-r--r--indra/newview/llpanelpermissions.cpp16
-rw-r--r--indra/newview/llpanelpermissions.h1
-rw-r--r--indra/newview/llpanelprofile.cpp51
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp29
-rw-r--r--indra/newview/llsidepaneliteminfo.h2
-rw-r--r--indra/newview/llskinningutil.cpp4
-rw-r--r--indra/newview/lltexturefetch.cpp15
-rw-r--r--indra/newview/lltexturefetch.h7
-rw-r--r--indra/newview/llthumbnailctrl.cpp10
-rw-r--r--indra/newview/lltoast.cpp2
-rw-r--r--indra/newview/llviewerjoystick.cpp39
-rw-r--r--indra/newview/llviewermenu.cpp65
-rw-r--r--indra/newview/llviewertexture.cpp51
-rw-r--r--indra/newview/llviewertexture.h1
-rw-r--r--indra/newview/llviewerwindow.cpp34
-rw-r--r--indra/newview/llvoavatar.cpp285
-rw-r--r--indra/newview/llvoavatar.h37
-rw-r--r--indra/newview/llvoavatarself.cpp15
-rw-r--r--indra/newview/llvoicecallhandler.cpp5
-rw-r--r--indra/newview/llvovolume.cpp4
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml421
-rw-r--r--indra/newview/skins/default/xui/en/menu_settings_gear.xml3
49 files changed, 881 insertions, 812 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e97ab4c52c..55ea339ff4 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -325,6 +325,7 @@ set(viewer_SOURCE_FILES
llhudeffectpointat.cpp
llhudeffecttrail.cpp
llhudeffectblob.cpp
+ llhudeffectresetskeleton.cpp
llhudicon.cpp
llhudmanager.cpp
llhudnametag.cpp
@@ -981,6 +982,7 @@ set(viewer_HEADER_FILES
llhudeffectpointat.h
llhudeffecttrail.h
llhudeffectblob.h
+ llhudeffectresetskeleton.h
llhudicon.h
llhudmanager.h
llhudnametag.h
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 2380dcfd47..2fe040f424 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.1.7
+7.1.8
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 85f2b2d303..60e6a89371 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -91,7 +91,7 @@
<key>Type</key>
<string>S32</string>
<key>Value</key>
- <real>300.0</real>
+ <real>300</real>
</map>
<key>AckCollectTime</key>
<map>
@@ -379,7 +379,7 @@
<key>Value</key>
<integer>0</integer>
</map>
- <key>AutoAcceptNewInventory</key>
+ <key>AutoAcceptNewInventory</key>
<map>
<key>Comment</key>
<string>Automatically accept new notecards/textures/landmarks</string>
diff --git a/indra/newview/app_settings/settings_per_account.xml b/indra/newview/app_settings/settings_per_account.xml
index 6b788dd78f..99c43acd49 100644
--- a/indra/newview/app_settings/settings_per_account.xml
+++ b/indra/newview/app_settings/settings_per_account.xml
@@ -329,7 +329,7 @@
<key>KeepConversationLogTranscripts</key>
<map>
<key>Comment</key>
- <string>Keep a conversation log and transcripts</string>
+ <string>Keep a conversation log and transcripts 2 - both, 1 - logs, 0 - none</string>
<key>Persist</key>
<integer>1</integer>
<key>Type</key>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index 6db7088812..af6ccb7850 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -1453,48 +1453,67 @@ LLVector3 LLAgent::getReferenceUpVector()
return up_vector;
}
-
// Radians, positive is forward into ground
//-----------------------------------------------------------------------------
// pitch()
//-----------------------------------------------------------------------------
void LLAgent::pitch(F32 angle)
{
+ if (fabs(angle) <= 1e-4)
+ return;
+
+ LLCoordFrame newCoordFrame(mFrameAgent);
+ newCoordFrame.pitch(angle);
+
+ // don't let user pitch if rotated 180 degree around the vertical axis
+ if ((newCoordFrame.getXAxis()[VX] * mFrameAgent.getXAxis()[VX] < 0) &&
+ (newCoordFrame.getXAxis()[VY] * mFrameAgent.getXAxis()[VY] < 0))
+ return;
+
// don't let user pitch if pointed almost all the way down or up
+ LLVector3 skyward = getReferenceUpVector();
// A dot B = mag(A) * mag(B) * cos(angle between A and B)
// so... cos(angle between A and B) = A dot B / mag(A) / mag(B)
// = A dot B for unit vectors
+ F32 agent_camera_angle_from_skyward = acos(newCoordFrame.getAtAxis() * skyward) * RAD_TO_DEG;
- LLVector3 skyward = getReferenceUpVector();
+ F32 min_angle = 1;
+ F32 max_angle = 179;
+ bool check_viewer_camera = false;
- // clamp pitch to limits
- if (angle >= 0.f)
+ if (gAgentCamera.getCameraMode() == CAMERA_MODE_THIRD_PERSON)
{
- const F32 look_down_limit = 179.f * DEG_TO_RAD;
- F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
- if (angle_from_skyward + angle > look_down_limit)
+ // These values of min_angle and max_angle are obtained purely empirically
+ if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_REAR_VIEW)
+ {
+ min_angle = 10;
+ check_viewer_camera = true;
+ }
+ else if (gAgentCamera.getCameraPreset() == CAMERA_PRESET_GROUP_VIEW)
{
- angle = look_down_limit - angle_from_skyward;
+ min_angle = 10;
+ max_angle = 170;
+ check_viewer_camera = true;
}
}
- else if (angle < 0.f)
+
+ if ((angle < 0 && agent_camera_angle_from_skyward < min_angle) ||
+ (angle > 0 && agent_camera_angle_from_skyward > max_angle))
+ return;
+
+ if (check_viewer_camera)
{
- const F32 look_up_limit = 5.f * DEG_TO_RAD;
const LLVector3& viewer_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLVector3 agent_focus_pos = getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal());
LLVector3 look_dir = agent_focus_pos - viewer_camera_pos;
- F32 angle_from_skyward = angle_between(look_dir, skyward);
- if (angle_from_skyward + angle < look_up_limit)
- {
- angle = look_up_limit - angle_from_skyward;
- }
+ F32 viewer_camera_angle_from_skyward = angle_between(look_dir, skyward) * RAD_TO_DEG;
+ if ((angle < 0 && viewer_camera_angle_from_skyward < min_angle) ||
+ (angle > 0 && viewer_camera_angle_from_skyward > max_angle))
+ return;
}
- if (fabs(angle) > 1e-4)
- {
- mFrameAgent.pitch(angle);
- }
+ mFrameAgent = newCoordFrame;
}
diff --git a/indra/newview/llagentcamera.h b/indra/newview/llagentcamera.h
index 4a9e5efadf..a88d425724 100644
--- a/indra/newview/llagentcamera.h
+++ b/indra/newview/llagentcamera.h
@@ -112,6 +112,7 @@ private:
//--------------------------------------------------------------------
public:
void switchCameraPreset(ECameraPreset preset);
+ ECameraPreset getCameraPreset() const { return mCameraPreset; }
/** Determines default camera offset depending on the current camera preset */
LLVector3 getCameraOffsetInitial();
/** Determines default focus offset depending on the current camera preset */
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index 76271571cd..f3a5eb7c73 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -839,7 +839,7 @@ void AISAPI::onUpdateReceived(const LLSD& update, COMMAND_TYPE type, const LLSD&
if ( (type == UPDATECATEGORY || type == UPDATEITEM)
&& gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
- dump_sequential_xml(gAgentAvatarp->getFullname() + "_ais_update", update);
+ dump_sequential_xml(gAgentAvatarp->getDebugName() + "_ais_update", update);
}
AISUpdate ais_update(update, type, request_body);
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 97e1c1e6ee..b01f12ee83 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2263,7 +2263,7 @@ void LLAppearanceMgr::updateCOF(const LLUUID& category, bool append)
}
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
- dump_sequential_xml(gAgentAvatarp->getFullname() + "_slam_request", contents);
+ dump_sequential_xml(gAgentAvatarp->getDebugName() + "_slam_request", contents);
}
slam_inventory_folder(getCOF(), contents, link_waiter);
@@ -3956,7 +3956,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
LL_DEBUGS("Avatar") << "succeeded" << LL_ENDL;
if (gSavedSettings.getBOOL("DebugAvatarAppearanceMessage"))
{
- dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_ok", result);
+ dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_ok", result);
}
} while (bRetry);
@@ -3965,7 +3965,7 @@ void LLAppearanceMgr::serverAppearanceUpdateCoro(LLCoreHttpUtil::HttpCoroutineAd
/*static*/
void LLAppearanceMgr::debugAppearanceUpdateCOF(const LLSD& content)
{
- dump_sequential_xml(gAgentAvatarp->getFullname() + "_appearance_request_error", content);
+ dump_sequential_xml(gAgentAvatarp->getDebugName() + "_appearance_request_error", content);
LL_INFOS("Avatar") << "AIS COF, version received: " << content["expected"].asInteger()
<< " ================================= " << LL_ENDL;
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index be6ac3eab5..368a47d697 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -453,11 +453,20 @@ void idle_afk_check()
{
// check idle timers
F32 current_idle = gAwayTriggerTimer.getElapsedTimeF32();
- F32 afk_timeout = gSavedSettings.getS32("AFKTimeout");
- if (afk_timeout && (current_idle > afk_timeout) && ! gAgent.getAFK())
+ LLCachedControl<S32> afk_timeout(gSavedSettings, "AFKTimeout", 300);
+ if (afk_timeout() && (current_idle > afk_timeout()))
{
- LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
- gAgent.setAFK();
+ if (!gAgent.getAFK())
+ {
+ LL_INFOS("IdleAway") << "Idle more than " << afk_timeout << " seconds: automatically changing to Away status" << LL_ENDL;
+ gAgent.setAFK();
+ }
+ else
+ {
+ // Refresh timer so that random one click or hover won't clear the status.
+ // But expanding the window still should lift afk status
+ gAwayTimer.reset();
+ }
}
}
diff --git a/indra/newview/llavatarrenderinfoaccountant.cpp b/indra/newview/llavatarrenderinfoaccountant.cpp
index ec9cf2c8b7..246630521d 100644
--- a/indra/newview/llavatarrenderinfoaccountant.cpp
+++ b/indra/newview/llavatarrenderinfoaccountant.cpp
@@ -231,7 +231,7 @@ void LLAvatarRenderInfoAccountant::avatarRenderInfoReportCoro(std::string url, U
{
LLVOAvatar* avatar = dynamic_cast<LLVOAvatar*>(*iter);
if (avatar &&
- avatar->getRezzedStatus() >= 2 && // Mostly rezzed (maybe without baked textures downloaded)
+ avatar->getRezzedStatus() >= AV_REZZED_TEXTURED && // Mostly rezzed (maybe without baked textures downloaded)
!avatar->isDead() && // Not dead yet
!avatar->isControlAvatar() && // Not part of an animated object
avatar->getObjectHost() == regionp->getHost()) // Ensure it's on the same region
diff --git a/indra/newview/llavatarrendernotifier.cpp b/indra/newview/llavatarrendernotifier.cpp
index 61fc9d00f3..29b7fff125 100644
--- a/indra/newview/llavatarrendernotifier.cpp
+++ b/indra/newview/llavatarrendernotifier.cpp
@@ -70,7 +70,7 @@ mLatestOverLimitPct(0.0f),
mShowOverLimitAgents(false),
mNotifyOutfitLoading(false),
mLastCofVersion(LLViewerInventoryCategory::VERSION_UNKNOWN),
-mLastOutfitRezStatus(-1),
+mLastOutfitRezStatus(AV_REZZED_UNKNOWN),
mLastSkeletonSerialNum(-1)
{
mPopUpDelayTimer.resetWithExpiry(OVER_LIMIT_UPDATE_DELAY);
diff --git a/indra/newview/llavatarrendernotifier.h b/indra/newview/llavatarrendernotifier.h
index 97c24c3cba..73fa87b192 100644
--- a/indra/newview/llavatarrendernotifier.h
+++ b/indra/newview/llavatarrendernotifier.h
@@ -33,6 +33,8 @@
class LLViewerRegion;
+enum ERezzedStatus : S32;
+
struct LLHUDComplexity
{
LLHUDComplexity()
@@ -130,7 +132,7 @@ private:
S32 mLastSkeletonSerialNum;
// Used to detect changes in voavatar's rezzed status.
// If value decreases - there were changes in outfit.
- S32 mLastOutfitRezStatus;
+ enum ERezzedStatus mLastOutfitRezStatus;
object_complexity_list_t mObjectComplexityList;
};
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index b7317272a1..173cf3237d 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -137,14 +137,14 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
{
LLVector3 pos_box_offset = point_to_box_offset(vol_pos, unshift_extents);
F32 offset_dist = pos_box_offset.length();
- if (offset_dist > MAX_LEGAL_OFFSET && offset_dist > 0.f)
+ if (offset_dist > max_legal_offset && offset_dist > 0.f)
{
- F32 target_dist = (offset_dist - MAX_LEGAL_OFFSET);
+ F32 target_dist = (offset_dist - max_legal_offset);
new_pos_fixup = (target_dist/offset_dist)*pos_box_offset;
}
if (new_pos_fixup != mPositionConstraintFixup)
{
- LL_DEBUGS("ConstraintFix") << getFullname() << " pos fix, offset_dist " << offset_dist << " pos fixup "
+ LL_DEBUGS("ConstraintFix") << getDebugName() << " pos fix, offset_dist " << offset_dist << " pos fixup "
<< new_pos_fixup << " was " << mPositionConstraintFixup << LL_ENDL;
LL_DEBUGS("ConstraintFix") << "vol_pos " << vol_pos << LL_ENDL;
LL_DEBUGS("ConstraintFix") << "extents " << extents[0] << " " << extents[1] << LL_ENDL;
@@ -152,11 +152,11 @@ void LLControlAvatar::getNewConstraintFixups(LLVector3& new_pos_fixup, F32& new_
}
}
- if (box_size/mScaleConstraintFixup > MAX_LEGAL_SIZE)
+ if (box_size/mScaleConstraintFixup > max_legal_size)
{
- new_scale_fixup = mScaleConstraintFixup* MAX_LEGAL_SIZE /box_size;
- LL_DEBUGS("ConstraintFix") << getFullname() << " scale fix, box_size " << box_size << " fixup "
- << mScaleConstraintFixup << " max legal " << MAX_LEGAL_SIZE
+ new_scale_fixup = mScaleConstraintFixup*max_legal_size/box_size;
+ LL_DEBUGS("ConstraintFix") << getDebugName() << " scale fix, box_size " << box_size << " fixup "
+ << mScaleConstraintFixup << " max legal " << max_legal_size
<< " -> new scale " << new_scale_fixup << LL_ENDL;
}
}
@@ -239,7 +239,7 @@ void LLControlAvatar::matchVolumeTransform()
const LLMeshSkinInfo* skin_info = mRootVolp->getSkinInfo();
if (skin_info)
{
- LL_DEBUGS("BindShape") << getFullname() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;
+ LL_DEBUGS("BindShape") << getDebugName() << " bind shape " << skin_info->mBindShapeMatrix << LL_ENDL;
bind_rot = LLSkinningUtil::getUnscaledQuaternion(LLMatrix4(skin_info->mBindShapeMatrix));
}
#endif
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index dd4ca845a0..8c3d2219bc 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -647,7 +647,7 @@ void LLConversationLog::onClearLogResponse(const LLSD& notification, const LLSD&
{
mConversations.clear();
notifyObservers();
- cache();
+ saveToFile(getFileName());
deleteBackupLogs();
}
}
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index f3b924a306..9bc012d6f0 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -33,6 +33,7 @@
#include "llagentui.h"
#include "llbase64.h"
#include "llcallbacklist.h"
+#include "lldate.h"
#include "llenvironment.h"
#include "llimagejpeg.h"
#include "llmediactrl.h"
@@ -83,7 +84,7 @@ LLFloater360Capture::~LLFloater360Capture()
// Normally LLFloater360Capture tells the Simulator send everything
// and now reverts to the regular "keyhole" frustum of interest
// list updates.
- if (!LLApp::isExiting() &&
+ if (!LLApp::isExiting() &&
gSavedSettings.getBOOL("360CaptureUseInterestListCap") &&
mStartILMode != gAgent.getInterestListMode())
{
@@ -578,7 +579,7 @@ void LLFloater360Capture::capture360Images()
LLViewerStats::instance().getRecording().resume();
LLAppViewer::instance()->resumeMainloopTimeout();
-
+
// update main loop timeout state
LLAppViewer::instance()->pingMainloopTimeout("LLFloater360Capture::capture360Images");
}
@@ -862,15 +863,7 @@ const std::string LLFloater360Capture::generate_proposed_filename()
filename << "_";
// add in the current HH-MM-SS (with leading 0's) so users can easily save many shots in same folder
- std::time_t cur_epoch = std::time(nullptr);
- std::tm* tm_time = std::localtime(&cur_epoch);
- filename << std::setfill('0') << std::setw(4) << (tm_time->tm_year + 1900);
- filename << std::setfill('0') << std::setw(2) << (tm_time->tm_mon + 1);
- filename << std::setfill('0') << std::setw(2) << tm_time->tm_mday;
- filename << "_";
- filename << std::setfill('0') << std::setw(2) << tm_time->tm_hour;
- filename << std::setfill('0') << std::setw(2) << tm_time->tm_min;
- filename << std::setfill('0') << std::setw(2) << tm_time->tm_sec;
+ filename << LLDate::now().toLocalDateString("%Y%m%d_%H%M%S");
// the unusual way we save the output image (originates in the
// embedded browser and not the C++ code) means that the system
diff --git a/indra/newview/llfloatermyenvironment.cpp b/indra/newview/llfloatermyenvironment.cpp
index f93af9c312..48138a258a 100644
--- a/indra/newview/llfloatermyenvironment.cpp
+++ b/indra/newview/llfloatermyenvironment.cpp
@@ -1,25 +1,25 @@
-/**
+/**
* @file llfloatergesture.cpp
* @brief LLFloaterMyEnvironment class implementation
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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$
*/
@@ -38,7 +38,9 @@
#include "llcheckboxctrl.h"
#include "llviewerinventory.h"
#include "llenvironment.h"
+#include "llnotificationsutil.h"
#include "llparcel.h"
+#include "lltrans.h"
#include "llviewerparcelmgr.h"
//=========================================================================
@@ -223,6 +225,35 @@ void LLFloaterMyEnvironment::onFilterEdit(const std::string& search_string)
mInventoryList->setFilterSubString(search_string);
}
+void LLFloaterMyEnvironment::onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, uuid_vec_t item_ids)
+{
+ S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
+ if (option == 0)
+ {
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ for (const LLUUID& itemid : item_ids)
+ {
+ LLInventoryItem* inv_item = gInventory.getItem(itemid);
+
+ if (inv_item && inv_item->getInventoryType() == LLInventoryType::IT_SETTINGS)
+ {
+ LLInventoryModel::update_list_t update;
+ LLInventoryModel::LLCategoryUpdate old_folder(inv_item->getParentUUID(), -1);
+ update.push_back(old_folder);
+ LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1);
+ update.push_back(new_folder);
+ gInventory.accountForUpdate(update);
+
+ LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
+ new_item->setParent(trash_id);
+ new_item->updateParentOnServer(FALSE);
+ gInventory.updateItem(new_item);
+ }
+ }
+ gInventory.notifyObservers();
+ }
+}
+
void LLFloaterMyEnvironment::onDeleteSelected()
{
uuid_vec_t selected;
@@ -231,27 +262,16 @@ void LLFloaterMyEnvironment::onDeleteSelected()
if (selected.empty())
return;
- const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- for (const LLUUID& itemid: selected)
- {
- LLInventoryItem* inv_item = gInventory.getItem(itemid);
-
- if (inv_item && inv_item->getInventoryType() == LLInventoryType::IT_SETTINGS)
+ LLSD args;
+ args["QUESTION"] = LLTrans::getString(selected.size() > 1 ? "DeleteItems" : "DeleteItem");
+ LLNotificationsUtil::add(
+ "DeleteItems",
+ args,
+ LLSD(),
+ [this, selected](const LLSD& notification, const LLSD& response)
{
- LLInventoryModel::update_list_t update;
- LLInventoryModel::LLCategoryUpdate old_folder(inv_item->getParentUUID(), -1);
- update.push_back(old_folder);
- LLInventoryModel::LLCategoryUpdate new_folder(trash_id, 1);
- update.push_back(new_folder);
- gInventory.accountForUpdate(update);
-
- LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(inv_item);
- new_item->setParent(trash_id);
- new_item->updateParentOnServer(FALSE);
- gInventory.updateItem(new_item);
- }
- }
- gInventory.notifyObservers();
+ onItemsRemovalConfirmation(notification, response, selected);
+ });
}
@@ -278,7 +298,7 @@ void LLFloaterMyEnvironment::onDoApply(const std::string &context)
std::string name = itemp->getName();
U32 flags(0);
-
+
if (!itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID()))
flags |= LLSettingsBase::FLAG_NOMOD;
if (!itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()))
@@ -317,14 +337,14 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)
return false;
if (context == PARAMETER_EDIT)
- {
- return (selected.size() == 1) && isSettingSelected(selected.front());
+ {
+ return (selected.size() == 1) && isSettingId(selected.front());
}
else if (context == PARAMETER_COPY)
{
for (std::vector<LLUUID>::iterator it = selected.begin(); it != selected.end(); it++)
{
- if(!isSettingSelected(*it))
+ if(!isSettingId(*it))
{
return false;
}
@@ -340,7 +360,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)
LLClipboard::instance().pasteFromClipboard(ids);
for (std::vector<LLUUID>::iterator it = ids.begin(); it != ids.end(); it++)
{
- if (!isSettingSelected(*it))
+ if (!isSettingId(*it))
{
return false;
}
@@ -349,7 +369,7 @@ bool LLFloaterMyEnvironment::canAction(const std::string &context)
}
else if (context == PARAMETER_COPYUUID)
{
- return (selected.size() == 1) && isSettingSelected(selected.front());
+ return (selected.size() == 1) && isSettingId(selected.front());
}
return false;
@@ -364,17 +384,43 @@ bool LLFloaterMyEnvironment::canApply(const std::string &context)
return false;
if (context == PARAMETER_REGION)
- {
- return LLEnvironment::instance().canAgentUpdateRegionEnvironment();
+ {
+ return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateRegionEnvironment();
}
else if (context == PARAMETER_PARCEL)
+ {
+ return isSettingId(selected.front()) && LLEnvironment::instance().canAgentUpdateParcelEnvironment();
+ }
+ else if (context == PARAMETER_LOCAL)
{
- return LLEnvironment::instance().canAgentUpdateParcelEnvironment();
+ return isSettingId(selected.front());
}
- else
+
+ return false;
+}
+
+bool can_delete(const LLUUID& id)
+{
+ const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
+ if (id == trash_id || gInventory.isObjectDescendentOf(id, trash_id))
+ {
+ return false;
+ }
+
+ LLViewerInventoryCategory* cat = gInventory.getCategory(id);
+ if (cat)
{
- return (context == PARAMETER_LOCAL);
+ if (!get_is_category_removable(&gInventory, id))
+ {
+ return false;
+ }
+ }
+ else if (!get_is_item_removable(&gInventory, id, false))
+ {
+ return false;
}
+
+ return true;
}
//-------------------------------------------------------------------------
@@ -387,7 +433,14 @@ void LLFloaterMyEnvironment::refreshButtonStates()
getChild<LLUICtrl>(BUTTON_GEAR)->setEnabled(settings_ok);
getChild<LLUICtrl>(BUTTON_NEWSETTINGS)->setEnabled(true);
- getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(settings_ok && !selected.empty());
+
+ bool enable_delete = false;
+ if(settings_ok && !selected.empty())
+ {
+ enable_delete = can_delete(selected.front());
+ }
+
+ getChild<LLUICtrl>(BUTTON_DELETE)->setEnabled(enable_delete);
}
//-------------------------------------------------------------------------
@@ -436,7 +489,7 @@ LLUUID LLFloaterMyEnvironment::findItemByAssetId(LLUUID asset_id, bool copyable_
return LLUUID::null;
}
-bool LLFloaterMyEnvironment::isSettingSelected(LLUUID item_id)
+bool LLFloaterMyEnvironment::isSettingId(const LLUUID& item_id)
{
LLInventoryItem* itemp = gInventory.getItem(item_id);
diff --git a/indra/newview/llfloatermyenvironment.h b/indra/newview/llfloatermyenvironment.h
index 54e23c4f6e..4f1cdf6a3e 100644
--- a/indra/newview/llfloatermyenvironment.h
+++ b/indra/newview/llfloatermyenvironment.h
@@ -60,6 +60,7 @@ private:
void onFilterCheckChange();
void onFilterEdit(const std::string& search_string);
void onSelectionChange();
+ void onItemsRemovalConfirmation(const LLSD& notification, const LLSD& response, uuid_vec_t item_ids);
void onDeleteSelected();
void onDoCreate(const LLSD &data);
void onDoApply(const std::string &context);
@@ -69,7 +70,7 @@ private:
void getSelectedIds(uuid_vec_t& ids) const;
void refreshButtonStates();
- bool isSettingSelected(LLUUID item_id);
+ static bool isSettingId(const LLUUID &item_id);
static LLUUID findItemByAssetId(LLUUID asset_id, bool copyable_only, bool ignore_library);
};
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d731f1c592..481c13846a 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1913,7 +1913,21 @@ void LLFloaterPreference::selectChatPanel()
void LLFloaterPreference::changed()
{
- getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
+ if (LLConversationLog::instance().getIsLoggingEnabled())
+ {
+ getChild<LLButton>("clear_log")->setEnabled(LLConversationLog::instance().getConversations().size() > 0);
+ }
+ else
+ {
+ // onClearLog clears list, then notifies changed() and only then clears file,
+ // so check presence of conversations before checking file, file will cleared later.
+ llstat st;
+ bool has_logs = LLConversationLog::instance().getConversations().size() > 0
+ && LLFile::stat(LLConversationLog::instance().getFileName(), &st) == 0
+ && S_ISREG(st.st_mode)
+ && st.st_size > 0;
+ getChild<LLButton>("clear_log")->setEnabled(has_logs);
+ }
// set 'enable' property for 'Delete transcripts...' button
updateDeleteTranscriptsButton();
diff --git a/indra/newview/llhudeffectresetskeleton.cpp b/indra/newview/llhudeffectresetskeleton.cpp
new file mode 100644
index 0000000000..aa5532f0fc
--- /dev/null
+++ b/indra/newview/llhudeffectresetskeleton.cpp
@@ -0,0 +1,210 @@
+/**
+ * @file llhudeffectresetskeleton.cpp
+ * @brief LLHUDEffectResetSkeleton class implementation
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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$
+ */
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llhudeffectresetskeleton.h"
+
+#include "llagent.h"
+#include "llviewerobjectlist.h"
+#include "llvoavatar.h"
+#include "message.h"
+
+// packet layout
+const S32 TARGET_OBJECT = 0; // This is to allow for targetting owned animesh
+const S32 RESET_ANIMATIONS = 16; //This can also be a flags if needed
+const S32 PKT_SIZE = 17;
+
+//-----------------------------------------------------------------------------
+// LLHUDEffectResetSkeleton()
+//-----------------------------------------------------------------------------
+LLHUDEffectResetSkeleton::LLHUDEffectResetSkeleton(const U8 type) :
+ LLHUDEffect(type)
+{
+}
+
+//-----------------------------------------------------------------------------
+// ~LLHUDEffectResetSkeleton()
+//-----------------------------------------------------------------------------
+LLHUDEffectResetSkeleton::~LLHUDEffectResetSkeleton()
+{
+}
+
+//-----------------------------------------------------------------------------
+// packData()
+//-----------------------------------------------------------------------------
+void LLHUDEffectResetSkeleton::packData(LLMessageSystem *mesgsys)
+{
+ // Pack the default data
+ LLHUDEffect::packData(mesgsys);
+
+ // Pack the type-specific data. Uses a fun packed binary format. Whee!
+ U8 packed_data[PKT_SIZE];
+ memset(packed_data, 0, PKT_SIZE);
+
+ // pack both target object and position
+ // position interpreted as offset if target object is non-null
+ if (mTargetObject)
+ {
+ htolememcpy(&(packed_data[TARGET_OBJECT]), mTargetObject->mID.mData, MVT_LLUUID, 16);
+ }
+ else
+ {
+ htolememcpy(&(packed_data[TARGET_OBJECT]), LLUUID::null.mData, MVT_LLUUID, 16);
+ }
+
+ U8 resetAnimations = (U8)mResetAnimations;
+ htolememcpy(&(packed_data[RESET_ANIMATIONS]), &resetAnimations, MVT_U8, 1);
+
+ mesgsys->addBinaryDataFast(_PREHASH_TypeData, packed_data, PKT_SIZE);
+}
+
+//-----------------------------------------------------------------------------
+// unpackData()
+//-----------------------------------------------------------------------------
+void LLHUDEffectResetSkeleton::unpackData(LLMessageSystem *mesgsys, S32 blocknum)
+{
+ LLVector3d new_target;
+ U8 packed_data[PKT_SIZE];
+
+
+ LLHUDEffect::unpackData(mesgsys, blocknum);
+
+ LLUUID source_id;
+ mesgsys->getUUIDFast(_PREHASH_Effect, _PREHASH_AgentID, source_id, blocknum);
+
+ LLViewerObject *objp = gObjectList.findObject(source_id);
+ if (objp && objp->isAvatar())
+ {
+ setSourceObject(objp);
+ }
+ else
+ {
+ //LL_WARNS() << "Could not find source avatar for ResetSkeleton effect" << LL_ENDL;
+ return;
+ }
+
+ S32 size = mesgsys->getSizeFast(_PREHASH_Effect, blocknum, _PREHASH_TypeData);
+ if (size != PKT_SIZE)
+ {
+ LL_WARNS() << "ResetSkeleton effect with bad size " << size << LL_ENDL;
+ return;
+ }
+
+ mesgsys->getBinaryDataFast(_PREHASH_Effect, _PREHASH_TypeData, packed_data, PKT_SIZE, blocknum);
+
+ LLUUID target_id;
+ htolememcpy(target_id.mData, &(packed_data[TARGET_OBJECT]), MVT_LLUUID, 16);
+
+ // The purpose for having a target ID is if we want to reset animesh, or
+ // other things in the future.
+ // I implemented this, but due to issues regarding various permission
+ // checks, I scrapped it for now. --Chaser Zaks
+ // See https://github.com/secondlife/viewer/pull/1212 for additional info
+
+ if (target_id.isNull())
+ {
+ target_id = source_id;
+ }
+
+ objp = gObjectList.findObject(target_id);
+
+ if (objp)
+ {
+ setTargetObject(objp);
+ }
+
+ U8 resetAnimations = 0;
+ htolememcpy(&resetAnimations, &(packed_data[RESET_ANIMATIONS]), MVT_U8, 1);
+
+ // Pre-emptively assume this is going to be flags in the future.
+ // It isn't needed now, but this will assure that only bit 1 is set
+ mResetAnimations = resetAnimations & 1;
+
+ update();
+}
+
+//-----------------------------------------------------------------------------
+// setTargetObjectAndOffset()
+//-----------------------------------------------------------------------------
+void LLHUDEffectResetSkeleton::setTargetObject(LLViewerObject *objp)
+{
+ mTargetObject = objp;
+}
+
+
+//-----------------------------------------------------------------------------
+// markDead()
+//-----------------------------------------------------------------------------
+void LLHUDEffectResetSkeleton::markDead()
+{
+ LLHUDEffect::markDead();
+}
+
+void LLHUDEffectResetSkeleton::setSourceObject(LLViewerObject* objectp)
+{
+ // restrict source objects to avatars
+ if (objectp && objectp->isAvatar())
+ {
+ LLHUDEffect::setSourceObject(objectp);
+ }
+}
+
+//-----------------------------------------------------------------------------
+// update()
+//-----------------------------------------------------------------------------
+void LLHUDEffectResetSkeleton::update()
+{
+ // If the target object is dead, set the target object to NULL
+ if (mTargetObject.isNull() || mTargetObject->isDead())
+ {
+ markDead();
+ return;
+ }
+
+ if (mSourceObject.isNull() || mSourceObject->isDead())
+ {
+ markDead();
+ return;
+ }
+
+ if (mTargetObject->isAvatar())
+ {
+ // Only the owner of a avatar can reset their skeleton like this
+ if (mSourceObject->getID() == mTargetObject->getID())
+ {
+ LLVOAvatar* avatar = mTargetObject->asAvatar();
+ avatar->resetSkeleton(mResetAnimations);
+ }
+ }
+ else
+ {
+ LL_WARNS() << mSourceObject->getID() << " attempted to reset skeleton on "
+ << mTargetObject->getID() << ", but it is not a avatar!" << LL_ENDL;
+ }
+
+ markDead();
+}
diff --git a/indra/newview/llhudeffectresetskeleton.h b/indra/newview/llhudeffectresetskeleton.h
new file mode 100644
index 0000000000..39a6137054
--- /dev/null
+++ b/indra/newview/llhudeffectresetskeleton.h
@@ -0,0 +1,59 @@
+/**
+ * @file llhudeffectresetskeleton.h
+ * @brief LLHUDEffectResetSkeleton class definition
+ *
+ * $LicenseInfo:firstyear=2024&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2024, 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_LLHUDEFFECTRESETSKELETON_H
+#define LL_LLHUDEFFECTRESETSKELETON_H
+
+#include "llhudeffect.h"
+
+class LLViewerObject;
+class LLVOAvatar;
+
+
+class LLHUDEffectResetSkeleton final : public LLHUDEffect
+{
+public:
+ friend class LLHUDObject;
+
+ /*virtual*/ void markDead();
+ /*virtual*/ void setSourceObject(LLViewerObject* objectp);
+
+ void setTargetObject(LLViewerObject *objp);
+ void setResetAnimations(bool enable){ mResetAnimations = enable; };
+
+protected:
+ LLHUDEffectResetSkeleton(const U8 type);
+ ~LLHUDEffectResetSkeleton();
+
+ /*virtual*/ void packData(LLMessageSystem *mesgsys);
+ /*virtual*/ void unpackData(LLMessageSystem *mesgsys, S32 blocknum);
+
+ void update();
+private:
+ bool mResetAnimations;
+};
+
+#endif // LL_LLHUDEFFECTRESETSKELETON_H
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index e922e8230c..0547b8086c 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -36,6 +36,7 @@
#include "llhudeffecttrail.h"
#include "llhudeffectlookat.h"
#include "llhudeffectpointat.h"
+#include "llhudeffectresetskeleton.h"
#include "llhudnametag.h"
#include "llvoicevisualizer.h"
@@ -241,6 +242,9 @@ LLHUDEffect *LLHUDObject::addHUDEffect(const U8 type)
case LL_HUD_EFFECT_BLOB:
hud_objectp = new LLHUDEffectBlob(type);
break;
+ case LL_HUD_EFFECT_RESET_SKELETON:
+ hud_objectp = new LLHUDEffectResetSkeleton(type);
+ break;
default:
LL_WARNS() << "Unknown type of hud effect:" << (U32) type << LL_ENDL;
}
diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h
index 13953d2329..6dedc96776 100644
--- a/indra/newview/llhudobject.h
+++ b/indra/newview/llhudobject.h
@@ -96,7 +96,8 @@ public:
LL_HUD_EFFECT_POINTAT,
LL_HUD_EFFECT_VOICE_VISUALIZER, // Ventrella
LL_HUD_NAME_TAG,
- LL_HUD_EFFECT_BLOB
+ LL_HUD_EFFECT_BLOB,
+ LL_HUD_EFFECT_RESET_SKELETON
};
protected:
static void sortObjects();
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index 187dbdd3a2..80ff3c7739 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -1578,6 +1578,8 @@ bool LLIMModel::logToFile(const std::string& file_name, const std::string& from,
}
else
{
+ // will check KeepConversationLogTranscripts on its own
+ LLConversationLog::instance().cache();
return false;
}
}
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index add9a22f15..f4197e475a 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -115,7 +115,6 @@ public:
protected:
LLPointer<LLViewerFetchedTexture> m_Image;
- S32 mImageBoostLevel = LLGLTexture::BOOST_NONE;
std::string mLoadingText;
};
@@ -128,11 +127,7 @@ LLTexturePreviewView::LLTexturePreviewView(const LLView::Params& p)
LLTexturePreviewView::~LLTexturePreviewView()
{
- if (m_Image)
- {
- m_Image->setBoostLevel(mImageBoostLevel);
- m_Image = nullptr;
- }
+ m_Image = nullptr;
}
void LLTexturePreviewView::draw()
@@ -153,19 +148,19 @@ void LLTexturePreviewView::draw()
bool isLoading = (!m_Image->isFullyLoaded()) && (m_Image->getDiscardLevel() > 0);
if (isLoading)
LLFontGL::getFontSansSerif()->renderUTF8(mLoadingText, 0, llfloor(rctClient.mLeft + 3), llfloor(rctClient.mTop - 25), LLColor4::white, LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::DROP_SHADOW);
- m_Image->addTextureStats((isLoading) ? MAX_IMAGE_AREA : (F32)(rctClient.getWidth() * rctClient.getHeight()));
+
+ m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
}
}
void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset)
{
- m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_NONE, LLViewerTexture::LOD_TEXTURE);
+ m_Image = LLViewerTextureManager::getFetchedTexture(idAsset, FTT_DEFAULT, MIPMAP_TRUE, LLGLTexture::BOOST_THUMBNAIL);
if (m_Image)
{
- mImageBoostLevel = m_Image->getBoostLevel();
- m_Image->setBoostLevel(LLGLTexture::BOOST_PREVIEW);
m_Image->forceToSaveRawImage(0);
- if ( (!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()) )
+ m_Image->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
+ if ((!m_Image->isFullyLoaded()) && (!m_Image->hasFetcher()))
{
if (m_Image->isInFastCacheList())
{
@@ -179,7 +174,7 @@ void LLTexturePreviewView::setImageFromAssetId(const LLUUID& idAsset)
void LLTexturePreviewView::setImageFromItemId(const LLUUID& idItem)
{
const LLViewerInventoryItem* pItem = gInventory.getItem(idItem);
- setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null );
+ setImageFromAssetId( (pItem) ? pItem->getAssetUUID() : LLUUID::null);
}
// ============================================================================
diff --git a/indra/newview/llpanelgroupcreate.cpp b/indra/newview/llpanelgroupcreate.cpp
index 1b8947caee..913db0e198 100644
--- a/indra/newview/llpanelgroupcreate.cpp
+++ b/indra/newview/llpanelgroupcreate.cpp
@@ -1,24 +1,24 @@
-/**
+/**
* @file llpanelgroupcreate.cpp
*
* $LicenseInfo:firstyear=2019&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2019, 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$
*/
@@ -85,6 +85,7 @@ BOOL LLPanelGroupCreate::postBuild()
mInsignia = getChild<LLTextureCtrl>("insignia", TRUE);
mInsignia->setAllowLocalTexture(FALSE);
+ mInsignia->setBakeTextureEnabled(FALSE);
mInsignia->setCanApplyImmediately(FALSE);
return TRUE;
diff --git a/indra/newview/llpanelgroupgeneral.cpp b/indra/newview/llpanelgroupgeneral.cpp
index 9c6f16ee9e..73fb6012e4 100644
--- a/indra/newview/llpanelgroupgeneral.cpp
+++ b/indra/newview/llpanelgroupgeneral.cpp
@@ -197,6 +197,7 @@ void LLPanelGroupGeneral::setupCtrls(LLPanel* panel_group)
{
mInsignia->setCommitCallback(onCommitAny, this);
mInsignia->setAllowLocalTexture(FALSE);
+ mInsignia->setBakeTextureEnabled(FALSE);
}
mFounderName = getChild<LLTextBox>("founder_name");
diff --git a/indra/newview/llpanelpeoplemenus.cpp b/indra/newview/llpanelpeoplemenus.cpp
index 172c7d0828..a8734ac1e4 100644
--- a/indra/newview/llpanelpeoplemenus.cpp
+++ b/indra/newview/llpanelpeoplemenus.cpp
@@ -347,7 +347,10 @@ void PeopleContextMenu::eject()
avatar = (LLVOAvatar*) object;
}
}
- if (!avatar) return;
+
+ if (!avatar)
+ return;
+
LLSD payload;
payload["avatar_id"] = avatar->getID();
std::string fullname = avatar->getFullname();
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index 90cfcc6d8a..ec25a9086e 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -176,7 +176,7 @@ BOOL LLPanelPermissions::postBuild()
childSetCommitCallback("sale type",LLPanelPermissions::onCommitSaleType,this);
- childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSaleInfo, this);
+ childSetCommitCallback("Edit Cost", LLPanelPermissions::onCommitSalePrice, this);
childSetCommitCallback("checkbox next owner can modify",LLPanelPermissions::onCommitNextOwnerModify,this);
childSetCommitCallback("checkbox next owner can copy",LLPanelPermissions::onCommitNextOwnerCopy,this);
@@ -781,7 +781,9 @@ void LLPanelPermissions::refresh()
if (has_change_sale_ability && (owner_mask_on & PERM_TRANSFER))
{
- getChildView("checkbox for sale")->setEnabled(can_transfer || (!can_transfer && num_for_sale));
+ bool change_sale_allowed = can_transfer || (!can_transfer && num_for_sale);
+ getChildView("checkbox for sale")->setEnabled(change_sale_allowed);
+ getChildView("Edit Cost")->setEnabled(change_sale_allowed && !is_for_sale_mixed);
// Set the checkbox to tentative if the prices of each object selected
// are not the same.
getChild<LLUICtrl>("checkbox for sale")->setTentative( is_for_sale_mixed);
@@ -1223,6 +1225,16 @@ void LLPanelPermissions::onCommitSaleType(LLUICtrl*, void* data)
self->setAllSaleInfo();
}
+void LLPanelPermissions::onCommitSalePrice(LLUICtrl *, void *data)
+{
+ LLPanelPermissions *self = (LLPanelPermissions *) data;
+ LLCheckBoxCtrl *checkPurchase = self->getChild<LLCheckBoxCtrl>("checkbox for sale");
+ if (checkPurchase && checkPurchase->get())
+ {
+ self->setAllSaleInfo();
+ }
+}
+
void LLPanelPermissions::setAllSaleInfo()
{
LL_INFOS() << "LLPanelPermissions::setAllSaleInfo()" << LL_ENDL;
diff --git a/indra/newview/llpanelpermissions.h b/indra/newview/llpanelpermissions.h
index 790ac9920d..5bc2db9826 100644
--- a/indra/newview/llpanelpermissions.h
+++ b/indra/newview/llpanelpermissions.h
@@ -77,6 +77,7 @@ protected:
static void onCommitSaleInfo(LLUICtrl* ctrl, void* data);
static void onCommitSaleType(LLUICtrl* ctrl, void* data);
+ static void onCommitSalePrice(LLUICtrl *ctrl, void *data);
void setAllSaleInfo();
static void onCommitClickAction(LLUICtrl* ctrl, void*);
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 0f0af37485..4c78f7e3f5 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -974,7 +974,7 @@ void LLPanelProfileSecondLife::fillCommonData(const LLAvatarData* avatar_data)
setDescriptionText(avatar_data->about_text);
- mSecondLifePic->setValue(avatar_data->image_id);
+ mSecondLifePic->setValue(avatar_data->image_id);
if (getSelfProfile())
{
@@ -1122,10 +1122,10 @@ void LLPanelProfileSecondLife::fillAgeData(const LLAvatarData* avatar_data)
}
else
{
- std::string register_date = getString("age_format");
- LLSD args_age;
+ std::string register_date = getString("age_format");
+ LLSD args_age;
args_age["[AGE]"] = LLDateUtil::ageFromDate(avatar_data->born_on, LLDate::now());
- LLStringUtil::format(register_date, args_age);
+ LLStringUtil::format(register_date, args_age);
userAgeCtrl->setValue(register_date);
}
@@ -1568,12 +1568,12 @@ void LLPanelProfileSecondLife::onShowInSearchCallback()
if (value == mAllowPublish)
return;
- mAllowPublish = value;
+ mAllowPublish = value;
saveAgentUserInfoCoro("allow_publish", value);
-}
+ }
void LLPanelProfileSecondLife::onHideAgeCallback()
-{
+ {
bool value = mHideAgeCombo->getValue().asInteger();
if (value == mHideAge)
return;
@@ -1722,35 +1722,35 @@ void LLPanelProfileSecondLife::onCommitProfileImage(const LLUUID& id)
if (mSecondLifePic->getImageAssetId() == id)
return;
- std::function<void(bool)> callback = [id](bool result)
- {
- if (result)
+ std::function<void(bool)> callback = [id](bool result)
{
- LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
+ if (result)
+ {
+ LLAvatarIconIDCache::getInstance()->add(gAgentID, id);
// Should trigger callbacks in icon controls (or request Legacy)
- LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
- }
- };
+ LLAvatarPropertiesProcessor::getInstance()->sendAvatarPropertiesRequest(gAgentID);
+ }
+ };
if (!saveAgentUserInfoCoro("sl_image_id", id, callback))
return;
mSecondLifePic->setValue(id);
- LLFloater *floater = mFloaterProfileTextureHandle.get();
- if (floater)
- {
- LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
- if (id == LLUUID::null)
- {
- texture_view->resetAsset();
- }
- else
+ LLFloater *floater = mFloaterProfileTextureHandle.get();
+ if (floater)
{
+ LLFloaterProfileTexture * texture_view = dynamic_cast<LLFloaterProfileTexture*>(floater);
+ if (id == LLUUID::null)
+ {
+ texture_view->resetAsset();
+ }
+ else
+ {
texture_view->loadAsset(id);
+ }
}
}
-}
//////////////////////////////////////////////////////////////////////////
// LLPanelProfileWeb
@@ -2018,7 +2018,8 @@ void LLPanelProfileFirstLife::onChangePhoto()
onCommitPhoto(asset_id);
}
});
- texture_floaterp->setLocalTextureEnabled(FALSE);
+ texture_floaterp->setLocalTextureEnabled(false);
+ texture_floaterp->setBakeTextureEnabled(false);
texture_floaterp->setCanApply(false, true, false);
parent_floater->addDependentFloater(mFloaterTexturePickerHandle);
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 4506088fd3..c278f9ae65 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -56,6 +56,8 @@
#include "llviewerregion.h"
+const char* const DEFAULT_DESC = "(No Description)";
+
class PropertiesChangedCallback : public LLInventoryCallback
{
public:
@@ -128,6 +130,7 @@ LLSidepanelItemInfo::LLSidepanelItemInfo(const LLPanel::Params& p)
, mUpdatePendingId(-1)
, mIsDirty(false) /*Not ready*/
, mParentFloater(NULL)
+ , mLabelItemDesc(NULL)
{
gInventory.addObserver(this);
gIdleCallbacks.addFunction(&LLSidepanelItemInfo::onIdle, (void*)this);
@@ -158,10 +161,11 @@ BOOL LLSidepanelItemInfo::postBuild()
mItemTypeIcon = getChild<LLIconCtrl>("item_type_icon");
mLabelOwnerName = getChild<LLTextBox>("LabelOwnerName");
mLabelCreatorName = getChild<LLTextBox>("LabelCreatorName");
+ mLabelItemDesc = getChild<LLTextEditor>("LabelItemDesc");
getChild<LLLineEditor>("LabelItemName")->setPrevalidate(&LLTextValidate::validateASCIIPrintableNoPipe);
getChild<LLUICtrl>("LabelItemName")->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onCommitName,this));
- getChild<LLUICtrl>("LabelItemDesc")->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
+ mLabelItemDesc->setCommitCallback(boost::bind(&LLSidepanelItemInfo:: onCommitDescription, this));
// Thumnail edition
mChangeThumbnailBtn->setCommitCallback(boost::bind(&LLSidepanelItemInfo::onEditThumbnail, this));
// acquired date
@@ -342,10 +346,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
getChildView("LabelItemName")->setEnabled(is_modifiable && !is_calling_card); // for now, don't allow rename of calling cards
getChild<LLUICtrl>("LabelItemName")->setValue(item->getName());
getChildView("LabelItemDescTitle")->setEnabled(TRUE);
- getChildView("LabelItemDesc")->setEnabled(is_modifiable);
- getChild<LLUICtrl>("LabelItemDesc")->setValue(item->getDescription());
getChild<LLUICtrl>("item_thumbnail")->setValue(item->getThumbnailUUID());
+ // Asset upload substitutes empty description with a (No Description) placeholder
+ std::string desc = item->getDescription();
+ mLabelItemDesc->setSelectAllOnFocusReceived(desc == DEFAULT_DESC);
+ mLabelItemDesc->setValue(desc);
+ mLabelItemDesc->setEnabled(is_modifiable);
+
LLUIImagePtr icon_img = LLInventoryIcon::getIcon(item->getType(), item->getInventoryType(), item->getFlags(), FALSE);
mItemTypeIcon->setImage(icon_img);
@@ -927,17 +935,22 @@ void LLSidepanelItemInfo::onCommitDescription()
LLViewerInventoryItem* item = findItem();
if(!item) return;
- LLTextEditor* labelItemDesc = getChild<LLTextEditor>("LabelItemDesc");
- if(!labelItemDesc)
+ if(!mLabelItemDesc)
+ {
+ return;
+ }
+ if (!gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE))
{
return;
}
- if((item->getDescription() != labelItemDesc->getText()) &&
- (gAgent.allowOperation(PERM_MODIFY, item->getPermissions(), GP_OBJECT_MANIPULATE)))
+ std::string old_desc = item->getDescription();
+ std::string new_desc = mLabelItemDesc->getText();
+ if(old_desc != new_desc)
{
+ mLabelItemDesc->setSelectAllOnFocusReceived(false);
LLPointer<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
- new_item->setDescription(labelItemDesc->getText());
+ new_item->setDescription(new_desc);
onCommitChanges(new_item);
}
}
diff --git a/indra/newview/llsidepaneliteminfo.h b/indra/newview/llsidepaneliteminfo.h
index 45709b82f3..3868b75af9 100644
--- a/indra/newview/llsidepaneliteminfo.h
+++ b/indra/newview/llsidepaneliteminfo.h
@@ -46,6 +46,7 @@ class LLObjectInventoryObserver;
class LLViewerObject;
class LLPermissions;
class LLTextBox;
+class LLTextEditor;
class LLSidepanelItemInfo : public LLPanel, public LLInventoryObserver
{
@@ -105,6 +106,7 @@ private:
LLIconCtrl* mItemTypeIcon;
LLTextBox* mLabelOwnerName;
LLTextBox* mLabelCreatorName;
+ LLTextEditor* mLabelItemDesc;
//
// UI Elements
diff --git a/indra/newview/llskinningutil.cpp b/indra/newview/llskinningutil.cpp
index 438b04ff39..f71e861f17 100644
--- a/indra/newview/llskinningutil.cpp
+++ b/indra/newview/llskinningutil.cpp
@@ -110,8 +110,8 @@ void LLSkinningUtil::scrubInvalidJoints(LLVOAvatar *avatar, LLMeshSkinInfo* skin
// needed for handling of any legacy bad data.
if (!avatar->getJoint(skin->mJointNames[j]))
{
- LL_DEBUGS("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL;
- LL_WARNS_ONCE("Avatar") << avatar->getFullname() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL;
+ LL_DEBUGS("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint " << skin->mJointNames[j] << LL_ENDL;
+ LL_WARNS_ONCE("Avatar") << avatar->getDebugName() << " mesh rigged to invalid joint" << skin->mJointNames[j] << LL_ENDL;
skin->mJointNames[j] = "mPelvis";
skin->mJointNumsInitialized = false; // force update after names change.
}
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 77c28bd3f4..110aa61999 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -2509,12 +2509,13 @@ LLTextureFetch::~LLTextureFetch()
}
S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
- S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http)
+ S32 w, S32 h, S32 c, S32 desired_discard, bool needs_aux, bool can_use_http, S32& worker_discard)
{
LL_PROFILE_ZONE_SCOPED;
+ worker_discard = -1;
if (mDebugPause)
{
- return -1;
+ return FETCH_REQUEST_CREATION_FAILED;
}
if (f_type == FTT_SERVER_BAKE)
@@ -2530,7 +2531,7 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
<< host << " != " << worker->mHost << LL_ENDL;
removeRequest(worker, true);
worker = NULL;
- return -1;
+ return FETCH_REQUEST_ABORTED;
}
}
@@ -2583,13 +2584,14 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
{
if (worker->wasAborted())
{
- return -1; // need to wait for previous aborted request to complete
+ return FETCH_REQUEST_ABORTED; // need to wait for previous aborted request to complete
}
+ worker_discard = desired_discard;
worker->lockWorkMutex(); // +Mw
if (worker->mState == LLTextureFetchWorker::DONE && worker->mDesiredSize == llmax(desired_size, TEXTURE_CACHE_ENTRY_SIZE) && worker->mDesiredDiscard == desired_discard) {
worker->unlockWorkMutex(); // -Mw
- return -1; // similar request has failed or is in a transitional state
+ return FETCH_REQUEST_EXISTS; // similar request has failed or is in a transitional state
}
worker->mActiveCount++;
worker->mNeedsAux = needs_aux;
@@ -2623,11 +2625,12 @@ S32 LLTextureFetch::createRequest(FTType f_type, const std::string& url, const L
worker->mNeedsAux = needs_aux;
worker->setCanUseHTTP(can_use_http) ;
worker->unlockWorkMutex(); // -Mw
+ worker_discard = desired_discard;
}
LL_DEBUGS(LOG_TXT) << "REQUESTED: " << id << " f_type " << fttype_to_string(f_type)
<< " Discard: " << desired_discard << " size " << desired_size << LL_ENDL;
- return desired_discard;
+ return FETCH_REQUEST_OK;
}
// Threads: T*
//
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index b72ecc2a65..a2e038704d 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -76,9 +76,14 @@ public:
// Threads: Tmain
void shutDownImageDecodeThread();
+ static constexpr S32 FETCH_REQUEST_OK = 0;
+ static constexpr S32 FETCH_REQUEST_CREATION_FAILED = -1;
+ static constexpr S32 FETCH_REQUEST_ABORTED = -2;
+ static constexpr S32 FETCH_REQUEST_EXISTS = -3;
// Threads: T* (but Tmain mostly)
+ // returns discard on success, fail code otherwise
S32 createRequest(FTType f_type, const std::string& url, const LLUUID& id, const LLHost& host, F32 priority,
- S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http);
+ S32 w, S32 h, S32 c, S32 discard, bool needs_aux, bool can_use_http, S32& worker_disacrd);
// Requests that a fetch operation be deleted from the queue.
// If @cancel is true, also stops any I/O operations pending.
diff --git a/indra/newview/llthumbnailctrl.cpp b/indra/newview/llthumbnailctrl.cpp
index 8291b0b061..a151463f86 100644
--- a/indra/newview/llthumbnailctrl.cpp
+++ b/indra/newview/llthumbnailctrl.cpp
@@ -111,7 +111,9 @@ void LLThumbnailCtrl::draw()
gl_draw_scaled_image( draw_rect.mLeft, draw_rect.mBottom, draw_rect.getWidth(), draw_rect.getHeight(), mTexturep, UI_VERTEX_COLOR % alpha);
- mTexturep->setKnownDrawSize(draw_rect.getWidth(), draw_rect.getHeight());
+ // Thumbnails are usually 256x256 or smaller, either report that or
+ // some high value to get image with higher priority
+ mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
}
else if( mImagep.notNull() )
{
@@ -238,12 +240,8 @@ void LLThumbnailCtrl::initImage()
{
// Should it support baked textures?
mTexturep = LLViewerTextureManager::getFetchedTexture(mImageAssetID, FTT_DEFAULT, MIPMAP_YES, LLGLTexture::BOOST_THUMBNAIL);
-
mTexturep->forceToSaveRawImage(0);
-
- S32 desired_draw_width = MAX_IMAGE_SIZE;
- S32 desired_draw_height = MAX_IMAGE_SIZE;
- mTexturep->setKnownDrawSize(desired_draw_width, desired_draw_height);
+ mTexturep->setKnownDrawSize(MAX_IMAGE_SIZE, MAX_IMAGE_SIZE);
}
}
else if (tvalue.isString())
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 2e00b2c382..217bb8d7ef 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -421,7 +421,7 @@ void LLToast::setVisible(BOOL show)
if(mHideBtn)
mHideBtn->setVisible(show);
}
- LLFloater::setVisible(show);
+ LLModalDialog::setVisible(show);
if (mPanel
&& !mPanel->isDead()
&& mWrapperPanel
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index 3a3f0b3d95..e5a8226720 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -413,10 +413,10 @@ void LLViewerJoystick::init(bool autoenable)
{
LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
// Failed to gather devices, init first suitable one
- mLastDeviceUUID = LLSD();
- void *preffered_device = NULL;
- initDevice(preffered_device);
- }
+ mLastDeviceUUID = LLSD();
+ void *preffered_device = NULL;
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -510,10 +510,10 @@ void LLViewerJoystick::initDevice(LLSD &guid)
{
LL_INFOS("Joystick") << "Failed to gather input devices. Falling back to ndof's init" << LL_ENDL;
// Failed to gather devices from window, init first suitable one
- void *preffered_device = NULL;
- mLastDeviceUUID = LLSD();
- initDevice(preffered_device);
- }
+ void *preffered_device = NULL;
+ mLastDeviceUUID = LLSD();
+ initDevice(preffered_device);
+ }
}
if (mDriverState == JDS_INITIALIZING)
@@ -881,6 +881,10 @@ void LLViewerJoystick::moveObjects(bool reset)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
if (sDelta[0] || sDelta[1] || sDelta[2])
{
@@ -1055,6 +1059,10 @@ void LLViewerJoystick::moveAvatar(bool reset)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
setCameraNeedsUpdate(true);
}
@@ -1267,9 +1275,16 @@ void LLViewerJoystick::moveFlycam(bool reset)
}
// Clear AFK state if moved beyond the deadzone
- if (!is_zero && gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ if (!is_zero)
{
- gAgent.clearAFK();
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ {
+ gAgent.clearAFK();
+ }
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
}
sFlycamPosition += LLVector3(sDelta) * sFlycamRotation;
@@ -1331,6 +1346,10 @@ bool LLViewerJoystick::toggleFlycam()
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
mOverrideCamera = !mOverrideCamera;
if (mOverrideCamera)
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index f7f8db6841..ad2675a786 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -84,6 +84,7 @@
#include "lltoolface.h"
#include "llhints.h"
#include "llhudeffecttrail.h"
+#include "llhudeffectresetskeleton.h"
#include "llhudmanager.h"
#include "llimview.h"
#include "llinventorybridge.h"
@@ -1732,7 +1733,6 @@ class LLAdvancedAppearanceToXML : public view_listener_t
{
bool handleEvent(const LLSD& userdata)
{
- std::string emptyname;
LLViewerObject *obj = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject();
LLVOAvatar *avatar = NULL;
if (obj)
@@ -1759,7 +1759,7 @@ class LLAdvancedAppearanceToXML : public view_listener_t
}
if (avatar)
{
- avatar->dumpArchetypeXML(emptyname);
+ avatar->dumpArchetypeXML(LLStringUtil::null);
}
return true;
}
@@ -6531,7 +6531,17 @@ class LLAvatarResetSkeleton: public view_listener_t
}
if(avatar)
{
- avatar->resetSkeleton(false);
+ if(avatar->getID() == gAgentID)
+ {
+ LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true);
+ effectp->setSourceObject(gAgentAvatarp);
+ effectp->setTargetObject((LLViewerObject*)avatar);
+ effectp->setResetAnimations(false);
+ }
+ else
+ {
+ avatar->resetSkeleton(false);
+ }
}
return true;
}
@@ -6558,7 +6568,17 @@ class LLAvatarResetSkeletonAndAnimations : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
if (avatar)
{
- avatar->resetSkeleton(true);
+ if(avatar->getID() == gAgentID)
+ {
+ LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true);
+ effectp->setSourceObject(gAgentAvatarp);
+ effectp->setTargetObject((LLViewerObject*)avatar);
+ effectp->setResetAnimations(true);
+ }
+ else
+ {
+ avatar->resetSkeleton(true);
+ }
}
return true;
}
@@ -6571,11 +6591,24 @@ class LLAvatarResetSelfSkeletonAndAnimations : public view_listener_t
LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject());
if (avatar)
{
- avatar->resetSkeleton(true);
+ if(avatar->getID() == gAgentID)
+ {
+ LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true);
+ effectp->setSourceObject(gAgentAvatarp);
+ effectp->setTargetObject((LLViewerObject*)avatar);
+ effectp->setResetAnimations(true);
+ }
+ else
+ {
+ avatar->resetSkeleton(true);
+ }
}
else
{
- gAgentAvatarp->resetSkeleton(true);
+ LLHUDEffectResetSkeleton* effectp = (LLHUDEffectResetSkeleton*)LLHUDManager::getInstance()->createViewerEffect(LLHUDObject::LL_HUD_EFFECT_RESET_SKELETON, true);
+ effectp->setSourceObject(gAgentAvatarp);
+ effectp->setTargetObject(gAgentAvatarp);
+ effectp->setResetAnimations(true);
}
return true;
}
@@ -7367,21 +7400,21 @@ class LLAttachmentDetach : public view_listener_t
}
LLViewerObject* parent = (LLViewerObject*)objectp->getParent();
- while (parent)
- {
- if (parent->isAvatar())
- {
- break;
- }
+ while (parent)
+ {
+ if(parent->isAvatar())
+ {
+ break;
+ }
objectp = parent;
- parent = (LLViewerObject*)parent->getParent();
- }
+ parent = (LLViewerObject*)parent->getParent();
+ }
// std::set to avoid dupplicate 'roots' from linksets
mRemoveSet.insert(objectp->getAttachmentItemID());
- return true;
- }
+ return true;
+ }
bool mAvatarsInSelection;
uuid_set_t mRemoveSet;
} func;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 506ffce1ce..0c0b20ff59 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1032,6 +1032,7 @@ void LLViewerFetchedTexture::init(bool firstinit)
mOrigHeight = 0;
mHasAux = FALSE;
mNeedsAux = FALSE;
+ mLastWorkerDiscardLevel = -1;
mRequestedDiscardLevel = -1;
mRequestedDownloadPriority = 0.f;
mFullyLoaded = FALSE;
@@ -1193,12 +1194,11 @@ void LLViewerFetchedTexture::loadFromFastCache()
if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
- if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
+ if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS))
{
- // scale oversized icon, no need to give more work to gl
- mRawImage->scale(expected_width, expected_height);
+ // Scale oversized thumbnail
+ // thumbnails aren't supposed to go over DEFAULT_THUMBNAIL_DIMENSIONS
+ mRawImage->scale(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS);
}
}
@@ -1941,13 +1941,10 @@ bool LLViewerFetchedTexture::updateFetch()
if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
- if (mRawImage && (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height))
+ if (mRawImage && (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS))
{
- // scale oversized icon, no need to give more work to gl
- // since we got mRawImage from thread worker and image may be in use (ex: writing cache), make a copy
- mRawImage = mRawImage->scaled(expected_width, expected_height);
+ // Scale oversized thumbnail
+ mRawImage = mRawImage->scaled(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS);
}
}
@@ -2088,18 +2085,26 @@ bool LLViewerFetchedTexture::updateFetch()
}
// bypass texturefetch directly by pulling from LLTextureCache
- S32 fetch_request_discard = -1;
- fetch_request_discard = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority,
- w, h, c, desired_discard, needsAux(), mCanUseHTTP);
-
- if (fetch_request_discard >= 0)
+ S32 worker_discard = -1;
+ S32 result = LLAppViewer::getTextureFetch()->createRequest(mFTType, mUrl, getID(), getTargetHost(), decode_priority,
+ w, h, c, desired_discard, needsAux(), mCanUseHTTP, worker_discard);
+
+
+ if ((result >= 0) // Worker created
+ // scaled and standard images share requests, they just process the result differently
+ // if mLastWorkerDiscardLevel doen't match worker, worker was requested by a different
+ // image and current one needs to schedule an update
+ || (result == LLTextureFetch::FETCH_REQUEST_EXISTS
+ && mLastWorkerDiscardLevel != worker_discard)
+ )
{
LL_PROFILE_ZONE_NAMED_CATEGORY_TEXTURE("vftuf - request created");
mHasFetcher = TRUE;
mIsFetching = TRUE;
+ mLastWorkerDiscardLevel = worker_discard;
// in some cases createRequest can modify discard, as an example
// bake textures are always at discard 0
- mRequestedDiscardLevel = llmin(desired_discard, fetch_request_discard);
+ mRequestedDiscardLevel = llmin(desired_discard, worker_discard);
mFetchState = LLAppViewer::getTextureFetch()->getFetchState(mID, mDownloadProgress, mRequestedDownloadPriority,
mFetchPriority, mFetchDeltaTime, mRequestDeltaTime, mCanUseHTTP);
}
@@ -2797,11 +2802,9 @@ void LLViewerFetchedTexture::setCachedRawImage(S32 discard_level, LLImageRaw* im
}
else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
- if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+ if (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)
{
- mCachedRawImage = new LLImageRaw(expected_width, expected_height, imageraw->getComponents());
+ mCachedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, imageraw->getComponents());
mCachedRawImage->copyScaled(imageraw);
}
else
@@ -2919,11 +2922,9 @@ void LLViewerFetchedTexture::saveRawImage()
}
else if (mBoostLevel == LLGLTexture::BOOST_THUMBNAIL)
{
- S32 expected_width = mKnownDrawWidth > 0 ? mKnownDrawWidth : DEFAULT_THUMBNAIL_DIMENSIONS;
- S32 expected_height = mKnownDrawHeight > 0 ? mKnownDrawHeight : DEFAULT_THUMBNAIL_DIMENSIONS;
- if (mRawImage->getWidth() > expected_width || mRawImage->getHeight() > expected_height)
+ if (mRawImage->getWidth() > DEFAULT_THUMBNAIL_DIMENSIONS || mRawImage->getHeight() > DEFAULT_THUMBNAIL_DIMENSIONS)
{
- mSavedRawImage = new LLImageRaw(expected_width, expected_height, mRawImage->getComponents());
+ mSavedRawImage = new LLImageRaw(DEFAULT_THUMBNAIL_DIMENSIONS, DEFAULT_THUMBNAIL_DIMENSIONS, mRawImage->getComponents());
mSavedRawImage->copyScaled(mRawImage);
}
else
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index 8c44f6e6c0..e6d8c46622 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -453,6 +453,7 @@ protected:
BOOL mKnownDrawSizeChanged ;
std::string mUrl;
+ S32 mLastWorkerDiscardLevel;
S32 mRequestedDiscardLevel;
F32 mRequestedDownloadPriority;
S32 mFetchState;
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index af6695b521..31138b939a 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -66,6 +66,7 @@
#include "llchatentry.h"
#include "indra_constants.h"
#include "llassetstorage.h"
+#include "lldate.h"
#include "llerrorcontrol.h"
#include "llfontgl.h"
#include "llmousehandler.h"
@@ -1425,10 +1426,16 @@ void LLViewerWindow::handleMouseMove(LLWindow *window, LLCoordGL pos, MASK mask
mWindow->showCursorFromMouseMove();
- if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME
- && !gDisconnected)
+ if (!gDisconnected)
{
- gAgent.clearAFK();
+ if (gAwayTimer.getElapsedTimeF32() > LLAgent::MIN_AFK_TIME)
+ {
+ gAgent.clearAFK();
+ }
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
}
}
@@ -1545,6 +1552,10 @@ BOOL LLViewerWindow::handleTranslatedKeyDown(KEY key, MASK mask, BOOL repeated)
{
gAgent.clearAFK();
}
+ else
+ {
+ gAwayTriggerTimer.reset();
+ }
// *NOTE: We want to interpret KEY_RETURN later when it arrives as
// a Unicode char, not as a keydown. Otherwise when client frame
@@ -4775,22 +4786,19 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save
}
// Look for an unused file name
- BOOL is_snapshot_name_loc_set = isSnapshotLocSet();
+ auto is_snapshot_name_loc_set = isSnapshotLocSet();
std::string filepath;
- S32 i = 1;
- S32 err = 0;
- std::string extension("." + image->getExtension());
+ auto i = 1;
+ auto err = 0;
+ auto extension("." + image->getExtension());
+ auto now = LLDate::now();
do
{
filepath = sSnapshotDir;
filepath += gDirUtilp->getDirDelimiter();
filepath += sSnapshotBaseName;
-
- if (is_snapshot_name_loc_set)
- {
- filepath += llformat("_%.3d",i);
- }
-
+ filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S");
+ filepath += llformat("%.2d", i);
filepath += extension;
llstat stat_info;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index a430ae63d1..8c560b0198 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -574,7 +574,7 @@ private:
// joint states to be animated
//-------------------------------------------------------------------------
LLPointer<LLJointState> mPelvisState;
- LLCharacter* mCharacter;
+ LLCharacter* mCharacter;
};
/**
@@ -677,15 +677,15 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mVisuallyMuteSetting(AV_RENDER_NORMALLY),
mMutedAVColor(LLColor4::white /* used for "uninitialize" */),
mFirstFullyVisible(TRUE),
- mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY),
mFullyLoaded(FALSE),
mPreviousFullyLoaded(FALSE),
mFullyLoadedInitialized(FALSE),
+ mFullyLoadedFrameCounter(0),
mVisualComplexity(VISUAL_COMPLEXITY_UNKNOWN),
mLoadedCallbacksPaused(FALSE),
mLoadedCallbackTextures(0),
mRenderUnloadedAvatar(LLCachedControl<bool>(gSavedSettings, "RenderUnloadedAvatar", false)),
- mLastRezzedStatus(-1),
+ mLastRezzedStatus(AV_REZZED_UNKNOWN),
mIsEditingAppearance(FALSE),
mUseLocalAppearance(FALSE),
mLastUpdateRequestCOFVersion(-1),
@@ -772,11 +772,9 @@ std::string LLVOAvatar::avString() const
{
return getFullname();
}
- else
- {
- std::string viz_string = LLVOAvatar::rezStatusToString(getRezzedStatus());
- return " Avatar '" + getFullname() + "' " + viz_string + " ";
- }
+
+ std::string status = LLVOAvatar::rezStatusToString(getRezzedStatus());
+ return " Avatar '" + getDebugName() + "' " + status + " ";
}
void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string comment)
@@ -799,10 +797,10 @@ void LLVOAvatar::debugAvatarRezTime(std::string notification_name, std::string c
if (gSavedSettings.getBOOL("DebugAvatarRezTime"))
{
LLSD args;
- args["EXISTENCE"] = llformat("%d",(U32)mDebugExistenceTimer.getElapsedTimeF32());
- args["TIME"] = llformat("%d",(U32)mRuthDebugTimer.getElapsedTimeF32());
+ args["EXISTENCE"] = llformat("%d", (U32)mDebugExistenceTimer.getElapsedTimeF32());
+ args["TIME"] = llformat("%d", (U32)mRuthDebugTimer.getElapsedTimeF32());
args["NAME"] = getFullname();
- LLNotificationsUtil::add(notification_name,args);
+ LLNotificationsUtil::add(notification_name, args);
}
}
@@ -813,14 +811,14 @@ LLVOAvatar::~LLVOAvatar()
{
if (!mFullyLoaded)
{
- debugAvatarRezTime("AvatarRezLeftCloudNotification","left after ruth seconds as cloud");
+ debugAvatarRezTime("AvatarRezLeftCloudNotification", "left after ruth seconds as cloud");
}
else
{
- debugAvatarRezTime("AvatarRezLeftNotification","left sometime after declouding");
+ debugAvatarRezTime("AvatarRezLeftNotification", "left sometime after declouding");
}
- if(mTuned)
+ if (mTuned)
{
LLPerfStats::tunedAvatars--;
mTuned = false;
@@ -917,14 +915,34 @@ BOOL LLVOAvatar::hasGray() const
return !getIsCloud() && !isFullyTextured();
}
-S32 LLVOAvatar::getRezzedStatus() const
+ERezzedStatus LLVOAvatar::getRezzedStatus() const
{
- if (getIsCloud()) return 0;
- bool textured = isFullyTextured();
- if (textured && allBakedTexturesCompletelyDownloaded()) return 3;
- if (textured) return 2;
- llassert(hasGray());
- return 1; // gray
+ if (getIsCloud())
+ return AV_REZZED_CLOUD;
+ if (!isFullyTextured())
+ return AV_REZZED_GRAY;
+ if (!allBakedTexturesCompletelyDownloaded())
+ return AV_REZZED_TEXTURED; // "downloading"
+ return AV_REZZED_FULL;
+}
+
+// static
+std::string LLVOAvatar::rezStatusToString(ERezzedStatus rez_status)
+{
+ switch (rez_status)
+ {
+ case AV_REZZED_CLOUD:
+ return "cloud";
+ case AV_REZZED_GRAY:
+ return "gray";
+ case AV_REZZED_TEXTURED:
+ return "downloading";
+ case AV_REZZED_FULL:
+ return "full";
+ default:
+ ;
+ }
+ return "unknown";
}
void LLVOAvatar::deleteLayerSetCaches(bool clearAll)
@@ -953,15 +971,10 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
{
BOOL res = TRUE;
grey_avatars = 0;
- for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
+ for (LLCharacter* character : LLCharacter::sInstances)
{
- LLVOAvatar* inst = (LLVOAvatar*) *iter;
- if( inst->isDead() )
- {
- continue;
- }
- else if( !inst->isFullyBaked() )
+ LLVOAvatar* inst = (LLVOAvatar*)character;
+ if (!inst->isDead() && !inst->isFullyBaked())
{
res = FALSE;
if (inst->mHasGrey)
@@ -974,33 +987,6 @@ BOOL LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
}
// static
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
-{
- counts.clear();
- counts.resize(4);
- for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
- iter != LLCharacter::sInstances.end(); ++iter)
- {
- LLVOAvatar* inst = (LLVOAvatar*) *iter;
- if (inst)
- {
- S32 rez_status = inst->getRezzedStatus();
- counts[rez_status]++;
- }
- }
-}
-
-// static
-std::string LLVOAvatar::rezStatusToString(S32 rez_status)
-{
- if (rez_status==0) return "cloud";
- if (rez_status==1) return "gray";
- if (rez_status==2) return "downloading";
- if (rez_status==3) return "full";
- return "unknown";
-}
-
-// static
void LLVOAvatar::dumpBakedStatus()
{
LLVector3d camera_pos_global = gAgentCamera.getCameraPositionGlobal();
@@ -2587,7 +2573,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0);
}
- LLScopedContextString str("avatar_idle_update " + getFullname());
+ LLScopedContextString str("avatar_idle_update " + getDebugName());
checkTextureLoading() ;
@@ -2679,7 +2665,7 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
// no need for high frequency
compl_upd_freq = 100;
}
- else if (mLastRezzedStatus <= 0) //cloud or init
+ else if (mLastRezzedStatus <= AV_REZZED_CLOUD) // cloud or initial
{
compl_upd_freq = 60;
}
@@ -2687,11 +2673,11 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
{
compl_upd_freq = 5;
}
- else if (mLastRezzedStatus == 1) //'grey', not fully loaded
+ else if (mLastRezzedStatus == AV_REZZED_GRAY) // 'gray', not fully loaded
{
compl_upd_freq = 40;
}
- else if (isInMuteList()) //cheap, buffers value from search
+ else if (isInMuteList()) // cheap, buffers value from search
{
compl_upd_freq = 100;
}
@@ -2813,7 +2799,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update)
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
if (LLVOAvatar::sJointDebug)
{
- LL_INFOS() << getFullname() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL;
+ LL_INFOS() << getDebugName() << ": joint touches: " << LLJoint::sNumTouches << " updates: " << LLJoint::sNumUpdates << LL_ENDL;
}
LLJoint::sNumUpdates = 0;
@@ -3055,17 +3041,17 @@ F32 LLVOAvatar::calcMorphAmount()
void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
{
// Use the Lipsync_Ooh and Lipsync_Aah morphs for lip sync
- if ( voice_enabled
- && mLastRezzedStatus > 0 // no point updating lip-sync for clouds
+ if (voice_enabled
+ && mLastRezzedStatus > AV_REZZED_CLOUD // no point updating lip-sync for clouds
&& (LLVoiceClient::getInstance()->lipSyncEnabled())
- && LLVoiceClient::getInstance()->getIsSpeaking( mID ) )
+ && LLVoiceClient::getInstance()->getIsSpeaking(mID))
{
F32 ooh_morph_amount = 0.0f;
F32 aah_morph_amount = 0.0f;
mVoiceVisualizer->lipSyncOohAah( ooh_morph_amount, aah_morph_amount );
- if( mOohMorph )
+ if (mOohMorph)
{
F32 ooh_weight = mOohMorph->getMinWeight()
+ ooh_morph_amount * (mOohMorph->getMaxWeight() - mOohMorph->getMinWeight());
@@ -3073,7 +3059,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
mOohMorph->setWeight( ooh_weight);
}
- if( mAahMorph )
+ if (mAahMorph)
{
F32 aah_weight = mAahMorph->getMinWeight()
+ aah_morph_amount * (mAahMorph->getMaxWeight() - mAahMorph->getMinWeight());
@@ -4165,16 +4151,16 @@ void LLVOAvatar::computeUpdatePeriod()
// impostor camera near clip plane
mUpdatePeriod = 1;
}
- else if ( shouldImpostor(4.0) )
+ else if (shouldImpostor(4.0))
{ //background avatars are REALLY slow updating impostors
mUpdatePeriod = UPDATE_RATE_SLOW;
}
- else if (mLastRezzedStatus <= 0)
+ else if (mLastRezzedStatus <= AV_REZZED_CLOUD)
{
// Don't update cloud avatars too often
mUpdatePeriod = UPDATE_RATE_SLOW;
}
- else if ( shouldImpostor(3.0) )
+ else if (shouldImpostor(3.0))
{ //back 25% of max visible avatars are slow updating impostors
mUpdatePeriod = UPDATE_RATE_MED;
}
@@ -4614,7 +4600,7 @@ bool LLVOAvatar::updateCharacter(LLAgent &agent)
is_attachment = cav && cav->mRootVolp && cav->mRootVolp->isAttachment(); // For attached animated objects
}
- LLScopedContextString str("updateCharacter " + getFullname() + " is_control_avatar "
+ LLScopedContextString str("updateCharacter " + getDebugName() + " is_control_avatar "
+ boost::lexical_cast<std::string>(is_control_avatar)
+ " is_attachment " + boost::lexical_cast<std::string>(is_attachment));
@@ -6033,8 +6019,11 @@ void LLVOAvatar::resetAnimations()
flushAllMotions();
}
-// Override selectively based on avatar sex and whether we're using new
-// animations.
+//-----------------------------------------------------------------------------
+// remapMotionID()
+// Override selectively based on avatar sex and whether we're using new animations.
+//-----------------------------------------------------------------------------
+// virtual
LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
{
static LLCachedControl<bool> use_new_walk_run(gSavedSettings, "UseNewWalkRun");
@@ -6084,7 +6073,6 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
}
return result;
-
}
//-----------------------------------------------------------------------------
@@ -6092,6 +6080,7 @@ LLUUID LLVOAvatar::remapMotionID(const LLUUID& id)
// id is the asset if of the animation to start
// time_offset is the offset into the animation at which to start playing
//-----------------------------------------------------------------------------
+// virtual
BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
{
LL_DEBUGS("Motion") << "motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -6114,6 +6103,7 @@ BOOL LLVOAvatar::startMotion(const LLUUID& id, F32 time_offset)
//-----------------------------------------------------------------------------
// stopMotion()
//-----------------------------------------------------------------------------
+// virtual
BOOL LLVOAvatar::stopMotion(const LLUUID& id, BOOL stop_immediate)
{
LL_DEBUGS("Motion") << "Motion requested " << id.asString() << " " << gAnimLibrary.animationName(id) << LL_ENDL;
@@ -6153,6 +6143,7 @@ void LLVOAvatar::stopMotionFromSource(const LLUUID& source_id)
//-----------------------------------------------------------------------------
// addDebugText()
//-----------------------------------------------------------------------------
+// virtual
void LLVOAvatar::addDebugText(const std::string& text)
{
mDebugText.append(1, '\n');
@@ -6160,8 +6151,22 @@ void LLVOAvatar::addDebugText(const std::string& text)
}
//-----------------------------------------------------------------------------
+// getDebugName()
+//-----------------------------------------------------------------------------
+// virtual
+std::string LLVOAvatar::getDebugName() const
+{
+#if LL_RELEASE_WITH_DEBUG_INFO
+ return getFullname();
+#else
+ return getID().asString();
+#endif // LL_RELEASE_WITH_DEBUG_INFO
+}
+
+//-----------------------------------------------------------------------------
// getID()
//-----------------------------------------------------------------------------
+// virtual
const LLUUID& LLVOAvatar::getID() const
{
return mID;
@@ -6171,6 +6176,7 @@ const LLUUID& LLVOAvatar::getID() const
// getJoint()
//-----------------------------------------------------------------------------
// RN: avatar joints are multi-rooted to include screen-based attachments
+// virtual
LLJoint *LLVOAvatar::getJoint( const std::string &name )
{
joint_map_t::iterator iter = mJointMap.find(name);
@@ -6286,7 +6292,7 @@ bool LLVOAvatar::jointIsRiggedTo(const LLJoint *joint) const
void LLVOAvatar::clearAttachmentOverrides()
{
- LLScopedContextString str("clearAttachmentOverrides " + getFullname());
+ LLScopedContextString str("clearAttachmentOverrides " + getDebugName());
for (S32 i=0; i<LL_CHARACTER_MAX_ANIMATED_JOINTS; i++)
{
@@ -6318,7 +6324,7 @@ void LLVOAvatar::clearAttachmentOverrides()
//-----------------------------------------------------------------------------
void LLVOAvatar::rebuildAttachmentOverrides()
{
- LLScopedContextString str("rebuildAttachmentOverrides " + getFullname());
+ LLScopedContextString str("rebuildAttachmentOverrides " + getDebugName());
LL_DEBUGS("AnimatedObjects") << "rebuilding" << LL_ENDL;
dumpStack("AnimatedObjectsStack");
@@ -6369,7 +6375,7 @@ void LLVOAvatar::rebuildAttachmentOverrides()
// -----------------------------------------------------------------------------
void LLVOAvatar::updateAttachmentOverrides()
{
- LLScopedContextString str("updateAttachmentOverrides " + getFullname());
+ LLScopedContextString str("updateAttachmentOverrides " + getDebugName());
LL_DEBUGS("AnimatedObjects") << "updating" << LL_ENDL;
dumpStack("AnimatedObjectsStack");
@@ -6447,11 +6453,11 @@ void LLVOAvatar::updateAttachmentOverrides()
}
}
pelvis_fixups = mPelvisFixups;
- //dumpArchetypeXML(getFullname() + "_paranoid_updated");
+ //dumpArchetypeXML(getDebugName() + "_paranoid_updated");
// Rebuild and compare
rebuildAttachmentOverrides();
- //dumpArchetypeXML(getFullname() + "_paranoid_rebuilt");
+ //dumpArchetypeXML(getDebugName() + "_paranoid_rebuilt");
bool mismatched = false;
for (S32 joint_num = 0; joint_num < LL_CHARACTER_MAX_ANIMATED_JOINTS; joint_num++)
{
@@ -6501,7 +6507,7 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
return;
}
- LLScopedContextString str("addAttachmentOverridesForObject " + getFullname());
+ LLScopedContextString str("addAttachmentOverridesForObject " + getDebugName());
if (getOverallAppearance() != AOA_NORMAL)
{
@@ -6683,21 +6689,21 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const
{
std::stringstream ss;
std::copy(pos_names.begin(), pos_names.end(), std::ostream_iterator<std::string>(ss, ","));
- LL_INFOS() << getFullname() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL;
+ LL_INFOS() << avString() << " attachment positions defined for joints: " << ss.str() << "\n" << LL_ENDL;
}
else
{
- LL_DEBUGS("Avatar") << getFullname() << " no attachment positions defined for any joints" << "\n" << LL_ENDL;
+ LL_DEBUGS("Avatar") << avString() << " no attachment positions defined for any joints" << "\n" << LL_ENDL;
}
if (scale_names.size())
{
std::stringstream ss;
std::copy(scale_names.begin(), scale_names.end(), std::ostream_iterator<std::string>(ss, ","));
- LL_INFOS() << getFullname() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL;
+ LL_INFOS() << getDebugName() << " attachment scales defined for joints: " << ss.str() << "\n" << LL_ENDL;
}
else
{
- LL_INFOS() << getFullname() << " no attachment scales defined for any joints" << "\n" << LL_ENDL;
+ LL_INFOS() << getDebugName() << " no attachment scales defined for any joints" << "\n" << LL_ENDL;
}
if (!verbose)
@@ -8056,10 +8062,10 @@ bool LLVOAvatar::getIsCloud() const
);
}
-void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
+void LLVOAvatar::updateRezzedStatusTimers(ERezzedStatus rez_status)
{
- // State machine for rezzed status. Statuses are -1 on startup, 0
- // = cloud, 1 = gray, 2 = downloading, 3 = full.
+ // State machine for rezzed status.
+ // Statuses are -1 on startup, 0 = cloud, 1 = gray, 2 = downloading, 3 = full.
// Purpose is to collect time data for each it takes avatar to reach
// various loading landmarks: gray, textured (partial), textured fully.
@@ -8067,10 +8073,10 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
{
LL_DEBUGS("Avatar") << avString() << "rez state change: " << mLastRezzedStatus << " -> " << rez_status << LL_ENDL;
- if (mLastRezzedStatus == -1 && rez_status != -1)
+ if (mLastRezzedStatus == AV_REZZED_UNKNOWN && rez_status != AV_REZZED_UNKNOWN)
{
// First time initialization, start all timers.
- for (S32 i = 1; i < 4; i++)
+ for (ERezzedStatus i = AV_REZZED_GRAY; i <= AV_REZZED_FULL; ++(S32&)i)
{
startPhase("load_" + LLVOAvatar::rezStatusToString(i));
startPhase("first_load_" + LLVOAvatar::rezStatusToString(i));
@@ -8079,7 +8085,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
if (rez_status < mLastRezzedStatus)
{
// load level has decreased. start phase timers for higher load levels.
- for (S32 i = rez_status+1; i <= mLastRezzedStatus; i++)
+ for (ERezzedStatus i = next(rez_status); i <= mLastRezzedStatus; ++(S32&)i)
{
startPhase("load_" + LLVOAvatar::rezStatusToString(i));
}
@@ -8087,12 +8093,12 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
else if (rez_status > mLastRezzedStatus)
{
// load level has increased. stop phase timers for lower and equal load levels.
- for (S32 i = llmax(mLastRezzedStatus+1,1); i <= rez_status; i++)
+ for (ERezzedStatus i = llmax(next(mLastRezzedStatus), AV_REZZED_GRAY); i <= rez_status; ++(S32&)i)
{
stopPhase("load_" + LLVOAvatar::rezStatusToString(i));
stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);
}
- if (rez_status == 3)
+ if (rez_status == AV_REZZED_FULL)
{
// "fully loaded", mark any pending appearance change complete.
selfStopPhase("update_appearance_from_cof");
@@ -8102,6 +8108,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
updateVisualComplexity();
}
}
+
mLastRezzedStatus = rez_status;
}
}
@@ -8232,18 +8239,18 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
// returns true if the value has changed.
BOOL LLVOAvatar::updateIsFullyLoaded()
{
- S32 rez_status = getRezzedStatus();
+ ERezzedStatus rez_status = getRezzedStatus();
bool loading = getIsCloud();
if (mFirstFullyVisible && !mIsControlAvatar)
{
- loading = ((rez_status < 2)
+ loading = ((rez_status < AV_REZZED_TEXTURED)
// Wait at least 60s for unfinished textures to finish on first load,
// don't wait forever, it might fail. Even if it will eventually load by
// itself and update mLoadedCallbackTextures (or fail and clean the list),
// avatars are more time-sensitive than textures and can't wait that long.
|| (mLoadedCallbackTextures < mCallbackTextureList.size() && mLastTexCallbackAddedTime.getElapsedTimeF32() < MAX_TEXTURE_WAIT_TIME_SEC)
|| !mPendingAttachment.empty()
- || (rez_status < 3 && !isFullyBaked())
+ || (rez_status < AV_REZZED_FULL && !isFullyBaked())
|| hasPendingAttachedMeshes()
);
}
@@ -8283,56 +8290,53 @@ void LLVOAvatar::updateRuthTimer(bool loading)
BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
{
- // We wait a little bit before giving the 'all clear', to let things to
- // settle down (models to snap into place, textures to get first packets).
- // And if viewer isn't aware of some parts yet, this gives them a chance
- // to arrive.
- const F32 LOADED_DELAY = 1.f;
-
if (loading)
{
mFullyLoadedTimer.reset();
+ mFullyLoaded = false;
}
-
- if (mFirstFullyVisible)
+ else if (!mFullyLoaded)
{
- if (!isSelf() && loading)
+ // We wait a little bit before giving the 'all clear', to let things to settle down:
+ // models to snap into place, textures to get first packets, LODs to load.
+ const F32 LOADED_DELAY = 1.f;
+
+ F32 delay = LOADED_DELAY;
+ if (mFirstFullyVisible && !isSelf() && loading)
{
- // Note that textures can causes 60s delay on thier own
- // so this delay might end up on top of textures' delay
- mFirstUseDelaySeconds = llclamp(
- mFirstAppearanceMessageTimer.getElapsedTimeF32(),
- FIRST_APPEARANCE_CLOUD_MIN_DELAY,
- FIRST_APPEARANCE_CLOUD_MAX_DELAY);
+ delay = mFirstAppearanceMessageTimer.getElapsedTimeF32();
+ // Note that textures can causes 60s delay on thier own
+ // so this delay might end up on top of textures' delay
+ delay = llclamp(
+ mFirstAppearanceMessageTimer.getElapsedTimeF32(),
+ FIRST_APPEARANCE_CLOUD_MIN_DELAY,
+ FIRST_APPEARANCE_CLOUD_MAX_DELAY);
- if (shouldImpostor())
- {
- // Impostors are less of a priority,
- // let them stay cloud longer
- mFirstUseDelaySeconds *= 1.25;
- }
+ if (shouldImpostor())
+ {
+ // Impostors are less of a priority,
+ // let them stay cloud longer
+ delay *= 1.25;
+ }
}
- mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds);
- }
- else
- {
- mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > LOADED_DELAY);
- }
- if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
- {
- debugAvatarRezTime("AvatarRezNotification","fully loaded");
+ mFullyLoaded = mFullyLoadedTimer.getElapsedTimeF32() > delay;
+
+ if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
+ {
+ debugAvatarRezTime("AvatarRezNotification", "fully loaded");
+ }
}
// did our loading state "change" from last call?
// FIXME runway - why are we updating every 30 calls even if nothing has changed?
// This causes updateLOD() to run every 30 frames, among other things.
+ BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);
const S32 UPDATE_RATE = 30;
BOOL changed =
- ((mFullyLoaded != mPreviousFullyLoaded) || // if the value is different from the previous call
- (!mFullyLoadedInitialized) || // if we've never been called before
- (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change
- BOOL fully_loaded_changed = (mFullyLoaded != mPreviousFullyLoaded);
+ (fully_loaded_changed || // if the value is different from the previous call
+ !mFullyLoadedInitialized || // if we've never been called before
+ (mFullyLoadedFrameCounter % UPDATE_RATE == 0)); // every now and then issue a change
mPreviousFullyLoaded = mFullyLoaded;
mFullyLoadedInitialized = TRUE;
@@ -8350,6 +8354,7 @@ BOOL LLVOAvatar::processFullyLoadedChange(bool loading)
mNeedsImpostorUpdate = TRUE;
mLastImpostorUpdateReason = 6;
}
+
return changed;
}
@@ -9222,12 +9227,12 @@ void dump_visual_param(apr_file_t* file, LLVisualParam* viewer_param, F32 value)
void LLVOAvatar::dumpAppearanceMsgParams( const std::string& dump_prefix,
const LLAppearanceMessageContents& contents)
{
- std::string outfilename = get_sequential_numbered_file_name(dump_prefix,".xml");
+ std::string outfilename = get_sequential_numbered_file_name(dump_prefix, ".xml");
const std::vector<F32>& params_for_dump = contents.mParamWeights;
const LLTEContents& tec = contents.mTEContents;
LLAPRFile outfile;
- std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
+ std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, outfilename);
outfile.open(fullpath, LL_APR_WB );
apr_file_t* file = outfile.getFileHandle();
if (!file)
@@ -9344,8 +9349,8 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
}
else
{
- LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
- }
+ LL_DEBUGS("Avatar") << "AvatarAppearance msg received without any parameters, object: " << getID() << LL_ENDL;
+ }
LLVisualParam* appearance_version_param = getVisualParam(11000);
if (appearance_version_param)
@@ -9400,7 +9405,7 @@ void LLVOAvatar::processAvatarAppearance( LLMessageSystem* mesgsys )
static LLCachedControl<bool> enable_verbose_dumps(gSavedSettings, "DebugAvatarAppearanceMessage");
static LLCachedControl<bool> block_avatar_appearance_messages(gSavedSettings, "BlockAvatarAppearanceMessages");
- std::string dump_prefix = getFullname() + "_" + (isSelf()?"s":"o") + "_";
+ std::string dump_prefix = getDebugName() + (isSelf() ? "_s_" : "_o_");
if (block_avatar_appearance_messages)
{
LL_WARNS() << "Blocking AvatarAppearance message" << LL_ENDL;
@@ -10032,17 +10037,13 @@ void LLVOAvatar::dumpArchetypeXML(const std::string& prefix, bool group_by_weara
std::string outprefix(prefix);
if (outprefix.empty())
{
- outprefix = getFullname() + (isSelf()?"_s":"_o");
+ outprefix = getDebugName() + (isSelf() ? "_s" : "_o");
}
- if (outprefix.empty())
- {
- outprefix = std::string("new_archetype");
- }
- std::string outfilename = get_sequential_numbered_file_name(outprefix,".xml");
+ std::string outfilename = get_sequential_numbered_file_name(outprefix, ".xml");
LLAPRFile outfile;
LLWearableType *wr_inst = LLWearableType::getInstance();
- std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS,outfilename);
+ std::string fullpath = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, outfilename);
if (APR_SUCCESS == outfile.open(fullpath, LL_APR_WB ))
{
apr_file_t* file = outfile.getFileHandle();
@@ -10541,7 +10542,7 @@ void LLVOAvatar::updateRiggingInfo()
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- LL_DEBUGS("RigSpammish") << getFullname() << " updating rig tab" << LL_ENDL;
+ LL_DEBUGS("RigSpammish") << getDebugName() << " updating rig tab" << LL_ENDL;
std::vector<LLVOVolume*> volumes;
@@ -10579,7 +10580,7 @@ void LLVOAvatar::updateRiggingInfo()
}
//LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL;
- LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
+ LL_DEBUGS("RigSpammish") << getDebugName() << " after update rig tab:" << LL_ENDL;
S32 joint_count, box_count;
showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index c14784cc6d..bf899dc7d6 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -80,6 +80,15 @@ const F32 MAX_AVATAR_LOD_FACTOR = 1.0f;
extern U32 gFrameCount;
+enum ERezzedStatus : S32
+{
+ AV_REZZED_UNKNOWN = -1,
+ AV_REZZED_CLOUD = 0,
+ AV_REZZED_GRAY = 1,
+ AV_REZZED_TEXTURED = 2, // "downloading"
+ AV_REZZED_FULL = 3
+};
+
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// LLVOAvatar
//
@@ -231,6 +240,7 @@ public:
virtual void onActiveOverrideMeshesChanged();
/*virtual*/ const LLUUID& getID() const;
+ /*virtual*/ std::string getDebugName() const;
/*virtual*/ void addDebugText(const std::string& text);
/*virtual*/ F32 getTimeDilation();
/*virtual*/ void getGround(const LLVector3 &inPos, LLVector3 &outPos, LLVector3 &outNorm);
@@ -327,22 +337,24 @@ public:
// avatar render cost
- U32 getVisualComplexity() { return mVisualComplexity; };
+ U32 getVisualComplexity() { return mVisualComplexity; };
// surface area calculation
- F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; };
+ F32 getAttachmentSurfaceArea() { return mAttachmentSurfaceArea; };
- U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
- void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
+ U32 getReportedVisualComplexity() { return mReportedVisualComplexity; }; // Numbers as reported by the SL server
+ void setReportedVisualComplexity(U32 value) { mReportedVisualComplexity = value; };
- S32 getUpdatePeriod() { return mUpdatePeriod; };
- const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
+ S32 getUpdatePeriod() { return mUpdatePeriod; };
+ const LLColor4 & getMutedAVColor() { return mMutedAVColor; };
static void updateImpostorRendering(U32 newMaxNonImpostorsValue);
void idleUpdateBelowWater();
static void updateNearbyAvatarCount();
+ static ERezzedStatus next(ERezzedStatus status) { return (ERezzedStatus)++(S32&)status; }
+
LLVector3 idleCalcNameTagPosition(const LLVector3 &root_pos_last);
//--------------------------------------------------------------------
@@ -398,11 +410,10 @@ public:
virtual bool getIsCloud() const;
BOOL isFullyTextured() const;
BOOL hasGray() const;
- S32 getRezzedStatus() const; // 0 = cloud, 1 = gray, 2 = textured, 3 = textured and fully downloaded.
- void updateRezzedStatusTimers(S32 status);
-
- S32 mLastRezzedStatus;
+ ERezzedStatus getRezzedStatus() const;
+ void updateRezzedStatusTimers(ERezzedStatus status);
+ ERezzedStatus mLastRezzedStatus;
void startPhase(const std::string& phase_name);
void stopPhase(const std::string& phase_name, bool err_check = true);
@@ -422,7 +433,6 @@ protected:
private:
BOOL mFirstFullyVisible;
- F32 mFirstUseDelaySeconds;
LLFrameTimer mFirstAppearanceMessageTimer;
BOOL mFullyLoaded;
@@ -708,8 +718,7 @@ public:
BOOL isFullyBaked();
static BOOL areAllNearbyInstancesBaked(S32& grey_avatars);
- static void getNearbyRezzedStats(std::vector<S32>& counts);
- static std::string rezStatusToString(S32 status);
+ static std::string rezStatusToString(ERezzedStatus status);
//--------------------------------------------------------------------
// Baked textures
@@ -727,7 +736,7 @@ protected:
LLViewerTexLayerSet* getTexLayerSet(const U32 index) const { return dynamic_cast<LLViewerTexLayerSet*>(mBakedTextureDatas[index].mTexLayerSet); }
- LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList ;
+ LLLoadedCallbackEntry::source_callback_list_t mCallbackTextureList;
BOOL mLoadedCallbacksPaused;
S32 mLoadedCallbackTextures; // count of 'loaded' baked textures, filled from mCallbackTextureList
LLFrameTimer mLastTexCallbackAddedTime;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index 38742c9c64..0da9e546a5 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -2233,12 +2233,17 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
// Status of all nearby avs including ourself.
msg["nearby"] = LLSD::emptyArray();
- std::vector<S32> rez_counts;
- LLVOAvatar::getNearbyRezzedStats(rez_counts);
- for (S32 rez_stat = 0; rez_stat < rez_counts.size(); ++rez_stat)
+
+ S32 status_counts[AV_REZZED_FULL - AV_REZZED_CLOUD + 1] = { 0 };
+ for (LLCharacter* character : LLCharacter::sInstances)
+ {
+ ERezzedStatus status = ((LLVOAvatar*)character)->getRezzedStatus();
+ ++status_counts[status - AV_REZZED_CLOUD];
+ }
+ for (ERezzedStatus status = AV_REZZED_CLOUD; status <= AV_REZZED_FULL; ++(S32&)status)
{
- std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat);
- msg["nearby"][rez_status_name] = rez_counts[rez_stat];
+ std::string status_name = LLVOAvatar::rezStatusToString(status);
+ msg["nearby"][status_name] = status_counts[status - AV_REZZED_CLOUD];
}
// std::vector<std::string> bucket_fields("timer_name","is_self","grid_x","grid_y","is_using_server_bake");
diff --git a/indra/newview/llvoicecallhandler.cpp b/indra/newview/llvoicecallhandler.cpp
index 82a8d48f30..5dafaca031 100644
--- a/indra/newview/llvoicecallhandler.cpp
+++ b/indra/newview/llvoicecallhandler.cpp
@@ -38,6 +38,11 @@ public:
{
}
+ virtual bool canHandleUntrusted(const LLSD &params, const LLSD &query_map, LLMediaCtrl *web, const std::string &nav_type)
+ {
+ return (nav_type == NAV_TYPE_CLICKED || nav_type == NAV_TYPE_EXTERNAL);
+ }
+
bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)
{
//Make sure we have some parameters
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index ea6fb2e55b..316e0206d3 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1425,7 +1425,7 @@ BOOL LLVOVolume::calcLOD()
const LLVector3* box = avatar->getLastAnimExtents();
LLVector3 diag = box[1] - box[0];
radius = diag.magVec() * 0.5f;
- LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
+ LL_DEBUGS("DynamicBox") << avatar->getDebugName() << " diag " << diag << " radius " << radius << LL_ENDL;
}
else
{
@@ -1436,7 +1436,7 @@ BOOL LLVOVolume::calcLOD()
const LLVector3* box = avatar->getLastAnimExtents();
LLVector3 diag = box[1] - box[0];
radius = diag.magVec(); // preserve old BinRadius behavior - 2x off
- LL_DEBUGS("DynamicBox") << avatar->getFullname() << " diag " << diag << " radius " << radius << LL_ENDL;
+ LL_DEBUGS("DynamicBox") << avatar->getDebugName() << " diag " << diag << " radius " << radius << LL_ENDL;
}
if (distance <= 0.f || radius <= 0.f)
{
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml b/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
deleted file mode 100644
index 6c3214a76d..0000000000
--- a/indra/newview/skins/default/xui/en/floater_inventory_item_properties.xml
+++ /dev/null
@@ -1,421 +0,0 @@
-<?xml version="1.0" encoding="utf-8" standalone="yes"?>
-<floater
- legacy_header_height="18"
- height="340"
- layout="topleft"
- name="item properties"
- help_topic="item_properties"
- save_rect="true"
- title="INVENTORY ITEM PROPERTIES"
- width="350">
- <floater.string
- name="unknown">
- (unknown)
- </floater.string>
- <floater.string
- name="public">
- (public)
- </floater.string>
- <floater.string
- name="you_can">
- You can:
- </floater.string>
- <floater.string
- name="owner_can">
- Owner can:
- </floater.string>
- <floater.string
- name="acquiredDate">
- [wkday,datetime,local] [mth,datetime,local] [day,datetime,local] [hour,datetime,local]:[min,datetime,local]:[second,datetime,local] [year,datetime,local]
- </floater.string>
- <icon
- follows="top|right"
- height="18"
- image_name="Lock"
- layout="topleft"
- left="276"
- mouse_opaque="true"
- name="IconLocked"
- top="4"
- width="18" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="LabelItemNameTitle"
- top="25"
- width="78">
- Name:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="78"
- max_length_bytes="63"
- name="LabelItemName"
- top_delta="0"
- width="252" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="LabelItemDescTitle"
- top="45"
- width="78">
- Description:
- </text>
- <line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_delta="78"
- max_length_bytes="127"
- name="LabelItemDesc"
- top_delta="0"
- width="252" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelCreatorTitle"
- top="65"
- width="78">
- Creator:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelCreatorName"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="170">
- TestString PleaseIgnore
- </text>
- <button
- follows="top|right"
- height="16"
- label="Profile..."
- layout="topleft"
- left_delta="174"
- name="BtnCreator"
- top_delta="0"
- width="78" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelOwnerTitle"
- top="85"
- width="78">
- Owner:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelOwnerName"
- top_delta="0"
- translate="false"
- use_ellipses="true"
- width="170">
- TestString PleaseIgnore
- </text>
- <button
- follows="top|right"
- height="16"
- label="Profile..."
- layout="topleft"
- left_delta="174"
- name="BtnOwner"
- top_delta="0"
- width="78" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left="10"
- name="LabelAcquiredTitle"
- top="105"
- width="78">
- Acquired:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="16"
- layout="topleft"
- left_delta="78"
- name="LabelAcquiredDate"
- top_delta="0"
- width="252">
- Wed May 24 12:50:46 2006
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="OwnerLabel"
- top="125"
- width="78">
- You:
- </text>
- <check_box
- height="16"
- label="Edit"
- layout="topleft"
- left_pad="5"
- name="CheckOwnerModify"
- top_delta="0"
- width="78" />
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="0"
- name="CheckOwnerCopy"
- top_pad="5"
- width="88" />
- <check_box
- height="16"
- label="Resell"
- layout="topleft"
- left_delta="0"
- name="CheckOwnerTransfer"
- top_pad="5"
- width="106" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="AnyoneLabel"
- top_pad="5"
- width="78">
- Anyone:
- </text>
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_pad="5"
- name="CheckEveryoneCopy"
- top_delta="0"
- width="130" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="GroupLabel"
- top_pad="5"
- width="78">
- Group:
- </text>
- <check_box
- height="16"
- label="Share"
- layout="topleft"
- left_pad="5"
- name="CheckShareWithGroup"
- top_delta="5"
- width="106" />
- <text
- type="string"
- length="1"
- follows="left|top"
- height="25"
- layout="topleft"
- left="10"
- name="NextOwnerLabel"
- top_pad="5"
- width="78"
- word_wrap="true">
- Next owner:
- </text>
- <check_box
- height="16"
- label="Edit"
- layout="topleft"
- left_pad="5"
- name="CheckNextOwnerModify"
- top_delta="0"
- width="78" />
- <check_box
- height="16"
- label="Copy"
- layout="topleft"
- left_delta="0"
- name="CheckNextOwnerCopy"
- top_pad="5"
- width="88" />
- <check_box
- height="16"
- label="Resell"
- layout="topleft"
- left_delta="0"
- name="CheckNextOwnerTransfer"
- top_pad="5"
- width="106" />
- <check_box
- height="16"
- label="For Sale"
- layout="topleft"
- left="10"
- name="CheckPurchase"
- top_pad="5"
- width="78" />
- <combo_box
- height="19"
- left_pad="5"
- layout="topleft"
- follows="left|top"
- name="ComboBoxSaleType"
- width="110">
- <combo_box.item
- name="Copy"
- label="Copy"
- value="2" />
- <combo_box.item
- name="Contents"
- label="Contents"
- value="3" />
- <combo_box.item
- name="Original"
- label="Original"
- value="1" />
- </combo_box>
- <spinner
- follows="left|top"
- decimal_digits="0"
- increment="1"
- name="Edit Cost"
- label="Price:"
- label_width="100"
- left="10"
- width="192"
- min_val="1"
- height="19"
- max_val="999999999"
- top_pad="5"/>
- <text
- type="string"
- length="1"
- height="15"
- follows="left|top"
- layout="topleft"
- left_delta="82"
- name="CurrencySymbol"
- top_delta="1"
- width="18">
- L$
- </text>
-
- <!--line_editor
- border_style="line"
- border_thickness="1"
- follows="left|top|right"
- height="16"
- layout="topleft"
- left_pad="5"
- max_length_bytes="25"
- name="EditPrice"
- top_delta="0"
- width="242" /-->
-
- <!--text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left="10"
- name="BaseMaskDebug"
- top="155"
- width="330">
- B:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="OwnerMaskDebug"
- top_delta="0"
- width="270">
- O:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="GroupMaskDebug"
- top_delta="0"
- width="210">
- G:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="EveryoneMaskDebug"
- top_delta="0"
- width="150">
- E:
- </text>
- <text
- type="string"
- length="1"
- follows="left|top"
- height="10"
- layout="topleft"
- left_delta="60"
- name="NextMaskDebug"
- top_delta="0"
- width="90">
- N:
- </text-->
-
-</floater>
diff --git a/indra/newview/skins/default/xui/en/menu_settings_gear.xml b/indra/newview/skins/default/xui/en/menu_settings_gear.xml
index 57f4aa8655..96cbac4478 100644
--- a/indra/newview/skins/default/xui/en/menu_settings_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_settings_gear.xml
@@ -24,6 +24,9 @@
<menu_item_call.on_click
function="MyEnvironments.DoApply"
parameter="local" />
+ <menu_item_call.on_enable
+ function="MyEnvironments.CanApply"
+ parameter="local"/>
</menu_item_call>
<menu_item_call
name="Settings Apply Parcel"