summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/CMakeLists.txt34
-rw-r--r--indra/newview/VIEWER_VERSION.txt2
-rw-r--r--indra/newview/app_settings/settings.xml22
-rw-r--r--indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl4
-rw-r--r--indra/newview/character/avatar_lad.xml17
-rw-r--r--indra/newview/llagent.cpp55
-rw-r--r--indra/newview/llagent.h4
-rw-r--r--indra/newview/llagentcamera.cpp2
-rw-r--r--indra/newview/llaisapi.cpp16
-rw-r--r--indra/newview/llappearancemgr.cpp7
-rw-r--r--indra/newview/llappviewer.cpp42
-rw-r--r--indra/newview/llavatarlist.cpp2
-rw-r--r--indra/newview/llblocklist.cpp5
-rw-r--r--indra/newview/llchathistory.cpp6
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp17
-rw-r--r--indra/newview/llchiclet.cpp5
-rw-r--r--indra/newview/llchiclet.h11
-rw-r--r--indra/newview/llcommandlineparser.cpp7
-rw-r--r--indra/newview/llcompilequeue.cpp2
-rw-r--r--indra/newview/llcontrolavatar.h1
-rw-r--r--indra/newview/llconversationlog.cpp5
-rw-r--r--indra/newview/llconversationmodel.cpp5
-rw-r--r--indra/newview/lldirpicker.cpp7
-rw-r--r--indra/newview/lldrawable.cpp2
-rw-r--r--indra/newview/lldrawable.h6
-rw-r--r--indra/newview/lldrawpoolavatar.cpp20
-rw-r--r--indra/newview/llexternaleditor.cpp3
-rw-r--r--indra/newview/llface.h6
-rw-r--r--indra/newview/llfavoritesbar.cpp5
-rw-r--r--indra/newview/llfilepicker.cpp108
-rw-r--r--indra/newview/llflexibleobject.cpp8
-rw-r--r--indra/newview/llfloater360capture.cpp2
-rw-r--r--indra/newview/llfloatercamera.cpp158
-rw-r--r--indra/newview/llfloatercamera.h17
-rw-r--r--indra/newview/llfloatereditextdaycycle.cpp2
-rw-r--r--indra/newview/llfloateremojipicker.cpp4
-rw-r--r--indra/newview/llfloatergodtools.cpp22
-rw-r--r--indra/newview/llfloaterimcontainer.cpp6
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp36
-rw-r--r--indra/newview/llfloaterimnearbychathandler.h2
-rw-r--r--indra/newview/llfloaterimsessiontab.cpp2
-rw-r--r--indra/newview/llfloaterinventorythumbnailshelper.cpp543
-rw-r--r--indra/newview/llfloaterinventorythumbnailshelper.h82
-rw-r--r--indra/newview/llfloaterlagmeter.cpp4
-rw-r--r--indra/newview/llfloatermarketplacelistings.cpp25
-rw-r--r--indra/newview/llfloatermarketplacelistings.h4
-rw-r--r--indra/newview/llfloaterpreference.cpp87
-rw-r--r--indra/newview/llfloaterpreferencesgraphicsadvanced.cpp19
-rw-r--r--indra/newview/llfloaterregioninfo.cpp53
-rw-r--r--indra/newview/llfloateruipreview.cpp2
-rw-r--r--indra/newview/llfloaterurlentry.cpp2
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp1
-rw-r--r--indra/newview/llfriendcard.cpp2
-rw-r--r--indra/newview/llhudnametag.cpp6
-rw-r--r--indra/newview/llhudobject.cpp8
-rw-r--r--indra/newview/llimprocessing.cpp6
-rw-r--r--indra/newview/llimview.cpp39
-rw-r--r--indra/newview/llinspecttexture.cpp5
-rw-r--r--indra/newview/llinventorybridge.cpp27
-rw-r--r--indra/newview/llinventorybridge.h4
-rw-r--r--indra/newview/llinventoryfilter.cpp12
-rw-r--r--indra/newview/llinventoryfunctions.cpp44
-rw-r--r--indra/newview/llinventorygallery.cpp21
-rw-r--r--indra/newview/llinventorymodel.cpp32
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.cpp118
-rw-r--r--indra/newview/llinventorymodelbackgroundfetch.h4
-rw-r--r--indra/newview/llinventoryobserver.cpp1
-rw-r--r--indra/newview/lllogchat.cpp7
-rw-r--r--indra/newview/lllogininstance.h2
-rw-r--r--indra/newview/llmachineid.cpp4
-rw-r--r--indra/newview/llmarketplacefunctions.cpp52
-rw-r--r--indra/newview/llmarketplacenotifications.cpp3
-rw-r--r--indra/newview/llmaterialeditor.cpp2
-rw-r--r--indra/newview/llmaterialmgr.cpp2
-rw-r--r--indra/newview/llmediactrl.cpp2
-rw-r--r--indra/newview/llmediadataclient.h4
-rw-r--r--indra/newview/llmeshrepository.cpp16
-rw-r--r--indra/newview/llmodelpreview.cpp46
-rw-r--r--indra/newview/llmodelpreview.h1
-rw-r--r--indra/newview/llnotificationhandlerutil.cpp6
-rw-r--r--indra/newview/llnotificationlistitem.cpp2
-rw-r--r--indra/newview/llnotificationmanager.cpp21
-rw-r--r--indra/newview/llnotificationofferhandler.cpp9
-rw-r--r--indra/newview/lloutfitgallery.cpp15
-rw-r--r--indra/newview/lloutfitgallery.h6
-rw-r--r--indra/newview/lloutfitslist.cpp82
-rw-r--r--indra/newview/lloutfitslist.h27
-rw-r--r--indra/newview/llpaneleditwearable.cpp4
-rw-r--r--indra/newview/llpanelexperiencelisteditor.cpp3
-rw-r--r--indra/newview/llpanelface.cpp2
-rw-r--r--indra/newview/llpanelgroupbulkban.cpp9
-rw-r--r--indra/newview/llpanellandmarkinfo.cpp2
-rw-r--r--indra/newview/llpanellogin.cpp2
-rw-r--r--indra/newview/llpanellogin.h2
-rw-r--r--indra/newview/llpanelmediasettingsgeneral.cpp10
-rw-r--r--indra/newview/llpanelnearbymedia.cpp12
-rw-r--r--indra/newview/llpanelobject.cpp17
-rw-r--r--indra/newview/llpaneloutfitsinventory.h3
-rw-r--r--indra/newview/llpanelprofile.cpp10
-rw-r--r--indra/newview/llpanelprofileclassifieds.cpp22
-rw-r--r--indra/newview/llpanelprofileclassifieds.h1
-rw-r--r--indra/newview/llpanelprofilepicks.cpp23
-rw-r--r--indra/newview/llpanelprofilepicks.h6
-rw-r--r--indra/newview/llpanelteleporthistory.cpp13
-rw-r--r--indra/newview/llpanelvolume.cpp5
-rw-r--r--indra/newview/llpathfindingmanager.cpp4
-rw-r--r--indra/newview/llpathfindingmanager.h4
-rw-r--r--indra/newview/llpathfindingnavmesh.h2
-rw-r--r--indra/newview/llpathfindingnavmeshzone.h2
-rw-r--r--indra/newview/llpathfindingobject.h2
-rw-r--r--indra/newview/llpathfindingobjectlist.h2
-rw-r--r--indra/newview/llperfstats.cpp26
-rw-r--r--indra/newview/llphysicsshapebuilderutil.h3
-rw-r--r--indra/newview/llplacesinventorypanel.cpp10
-rw-r--r--indra/newview/llplacesinventorypanel.h7
-rw-r--r--indra/newview/llpreviewgesture.cpp3
-rw-r--r--indra/newview/llpreviewscript.cpp31
-rw-r--r--indra/newview/llpreviewtexture.cpp73
-rw-r--r--indra/newview/llpreviewtexture.h1
-rw-r--r--indra/newview/llprogressview.cpp10
-rw-r--r--indra/newview/llscrollingpanelparam.cpp63
-rw-r--r--indra/newview/llscrollingpanelparam.h3
-rw-r--r--indra/newview/llscrollingpanelparambase.cpp29
-rw-r--r--indra/newview/llscrollingpanelparambase.h7
-rw-r--r--indra/newview/llsculptidsize.cpp2
-rw-r--r--indra/newview/llsculptidsize.h2
-rw-r--r--indra/newview/llsearchableui.h2
-rw-r--r--indra/newview/llselectmgr.cpp22
-rw-r--r--indra/newview/llsetkeybinddialog.cpp2
-rw-r--r--indra/newview/llsidepanelappearance.cpp9
-rw-r--r--indra/newview/llsidepanelappearance.h2
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp18
-rw-r--r--indra/newview/lltexturectrl.cpp26
-rw-r--r--indra/newview/lltextureview.cpp5
-rw-r--r--indra/newview/lltoast.cpp2
-rw-r--r--indra/newview/lltoastimpanel.cpp2
-rw-r--r--indra/newview/lltoastnotifypanel.cpp4
-rw-r--r--indra/newview/lltoastscriptquestion.cpp2
-rw-r--r--indra/newview/lltoolbarview.cpp8
-rw-r--r--indra/newview/lltooldraganddrop.cpp74
-rw-r--r--indra/newview/lltoolmgr.cpp6
-rw-r--r--indra/newview/lluiavatar.h1
-rw-r--r--indra/newview/llvieweraudio.cpp2
-rw-r--r--indra/newview/llviewercontrol.cpp14
-rw-r--r--indra/newview/llviewerdisplay.cpp4
-rw-r--r--indra/newview/llviewerfloaterreg.cpp5
-rw-r--r--indra/newview/llviewerinventory.cpp15
-rw-r--r--indra/newview/llviewerinventory.h6
-rw-r--r--indra/newview/llviewerjoystick.cpp6
-rw-r--r--indra/newview/llviewermedia.h2
-rw-r--r--indra/newview/llviewermenu.cpp43
-rw-r--r--indra/newview/llviewermenufile.cpp4
-rw-r--r--indra/newview/llviewermenufile.h2
-rw-r--r--indra/newview/llviewermessage.cpp64
-rw-r--r--indra/newview/llviewerobject.cpp2
-rw-r--r--indra/newview/llviewerobjectlist.cpp1
-rw-r--r--indra/newview/llvieweroctree.cpp6
-rw-r--r--indra/newview/llvieweroctree.h20
-rw-r--r--indra/newview/llviewerparcelaskplay.cpp2
-rw-r--r--indra/newview/llviewerparcelmgr.cpp4
-rw-r--r--indra/newview/llviewershadermgr.cpp2
-rw-r--r--indra/newview/llviewertexteditor.cpp2
-rw-r--r--indra/newview/llviewertexture.cpp61
-rw-r--r--indra/newview/llviewertexture.h6
-rw-r--r--indra/newview/llviewertexturelist.cpp10
-rw-r--r--indra/newview/llviewerwindow.cpp34
-rw-r--r--indra/newview/llviewerwindow.h4
-rw-r--r--indra/newview/llvoavatar.cpp223
-rw-r--r--indra/newview/llvoavatar.h10
-rw-r--r--indra/newview/llvoavatarself.cpp13
-rw-r--r--indra/newview/llvoavatarself.h1
-rw-r--r--indra/newview/llvoicevisualizer.cpp2
-rw-r--r--indra/newview/llvoicevivox.cpp2
-rw-r--r--indra/newview/llvoicevivox.h14
-rw-r--r--indra/newview/llvovolume.cpp16
-rw-r--r--indra/newview/llwindowlistener.cpp2
-rwxr-xr-xindra/newview/llworldmapview.cpp2
-rw-r--r--indra/newview/llxmlrpclistener.cpp2
-rw-r--r--indra/newview/llxmlrpctransaction.cpp2
-rw-r--r--indra/newview/skins/default/xui/en/floater_camera.xml24
-rw-r--r--indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml99
-rw-r--r--indra/newview/skins/default/xui/en/floater_publish_classified.xml2
-rw-r--r--indra/newview/skins/default/xui/en/menu_gallery_inventory.xml6
-rwxr-xr-xindra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml94
-rw-r--r--indra/newview/skins/default/xui/en/menu_inventory.xml6
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_gear.xml138
-rw-r--r--indra/newview/skins/default/xui/en/menu_outfit_tab.xml37
-rw-r--r--indra/newview/skins/default/xui/en/menu_teleport_history_item.xml13
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml43
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml44
-rw-r--r--indra/newview/skins/default/xui/en/panel_settings_water.xml2
-rw-r--r--indra/newview/tests/llremoteparcelrequest_test.cpp4
-rw-r--r--indra/newview/tests/llviewerassetstats_test.cpp2
-rwxr-xr-xindra/newview/viewer_manifest.py14
194 files changed, 2681 insertions, 1221 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0630a353ed..6c2cfb3e6b 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -232,6 +232,7 @@ set(viewer_SOURCE_FILES
llfloaterimcontainer.cpp
llfloaterinspect.cpp
llfloaterinventorysettings.cpp
+ llfloaterinventorythumbnailshelper.cpp
llfloaterjoystick.cpp
llfloaterlagmeter.cpp
llfloaterland.cpp
@@ -884,6 +885,7 @@ set(viewer_HEADER_FILES
llfloaterimcontainer.h
llfloaterinspect.h
llfloaterinventorysettings.h
+ llfloaterinventorythumbnailshelper.h
llfloaterjoystick.h
llfloaterlagmeter.h
llfloaterland.h
@@ -1566,34 +1568,15 @@ endif (WINDOWS)
# Add the xui files. This is handy for searching for xui elements
# from within the IDE.
-set(viewer_XUI_FILES
- skins/default/colors.xml
- skins/default/default_languages.xml
- skins/default/textures/textures.xml
- )
-file(GLOB DEFAULT_XUI_FILE_GLOB_LIST
- ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/*.xml)
-list(APPEND viewer_XUI_FILES ${DEFAULT_XUI_FILE_GLOB_LIST})
-
-file(GLOB DEFAULT_WIDGET_FILE_GLOB_LIST
- ${CMAKE_CURRENT_SOURCE_DIR}/skins/*/xui/en/widgets/*.xml)
-list(APPEND viewer_XUI_FILES ${DEFAULT_WIDGET_FILE_GLOB_LIST})
-
-# Cannot append empty lists in CMake, wait until we have files here.
-#file(GLOB SILVER_WIDGET_FILE_GLOB_LIST
-# ${CMAKE_CURRENT_SOURCE_DIR}/skins/silver/xui/en-us/widgets/*.xml)
-#list(APPEND viewer_XUI_FILES ${SILVER_WIDGET_FILE_GLOB_LIST})
-
-list(SORT viewer_XUI_FILES)
-
-source_group("XUI Files" FILES ${viewer_XUI_FILES})
-
-set_source_files_properties(${viewer_XUI_FILES}
+file(GLOB_RECURSE viewer_XUI_FILES LIST_DIRECTORIES FALSE
+ ${CMAKE_CURRENT_SOURCE_DIR}/skins/*.xml)
+source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/skins PREFIX "XUI Files" FILES ${viewer_XUI_FILES})
+set_source_files_properties(${viewer_XUI_FILES}
PROPERTIES HEADER_FILE_ONLY TRUE)
-
list(APPEND viewer_SOURCE_FILES ${viewer_XUI_FILES})
-file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES TRUE
+# Add the shader sources
+file(GLOB_RECURSE viewer_SHADER_FILES LIST_DIRECTORIES FALSE
${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders/*.glsl)
source_group(TREE ${CMAKE_CURRENT_SOURCE_DIR}/app_settings/shaders PREFIX "Shaders" FILES ${viewer_SHADER_FILES})
set_source_files_properties(${viewer_SHADER_FILES}
@@ -1603,6 +1586,7 @@ list(APPEND viewer_SOURCE_FILES ${viewer_SHADER_FILES})
set(viewer_APPSETTINGS_FILES
app_settings/anim.ini
+ app_settings/autoreplace.xml
app_settings/cmd_line.xml
app_settings/commands.xml
app_settings/grass.xml
diff --git a/indra/newview/VIEWER_VERSION.txt b/indra/newview/VIEWER_VERSION.txt
index 14627a7c8c..2380dcfd47 100644
--- a/indra/newview/VIEWER_VERSION.txt
+++ b/indra/newview/VIEWER_VERSION.txt
@@ -1 +1 @@
-7.1.6
+7.1.7
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5997c59048..ed996e6832 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10346,6 +10346,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>NameTagDebugAVRezState</key>
+ <map>
+ <key>Comment</key>
+ <string>Show Avatar Rez state in name tag</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>RenderInitError</key>
<map>
<key>Comment</key>
@@ -10899,6 +10910,17 @@
<key>Value</key>
<integer>1</integer>
</map>
+ <key>RenderAvatarFriendsOnly</key>
+ <map>
+ <key>Comment</key>
+ <string>When enabled hides all avatars that aren't friends. Does not affect inworld control avatars (animeshes), nor self.</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <real>0</real>
+ </map>
<key>RenderAvatarComplexityMode</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
index 1a85d70256..6791fe44d9 100644
--- a/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
+++ b/indra/newview/app_settings/shaders/class1/deferred/screenSpaceReflUtil.glsl
@@ -27,11 +27,11 @@
float random (vec2 uv)
{
- return 0;
+ return 0.f;
}
float tapScreenSpaceReflection(int totalSamples, vec2 tc, vec3 viewPos, vec3 n, inout vec4 collectedColor, sampler2D source, float glossiness)
{
collectedColor = vec4(0);
- return 0;
+ return 0.f;
}
diff --git a/indra/newview/character/avatar_lad.xml b/indra/newview/character/avatar_lad.xml
index aef402d4db..2cdd86267e 100644
--- a/indra/newview/character/avatar_lad.xml
+++ b/indra/newview/character/avatar_lad.xml
@@ -2021,7 +2021,7 @@
value_min="-1"
value_max="1">
<param_skeleton>
-
+
<bone
name="mEyeLeft"
scale="0 0 0"
@@ -2031,8 +2031,9 @@
name="mEyeRight"
scale="0 0 0"
offset="-.005 0 0" />
-
- <bone
+
+
+<bone
name="mFaceEyeAltLeft"
scale="0 0 0"
offset="-.005 0 0" />
@@ -2041,7 +2042,7 @@
name="mFaceEyeAltRight"
scale="0 0 0"
offset="-.005 0 0" />
-
+
<bone
name="mFaceEyeLidLowerRight"
scale="0 0.3 0.7"
@@ -2052,7 +2053,7 @@
scale="0 0.3 0.7"
offset="0 0 0" />
- <bone
+ <bone
name="mFaceEyeLidUpperRight"
scale="0 0.3 0.7"
offset=" 0 0 0" />
@@ -2061,17 +2062,17 @@
name="mFaceEyeLidUpperLeft"
scale="0 0.3 0.7"
offset=" 0 0 0" />
-
+
<bone
name="mFaceEyecornerInnerLeft"
scale="0 0 0"
offset="-0.005 -0.008 0.0" />
-
+
<bone
name="mFaceEyecornerInnerRight"
scale="0 0 0"
offset="-0.005 0.008 0.0" />
-
+
</param_skeleton>
</param>
diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp
index fb0d3bd58c..e07375b0bd 100644
--- a/indra/newview/llagent.cpp
+++ b/indra/newview/llagent.cpp
@@ -95,7 +95,6 @@
#include "llworld.h"
#include "llworldmap.h"
#include "stringize.h"
-#include "boost/foreach.hpp"
#include "llcorehttputil.h"
#include "lluiusage.h"
@@ -1469,24 +1468,27 @@ void LLAgent::pitch(F32 angle)
LLVector3 skyward = getReferenceUpVector();
- // SL-19286 Avatar is upside down when viewed from below
- // after left-clicking the mouse on the avatar and dragging down
- //
- // The issue is observed on angle below 10 degrees
- bool isMouseLookOn = mControlFlags & AGENT_CONTROL_MOUSELOOK;
- const F32 look_down_limit = 179.f * DEG_TO_RAD;
- const F32 look_up_limit = (isMouseLookOn ? 1.f : 10.f) * DEG_TO_RAD;
-
- F32 angle_from_skyward = acos(mFrameAgent.getAtAxis() * skyward);
-
// clamp pitch to limits
- if ((angle >= 0.f) && (angle_from_skyward + angle > look_down_limit))
+ if (angle >= 0.f)
{
- angle = look_down_limit - angle_from_skyward;
+ 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)
+ {
+ angle = look_down_limit - angle_from_skyward;
+ }
}
- else if ((angle < 0.f) && (angle_from_skyward + angle < look_up_limit))
+ else if (angle < 0.f)
{
- angle = look_up_limit - angle_from_skyward;
+ 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;
+ }
}
if (fabs(angle) > 1e-4)
@@ -2330,7 +2332,7 @@ void LLAgent::endAnimationUpdateUI()
LLFloaterIMContainer* im_box = LLFloaterReg::getTypedInstance<LLFloaterIMContainer>("im_container");
LLFloaterIMContainer::floater_list_t conversations;
im_box->getDetachedConversationFloaters(conversations);
- BOOST_FOREACH(LLFloater* conversation, conversations)
+ for (LLFloater* conversation : conversations)
{
LL_INFOS() << "skip_list.insert(session_floater): " << conversation->getTitle() << LL_ENDL;
skip_list.insert(conversation);
@@ -3302,16 +3304,15 @@ void LLAgent::sendAnimationRequests(const std::vector<LLUUID> &anim_ids, EAnimRe
msg->addUUIDFast(_PREHASH_AgentID, getID());
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
- for (S32 i = 0; i < anim_ids.size(); i++)
+ for (const LLUUID& uuid : anim_ids)
{
- if (anim_ids[i].isNull())
+ if (uuid.notNull())
{
- continue;
+ msg->nextBlockFast(_PREHASH_AnimationList);
+ msg->addUUIDFast(_PREHASH_AnimID, uuid);
+ msg->addBOOLFast(_PREHASH_StartAnim, request == ANIM_REQUEST_START);
+ num_valid_anims++;
}
- msg->nextBlockFast(_PREHASH_AnimationList);
- msg->addUUIDFast(_PREHASH_AnimID, (anim_ids[i]) );
- msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false);
- num_valid_anims++;
}
msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
@@ -3336,8 +3337,8 @@ void LLAgent::sendAnimationRequest(const LLUUID &anim_id, EAnimRequest request)
msg->addUUIDFast(_PREHASH_SessionID, getSessionID());
msg->nextBlockFast(_PREHASH_AnimationList);
- msg->addUUIDFast(_PREHASH_AnimID, (anim_id) );
- msg->addBOOLFast(_PREHASH_StartAnim, (request == ANIM_REQUEST_START) ? true : false);
+ msg->addUUIDFast(_PREHASH_AnimID, anim_id);
+ msg->addBOOLFast(_PREHASH_StartAnim, request == ANIM_REQUEST_START);
msg->nextBlockFast(_PREHASH_PhysicalAvatarEventList);
msg->addBinaryDataFast(_PREHASH_TypeData, NULL, 0);
@@ -4334,6 +4335,10 @@ void LLAgent::teleportRequest(
// Landmark ID = LLUUID::null means teleport home
void LLAgent::teleportViaLandmark(const LLUUID& landmark_asset_id)
{
+ if (landmark_asset_id.isNull())
+ {
+ gAgentCamera.resetView();
+ }
mTeleportRequest = LLTeleportRequestPtr(new LLTeleportRequestViaLandmark(landmark_asset_id));
startTeleportRequest();
}
diff --git a/indra/newview/llagent.h b/indra/newview/llagent.h
index 1cdb2b5936..f076409eb2 100644
--- a/indra/newview/llagent.h
+++ b/indra/newview/llagent.h
@@ -61,7 +61,7 @@ class LLTeleportRequest;
-typedef boost::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
+typedef std::shared_ptr<LLTeleportRequest> LLTeleportRequestPtr;
//--------------------------------------------------------------------
// Types
@@ -131,7 +131,7 @@ public:
private:
bool mInitialized;
bool mFirstLogin;
- boost::shared_ptr<LLAgentListener> mListener;
+ std::shared_ptr<LLAgentListener> mListener;
//--------------------------------------------------------------------
// Session
diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp
index e6c988fe14..a8a4576d42 100644
--- a/indra/newview/llagentcamera.cpp
+++ b/indra/newview/llagentcamera.cpp
@@ -1778,7 +1778,7 @@ LLVector3d LLAgentCamera::calcCameraPositionTargetGlobal(bool *hit_limit)
head_offset.clearVec();
F32 fixup;
- if (gAgentAvatarp->hasPelvisFixup(fixup))
+ if (gAgentAvatarp->hasPelvisFixup(fixup) && !gAgentAvatarp->isSitting())
{
head_offset[VZ] -= fixup;
}
diff --git a/indra/newview/llaisapi.cpp b/indra/newview/llaisapi.cpp
index fc3851deb4..a78b2ffc6f 100644
--- a/indra/newview/llaisapi.cpp
+++ b/indra/newview/llaisapi.cpp
@@ -1738,10 +1738,6 @@ void AISUpdate::doUpdate()
LL_DEBUGS("Inventory") << "cat version update " << cat->getName() << " to version " << cat->getVersion() << LL_ENDL;
if (cat->getVersion() != version)
{
- LL_WARNS() << "Possible version mismatch for category " << cat->getName()
- << ", viewer version " << cat->getVersion()
- << " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL;
-
// the AIS version should be considered the true version. Adjust
// our local category model to reflect this version number. Otherwise
// it becomes possible to get stuck with the viewer being out of
@@ -1751,13 +1747,23 @@ void AISUpdate::doUpdate()
// is performed. This occasionally gets out of sync however.
if (version != LLViewerInventoryCategory::VERSION_UNKNOWN)
{
+ LL_WARNS() << "Possible version mismatch for category " << cat->getName()
+ << ", viewer version " << cat->getVersion()
+ << " AIS version " << version << " !!!Adjusting local version!!!" << LL_ENDL;
cat->setVersion(version);
}
else
{
// We do not account for update if version is UNKNOWN, so we shouldn't rise version
// either or viewer will get stuck on descendants count -1, try to refetch folder instead
- cat->fetch();
+ //
+ // Todo: proper backoff?
+
+ LL_WARNS() << "Possible version mismatch for category " << cat->getName()
+ << ", viewer version " << cat->getVersion()
+ << " AIS version " << version << " !!!Rerequesting category!!!" << LL_ENDL;
+ const S32 LONG_EXPIRY = 360;
+ cat->fetch(LONG_EXPIRY);
}
}
}
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 4ad56b22b8..488709cfa1 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -27,7 +27,6 @@
#include "llviewerprecompiledheaders.h"
#include <boost/lexical_cast.hpp>
-#include <boost/foreach.hpp>
#include "llaccordionctrltab.h"
#include "llagent.h"
#include "llagentcamera.h"
@@ -1647,7 +1646,7 @@ void LLAppearanceMgr::removeOutfitPhoto(const LLUUID& outfit_id)
sub_cat_array,
outfit_item_array,
LLInventoryModel::EXCLUDE_TRASH);
- BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+ for (LLViewerInventoryItem* outfit_item : outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
if (linked_item != NULL)
@@ -3438,7 +3437,7 @@ void update_base_outfit_after_ordering()
sub_cat_array,
outfit_item_array,
LLInventoryModel::EXCLUDE_TRASH);
- BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+ for (LLViewerInventoryItem* outfit_item : outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
if (linked_item != NULL)
@@ -3742,7 +3741,7 @@ LLSD LLAppearanceMgr::dumpCOF() const
LLUUID linked_asset_id(linked_item->getAssetUUID());
md5.update((unsigned char*)linked_asset_id.mData, 16);
U32 flags = linked_item->getFlags();
- md5.update(boost::lexical_cast<std::string>(flags));
+ md5.update(std::to_string(flags));
}
else if (LLAssetType::AT_LINK_FOLDER != inv_item->getActualType())
{
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 0fdb8b7742..56521895c1 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -143,7 +143,6 @@
// Third party library includes
#include <boost/bind.hpp>
-#include <boost/foreach.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/regex.hpp>
#include <boost/throw_exception.hpp>
@@ -1206,7 +1205,7 @@ bool LLAppViewer::init()
LLSD item(LeapCommand);
LeapCommand.append(item);
}
- BOOST_FOREACH(const std::string& leap, llsd::inArray(LeapCommand))
+ for (const auto& leap : llsd::inArray(LeapCommand))
{
LL_INFOS("InitInfo") << "processing --leap \"" << leap << '"' << LL_ENDL;
// We don't have any better description of this plugin than the
@@ -1711,7 +1710,7 @@ bool LLAppViewer::cleanup()
LLNotifications::instance().clear();
// workaround for DEV-35406 crash on shutdown
- LLEventPumps::instance().reset();
+ LLEventPumps::instance().reset(true);
//dump scene loading monitor results
if (LLSceneMonitor::instanceExists())
@@ -2369,7 +2368,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
LL_ERRS() << "Invalid settings location list" << LL_ENDL;
}
- BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
+ for (const SettingsGroup& group : mSettingsLocationList->groups)
{
// skip settings groups that aren't the one we requested
if (group.name() != location_key) continue;
@@ -2381,7 +2380,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
return false;
}
- BOOST_FOREACH(const SettingsFile& file, group.files)
+ for (const SettingsFile& file : group.files)
{
LL_INFOS("Settings") << "Attempting to load settings for the group " << file.name()
<< " - from location " << location_key << LL_ENDL;
@@ -2446,11 +2445,11 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
std::string LLAppViewer::getSettingsFilename(const std::string& location_key,
const std::string& file)
{
- BOOST_FOREACH(const SettingsGroup& group, mSettingsLocationList->groups)
+ for (const SettingsGroup& group : mSettingsLocationList->groups)
{
if (group.name() == location_key)
{
- BOOST_FOREACH(const SettingsFile& settings_file, group.files)
+ for (const SettingsFile& settings_file : group.files)
{
if (settings_file.name() == file)
{
@@ -2996,7 +2995,7 @@ void LLAppViewer::initStrings()
{
std::string strings_file = "strings.xml";
std::string strings_path_full = gDirUtilp->findSkinnedFilenameBaseLang(LLDir::XUI, strings_file);
- if (strings_path_full.empty() || !gDirUtilp->fileExists(strings_path_full))
+ if (strings_path_full.empty() || !LLFile::isfile(strings_path_full))
{
if (strings_path_full.empty())
{
@@ -3036,7 +3035,7 @@ void LLAppViewer::initStrings()
// Now that we've set "[sourceid]", have to go back through
// default_trans_args and reinitialize all those other keys because some
// of them, in turn, reference "[sourceid]".
- BOOST_FOREACH(std::string key, default_trans_args)
+ for (const std::string& key : default_trans_args)
{
std::string brackets(key), nobrackets(key);
// Invalid to inspect key[0] if key is empty(). But then, the entire
@@ -4197,7 +4196,7 @@ U32 LLAppViewer::getObjectCacheVersion()
bool LLAppViewer::initCache()
{
mPurgeCache = false;
- bool read_only = mSecondInstance ? true : false;
+ bool read_only = mSecondInstance;
LLAppViewer::getTextureCache()->setReadOnly(read_only) ;
LLVOCache::initParamSingleton(read_only);
@@ -4222,7 +4221,7 @@ bool LLAppViewer::initCache()
if (gSavedSettings.getS32("LocalCacheVersion") != LLAppViewer::getTextureCacheVersion())
{
texture_cache_mismatch = true;
- if(!read_only)
+ if (!read_only)
{
gSavedSettings.setS32("LocalCacheVersion", LLAppViewer::getTextureCacheVersion());
@@ -4231,7 +4230,7 @@ bool LLAppViewer::initCache()
}
}
- if(!read_only)
+ if (!read_only)
{
// Purge cache if user requested it
if (gSavedSettings.getBOOL("PurgeCacheOnStartup") ||
@@ -4701,16 +4700,23 @@ void LLAppViewer::idle()
// When appropriate, update agent location to the simulator.
F32 agent_update_time = agent_update_timer.getElapsedTimeF32();
F32 agent_force_update_time = mLastAgentForceUpdate + agent_update_time;
- bool force_update = gAgent.controlFlagsDirty()
- || (mLastAgentControlFlags != gAgent.getControlFlags())
- || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
- if (force_update || (agent_update_time > (1.0f / (F32) AGENT_UPDATES_PER_SECOND)))
+ bool timed_out = agent_update_time > (1.0f / (F32)AGENT_UPDATES_PER_SECOND);
+ bool force_send =
+ // if there is something to send
+ (gAgent.controlFlagsDirty() && timed_out)
+ // if something changed
+ || (mLastAgentControlFlags != gAgent.getControlFlags())
+ // keep alive
+ || (agent_force_update_time > (1.0f / (F32) AGENT_FORCE_UPDATES_PER_SECOND));
+ // timing out doesn't warranty that an update will be sent,
+ // just that it will be checked.
+ if (force_send || timed_out)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_NETWORK;
// Send avatar and camera info
mLastAgentControlFlags = gAgent.getControlFlags();
- mLastAgentForceUpdate = force_update ? 0 : agent_force_update_time;
- send_agent_update(force_update);
+ mLastAgentForceUpdate = force_send ? 0 : agent_force_update_time;
+ send_agent_update(force_send);
agent_update_timer.reset();
}
}
diff --git a/indra/newview/llavatarlist.cpp b/indra/newview/llavatarlist.cpp
index 1550872d81..087c25bcad 100644
--- a/indra/newview/llavatarlist.cpp
+++ b/indra/newview/llavatarlist.cpp
@@ -502,7 +502,7 @@ bool LLAvatarList::handleHover(S32 x, S32 y, MASK mask)
void LLAvatarList::setVisible(bool visible)
{
- if ( visible == false && mContextMenu )
+ if (!visible && mContextMenu )
{
mContextMenu->hide();
}
diff --git a/indra/newview/llblocklist.cpp b/indra/newview/llblocklist.cpp
index 16db32862d..29be2aaa6d 100644
--- a/indra/newview/llblocklist.cpp
+++ b/indra/newview/llblocklist.cpp
@@ -61,9 +61,8 @@ LLBlockList::LLBlockList(const Params& p)
LLToggleableMenu* context_menu = LLUICtrlFactory::getInstance()->createFromFile<LLToggleableMenu>(
"menu_people_blocked_gear.xml",
gMenuHolder,
- LLViewerMenuHolderGL::child_registry_t::instance(),
- true);
- if (context_menu)
+ LLViewerMenuHolderGL::child_registry_t::instance());
+ if(context_menu)
{
mContextMenu = context_menu->getHandle();
}
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 0c365d33c4..7d9fa2a475 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -131,7 +131,7 @@ public:
static LLChatHistoryHeader* createInstance(const std::string& file_name)
{
LLChatHistoryHeader* pInstance = new LLChatHistoryHeader;
- pInstance->buildFromFile(file_name, true);
+ pInstance->buildFromFile(file_name);
return pInstance;
}
@@ -587,7 +587,7 @@ public:
mUserNameTextBox = getChild<LLTextBox>("user_name");
mTimeBoxTextBox = getChild<LLTextBox>("time_box");
- mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance(), true);
+ mInfoCtrl = LLUICtrlFactory::getInstance()->createFromFile<LLUICtrl>("inspector_info_ctrl.xml", this, LLPanel::child_registry_t::instance());
if (mInfoCtrl)
{
mInfoCtrl->setCommitCallback(boost::bind(&LLChatHistoryHeader::onClickInfoCtrl, mInfoCtrl));
@@ -1181,7 +1181,7 @@ void LLChatHistory::initFromParams(const LLChatHistory::Params& p)
LLView* LLChatHistory::getSeparator()
{
- LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance(), true);
+ LLPanel* separator = LLUICtrlFactory::getInstance()->createFromFile<LLPanel>(mMessageSeparatorFilename, NULL, LLPanel::child_registry_t::instance());
return separator;
}
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index 57446bb7a0..354a596e46 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -342,20 +342,19 @@ bool LLFloaterIMNearbyChatToastPanel::handleMouseUp (S32 x, S32 y, MASK mask)
S32 local_x = x - mMsgText->getRect().mLeft;
S32 local_y = y - mMsgText->getRect().mBottom;
-
+
//if text_box process mouse up (ussually this is click on url) - we didn't show nearby_chat.
- if (mMsgText->pointInView(local_x, local_y) )
+ if (mMsgText->pointInView(local_x, local_y))
{
- if (mMsgText->handleMouseUp(local_x,local_y,mask) == true)
+ if (mMsgText->handleMouseUp(local_x, local_y, mask))
return true;
- else
- {
- LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
- return false;
- }
+
+ LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
+ return false;
}
+
LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat")->showHistory();
- return LLPanel::handleMouseUp(x,y,mask);
+ return LLPanel::handleMouseUp(x, y, mask);
}
void LLFloaterIMNearbyChatToastPanel::setHeaderVisibility(EShowItemHeader e)
diff --git a/indra/newview/llchiclet.cpp b/indra/newview/llchiclet.cpp
index 6e5df103f9..ad542e84cc 100644
--- a/indra/newview/llchiclet.cpp
+++ b/indra/newview/llchiclet.cpp
@@ -177,6 +177,11 @@ LLNotificationChiclet::LLNotificationChiclet(const Params& p)
LLFloaterNotificationsTabbed::getInstance()->setSysWellChiclet(this);
}
+LLNotificationChiclet::~LLNotificationChiclet()
+{
+ mNotificationChannel.reset();
+}
+
void LLNotificationChiclet::onMenuItemClicked(const LLSD& user_data)
{
std::string action = user_data.asString();
diff --git a/indra/newview/llchiclet.h b/indra/newview/llchiclet.h
index 08f8ef66b8..75831adf62 100644
--- a/indra/newview/llchiclet.h
+++ b/indra/newview/llchiclet.h
@@ -531,8 +531,9 @@ public:
struct Params : public LLInitParam::Block<Params, LLSysWellChiclet::Params>{};
protected:
- struct ChicletNotificationChannel : public LLNotificationChannel
+ class ChicletNotificationChannel : public LLNotificationChannel
{
+ public:
ChicletNotificationChannel(LLNotificationChiclet* chiclet)
: LLNotificationChannel(LLNotificationChannel::Params().filter(filterNotification).name(chiclet->getSessionId().asString()))
, mChiclet(chiclet)
@@ -542,6 +543,7 @@ protected:
connectToChannel("Offer");
connectToChannel("Notifications");
}
+ virtual ~ChicletNotificationChannel() {}
static bool filterNotification(LLNotificationPtr notify);
// connect counter updaters to the corresponding signals
@@ -553,9 +555,10 @@ protected:
};
boost::scoped_ptr<ChicletNotificationChannel> mNotificationChannel;
-
- LLNotificationChiclet(const Params& p);
-
+
+ LLNotificationChiclet(const Params& p);
+ ~LLNotificationChiclet();
+
/**
* Processes clicks on chiclet menu.
*/
diff --git a/indra/newview/llcommandlineparser.cpp b/indra/newview/llcommandlineparser.cpp
index 030d24bed8..bc61fac00b 100644
--- a/indra/newview/llcommandlineparser.cpp
+++ b/indra/newview/llcommandlineparser.cpp
@@ -657,11 +657,12 @@ void LLControlGroupCLP::configure(const std::string& config_filename, LLControlG
// This method reads the llsd based config file, and uses it to set
// members of a control group.
LLSD clpConfigLLSD;
+
+ llifstream input_stream;
+ input_stream.open(config_filename.c_str(), std::ios::in | std::ios::binary);
- std::string xml = gDirUtilp->getFileContents(config_filename);
- if (!xml.empty())
+ if(input_stream.is_open())
{
- std::stringstream input_stream(xml);
LLSDSerialize::fromXML(clpConfigLLSD, input_stream);
for(LLSD::map_iterator option_itr = clpConfigLLSD.beginMap();
option_itr != clpConfigLLSD.endMap();
diff --git a/indra/newview/llcompilequeue.cpp b/indra/newview/llcompilequeue.cpp
index 5fcdbe4ffe..19b2ce77c5 100644
--- a/indra/newview/llcompilequeue.cpp
+++ b/indra/newview/llcompilequeue.cpp
@@ -73,7 +73,7 @@ namespace
class ObjectInventoryFetcher: public LLVOInventoryListener
{
public:
- typedef boost::shared_ptr<ObjectInventoryFetcher> ptr_t;
+ typedef std::shared_ptr<ObjectInventoryFetcher> ptr_t;
ObjectInventoryFetcher(LLEventPump &pump, LLViewerObject* object, void* user_data) :
mPump(pump),
diff --git a/indra/newview/llcontrolavatar.h b/indra/newview/llcontrolavatar.h
index 7beefad191..fd1cda7a2c 100644
--- a/indra/newview/llcontrolavatar.h
+++ b/indra/newview/llcontrolavatar.h
@@ -85,6 +85,7 @@ public:
virtual bool shouldRenderRigged() const;
virtual bool isImpostor();
+ virtual bool isBuddy() const { return false; }
bool mPlaying;
diff --git a/indra/newview/llconversationlog.cpp b/indra/newview/llconversationlog.cpp
index 17ef56612c..e4d2c8f39a 100644
--- a/indra/newview/llconversationlog.cpp
+++ b/indra/newview/llconversationlog.cpp
@@ -32,7 +32,6 @@
#include "llnotificationsutil.h"
#include "lltrans.h"
-#include <boost/foreach.hpp>
#include "boost/lexical_cast.hpp"
const S32Days CONVERSATION_LIFETIME = (S32Days)30; // lifetime of LLConversation is 30 days by spec
@@ -392,7 +391,7 @@ void LLConversationLog::deleteBackupLogs()
std::vector<std::string> backup_logs;
getListOfBackupLogs(backup_logs);
- BOOST_FOREACH(const std::string& fullpath, backup_logs)
+ for (const std::string& fullpath : backup_logs)
{
LLFile::remove(fullpath);
}
@@ -434,7 +433,7 @@ bool LLConversationLog::moveLog(const std::string &originDirectory, const std::s
while(LLFile::isfile(backupFileName))
{
++backupFileCount;
- backupFileName = targetDirectory + ".backup" + boost::lexical_cast<std::string>(backupFileCount);
+ backupFileName = targetDirectory + ".backup" + std::to_string(backupFileCount);
}
//Rename the file to its backup name so it is not overwritten
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index e4ae60b49e..44d4c863c7 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -37,8 +37,6 @@
#include "llimview.h" //For LLIMModel
#include "lltrans.h"
-#include <boost/foreach.hpp>
-
//
// Conversation items : common behaviors
//
@@ -300,8 +298,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic
// In the case of a P2P conversation, we need to grab the name of the other participant in the session instance itself
// as we do not create participants for such a session.
- LLFolderViewModelItem * itemp;
- BOOST_FOREACH(itemp, mChildren)
+ for (auto itemp : mChildren)
{
LLConversationItem* current_participant = dynamic_cast<LLConversationItem*>(itemp);
// Add the avatar uuid to the list (except if it's the own agent uuid)
diff --git a/indra/newview/lldirpicker.cpp b/indra/newview/lldirpicker.cpp
index ce7f7eb938..4306185f0a 100644
--- a/indra/newview/lldirpicker.cpp
+++ b/indra/newview/lldirpicker.cpp
@@ -91,20 +91,19 @@ void LLDirPicker::reset()
bool LLDirPicker::getDir(std::string* filename, bool blocking)
{
- if( mLocked )
+ if (mLocked)
{
return false;
}
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
bool success = false;
-
if (blocking)
{
// Modal, so pause agent
@@ -236,7 +235,7 @@ bool LLDirPicker::getDir(std::string* filename, bool blocking)
reset();
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 8189948f55..99494c96b8 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -832,7 +832,7 @@ bool LLDrawable::updateMoveDamped()
mVObjp->updateText();
}
- bool done_moving = (dist_squared == 0.0f) ? true : false;
+ bool done_moving = dist_squared == 0.0f;
if (done_moving)
{
diff --git a/indra/newview/lldrawable.h b/indra/newview/lldrawable.h
index e5b2471903..78bcc5d5f4 100644
--- a/indra/newview/lldrawable.h
+++ b/indra/newview/lldrawable.h
@@ -162,20 +162,20 @@ public:
virtual bool updateMove();
virtual void movePartition();
-
+
void updateTexture();
void updateMaterial();
virtual void updateDistance(LLCamera& camera, bool force_update);
bool updateGeometry();
void updateFaceSize(S32 idx);
-
+
void updateSpecialHoverCursor(bool enabled);
virtual void shiftPos(const LLVector4a &shift_vector);
S32 getGeneration() const { return mGeneration; }
- bool getLit() const { return isState(UNLIT) ? false : true; }
+ bool getLit() const { return !isState(UNLIT); }
void setLit(bool lit) { lit ? clearState(UNLIT) : setState(UNLIT); }
bool isVisible() const;
diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp
index 32f0e185ce..72e6945679 100644
--- a/indra/newview/lldrawpoolavatar.cpp
+++ b/indra/newview/lldrawpoolavatar.cpp
@@ -370,6 +370,15 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)
return;
}
+ static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);
+ if (friends_only()
+ && !avatarp->isControlAvatar()
+ && !avatarp->isSelf()
+ && !avatarp->isBuddy())
+ {
+ return;
+ }
+
LLVOAvatar::AvatarOverallAppearance oa = avatarp->getOverallAppearance();
bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor();
// no shadows if the shadows are causing this avatar to breach the limit.
@@ -723,6 +732,17 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)
return;
}
+ static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);
+ if (!single_avatar
+ && friends_only()
+ && !avatarp->isUIAvatar()
+ && !avatarp->isControlAvatar()
+ && !avatarp->isSelf()
+ && !avatarp->isBuddy())
+ {
+ return;
+ }
+
bool impostor = !LLPipeline::sImpostorRender && avatarp->isImpostor() && !single_avatar;
if (( avatarp->isInMuteList()
diff --git a/indra/newview/llexternaleditor.cpp b/indra/newview/llexternaleditor.cpp
index 5afd3c7c98..717d36d5e5 100644
--- a/indra/newview/llexternaleditor.cpp
+++ b/indra/newview/llexternaleditor.cpp
@@ -32,7 +32,6 @@
#include "llprocess.h"
#include "llsdutil.h"
#include "llstring.h"
-#include <boost/foreach.hpp>
// static
const std::string LLExternalEditor::sFilenameMarker = "%s";
@@ -93,7 +92,7 @@ LLExternalEditor::EErrorCode LLExternalEditor::run(const std::string& file_path)
params.executable = mProcessParams.executable;
// Substitute the filename marker in the command with the actual passed file name.
- BOOST_FOREACH(const std::string& arg, mProcessParams.args)
+ for (const std::string& arg : mProcessParams.args)
{
std::string fixed(arg);
LLStringUtil::replaceString(fixed, sFilenameMarker, file_path);
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index d8476d39c5..b5018abc64 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -117,14 +117,14 @@ public:
U32 getState() const { return mState; }
void setState(U32 state) { mState |= state; }
void clearState(U32 state) { mState &= ~state; }
- bool isState(U32 state) const { return ((mState & state) != 0) ? true : false; }
+ bool isState(U32 state) const { return (mState & state) != 0; }
void setVirtualSize(F32 size) { mVSize = size; }
void setPixelArea(F32 area) { mPixelArea = area; }
F32 getVirtualSize() const { return mVSize; }
F32 getPixelArea() const { return mPixelArea; }
- S32 getIndexInTex(U32 ch) const {llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); return mIndexInTex[ch];}
- void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index ;}
+ S32 getIndexInTex(U32 ch) const { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); return mIndexInTex[ch]; }
+ void setIndexInTex(U32 ch, S32 index) { llassert(ch < LLRender::NUM_TEXTURE_CHANNELS); mIndexInTex[ch] = index; }
void setWorldMatrix(const LLMatrix4& mat);
const LLTextureEntry* getTextureEntry() const { return mVObjp->getTE(mTEOffset); }
diff --git a/indra/newview/llfavoritesbar.cpp b/indra/newview/llfavoritesbar.cpp
index a46cc0ce30..727f5592cd 100644
--- a/indra/newview/llfavoritesbar.cpp
+++ b/indra/newview/llfavoritesbar.cpp
@@ -886,11 +886,10 @@ const LLButton::Params& LLFavoritesBarCtrl::getButtonParams()
if (!params_initialized)
{
LLXMLNodePtr button_xml_node;
- static const std::string filename("favorites_bar_button.xml");
- if (LLUICtrlFactory::getLayeredXMLNode(filename, button_xml_node, LLDir::CURRENT_SKIN, true))
+ if(LLUICtrlFactory::getLayeredXMLNode("favorites_bar_button.xml", button_xml_node))
{
LLXUIParser parser;
- parser.readXUI(button_xml_node, button_params, filename);
+ parser.readXUI(button_xml_node, button_params, "favorites_bar_button.xml");
}
params_initialized = true;
}
diff --git a/indra/newview/llfilepicker.cpp b/indra/newview/llfilepicker.cpp
index 3d202cc731..f1e11cf75a 100644
--- a/indra/newview/llfilepicker.cpp
+++ b/indra/newview/llfilepicker.cpp
@@ -245,14 +245,14 @@ bool LLFilePicker::setupFilter(ELoadFilter filter)
bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
{
- if( mLocked )
+ if (mLocked)
{
return false;
}
bool success = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -312,7 +312,7 @@ bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
bool success = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -398,7 +398,7 @@ bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename,
bool success = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -688,18 +688,18 @@ std::unique_ptr<std::vector<std::string>> LLFilePicker::navOpenFilterProc(ELoadF
return allowedv;
}
-bool LLFilePicker::doNavChooseDialog(ELoadFilter filter)
+bool LLFilePicker::doNavChooseDialog(ELoadFilter filter)
{
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
-
+
gViewerWindow->getWindow()->beforeDialog();
-
+
std::unique_ptr<std::vector<std::string>> allowed_types = navOpenFilterProc(filter);
-
+
std::unique_ptr<std::vector<std::string>> filev = doLoadDialog(allowed_types.get(),
mPickOptions);
@@ -711,27 +711,27 @@ bool LLFilePicker::doNavChooseDialog(ELoadFilter filter)
mFiles.insert(mFiles.end(), filev->begin(), filev->end());
return true;
}
-
+
return false;
}
-bool LLFilePicker::doNavChooseDialogModeless(ELoadFilter filter,
+bool LLFilePicker::doNavChooseDialogModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &,void*),
void *userdata)
{
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
-
+
std::unique_ptr<std::vector<std::string>> allowed_types=navOpenFilterProc(filter);
-
+
doLoadDialogModeless(allowed_types.get(),
mPickOptions,
callback,
userdata);
-
+
return true;
}
@@ -819,16 +819,16 @@ void set_nav_save_data(LLFilePicker::ESaveFilter filter, std::string &extension,
}
}
-bool LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filename)
+bool LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filename)
{
// Setup the type, creator, and extension
std::string extension, type, creator;
-
+
set_nav_save_data(filter, extension, type, creator);
-
+
std::string namestring = filename;
if (namestring.empty()) namestring="Untitled";
-
+
gViewerWindow->getWindow()->beforeDialog();
// Run the dialog
@@ -845,20 +845,20 @@ bool LLFilePicker::doNavSaveDialog(ESaveFilter filter, const std::string& filena
mFiles.push_back(*filev);
return true;
}
-
+
return false;
}
-bool LLFilePicker::doNavSaveDialogModeless(ESaveFilter filter,
+bool LLFilePicker::doNavSaveDialogModeless(ESaveFilter filter,
const std::string& filename,
void (*callback)(bool, std::string&, void*),
void *userdata)
{
// Setup the type, creator, and extension
std::string extension, type, creator;
-
+
set_nav_save_data(filter, extension, type, creator);
-
+
std::string namestring = filename;
if (namestring.empty()) namestring="Untitled";
@@ -881,19 +881,18 @@ bool LLFilePicker::getOpenFile(ELoadFilter filter, bool blocking)
bool success = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
mPickOptions &= ~F_MULTIPLE;
mPickOptions |= F_FILE;
-
+
if (filter == FFLOAD_DIRECTORY) //This should only be called from lldirpicker.
{
-
mPickOptions |= ( F_NAV_SUPPORT | F_DIRECTORY );
mPickOptions &= ~F_FILE;
}
@@ -933,11 +932,11 @@ bool LLFilePicker::getOpenFileModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata)
{
- if( mLocked )
+ if (mLocked)
return false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -964,19 +963,19 @@ bool LLFilePicker::getOpenFileModeless(ELoadFilter filter,
bool LLFilePicker::getMultipleOpenFiles(ELoadFilter filter, bool blocking)
{
- if( mLocked )
+ if (mLocked)
return false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
-
+
bool success = false;
reset();
-
+
mPickOptions |= F_FILE;
mPickOptions |= F_MULTIPLE;
@@ -1012,17 +1011,17 @@ bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
void (*callback)(bool, std::vector<std::string> &, void*),
void *userdata )
{
- if( mLocked )
+ if (mLocked)
return false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
mPickOptions |= F_FILE;
mPickOptions |= F_MULTIPLE;
@@ -1033,18 +1032,19 @@ bool LLFilePicker::getMultipleOpenFilesModeless(ELoadFilter filter,
bool LLFilePicker::getSaveFile(ESaveFilter filter, const std::string& filename, bool blocking)
{
- if( mLocked )
+ if (mLocked)
return false;
+
bool success = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
mPickOptions &= ~F_MULTIPLE;
if (blocking)
@@ -1076,17 +1076,17 @@ bool LLFilePicker::getSaveFileModeless(ESaveFilter filter,
void (*callback)(bool, std::string&, void*),
void *userdata)
{
- if( mLocked )
+ if (mLocked)
return false;
-
+
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
mPickOptions &= ~F_MULTIPLE;
return doNavSaveDialogModeless(filter, filename, callback, userdata);
@@ -1365,7 +1365,7 @@ bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
bool rtn = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -1373,7 +1373,7 @@ bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
gViewerWindow->getWindow()->beforeDialog();
reset();
-
+
GtkWindow* picker = buildFilePicker(true, false, "savefile");
if (picker)
@@ -1441,7 +1441,7 @@ bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
default:;
break;
}
-
+
gtk_window_set_title(GTK_WINDOW(picker), caption.c_str());
if (filename.empty())
@@ -1482,7 +1482,7 @@ bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
bool rtn = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -1490,7 +1490,7 @@ bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
gViewerWindow->getWindow()->beforeDialog();
reset();
-
+
GtkWindow* picker = buildFilePicker(false, false, "openfile");
if (picker)
@@ -1547,7 +1547,7 @@ bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
bool rtn = false;
// if local file browsing is turned off, return without opening dialog
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
@@ -1584,13 +1584,13 @@ bool LLFilePicker::getSaveFile( ESaveFilter filter, const std::string& filename,
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
LL_INFOS() << "getSaveFile suggested filename is [" << filename
<< "]" << LL_ENDL;
if (!filename.empty())
@@ -1614,13 +1614,13 @@ bool LLFilePicker::getOpenFile( ELoadFilter filter, bool blocking )
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
reset();
-
+
// HACK: Static filenames for 'open' until we implement filepicker
std::string filename = gDirUtilp->getLindenUserDir() + gDirUtilp->getDirDelimiter() + "upload";
switch (filter)
@@ -1647,7 +1647,7 @@ bool LLFilePicker::getMultipleOpenFiles( ELoadFilter filter, bool blocking)
{
// if local file browsing is turned off, return without opening dialog
// (Even though this is a stub, I think we still should not return anything at all)
- if ( check_local_file_access_enabled() == false )
+ if (!check_local_file_access_enabled())
{
return false;
}
diff --git a/indra/newview/llflexibleobject.cpp b/indra/newview/llflexibleobject.cpp
index c619c19493..74298c2b3d 100644
--- a/indra/newview/llflexibleobject.cpp
+++ b/indra/newview/llflexibleobject.cpp
@@ -433,7 +433,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
LLPath *path = &volume->getPath();
if ((mSimulateRes == 0 || !mInitialized) && mVO->mDrawable->isVisible())
{
- bool force_update = mSimulateRes == 0 ? true : false;
+ bool force_update = mSimulateRes == 0;
doIdleUpdate();
if (!force_update || !gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_FLEXIBLE))
@@ -442,10 +442,10 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
}
}
- if(!mInitialized || !mAttributes)
+ if (!mInitialized || !mAttributes)
{
//the object is not visible
- return ;
+ return;
}
// Fix for MAINT-1894
@@ -456,7 +456,7 @@ void LLVolumeImplFlexible::doFlexibleUpdate()
{
return;
}
-
+
S32 num_sections = 1 << mSimulateRes;
F32 secondsThisFrame = mTimer.getElapsedTimeAndResetF32();
diff --git a/indra/newview/llfloater360capture.cpp b/indra/newview/llfloater360capture.cpp
index d5efc15e35..527ed62fc7 100644
--- a/indra/newview/llfloater360capture.cpp
+++ b/indra/newview/llfloater360capture.cpp
@@ -811,7 +811,7 @@ void LLFloater360Capture::freezeWorld(bool enable)
{
// restart the clouds moving if they were not paused before
// we starting using the 360 capture floater
- if (clouds_scroll_paused == false)
+ if (!clouds_scroll_paused)
{
LLEnvironment::instance().resumeCloudScroll();
}
diff --git a/indra/newview/llfloatercamera.cpp b/indra/newview/llfloatercamera.cpp
index 2d373dfa5d..dde4b6ff0e 100644
--- a/indra/newview/llfloatercamera.cpp
+++ b/indra/newview/llfloatercamera.cpp
@@ -44,6 +44,7 @@
#include "llfirstuse.h"
#include "llhints.h"
#include "lltabcontainer.h"
+#include "llviewercamera.h"
#include "llvoavatarself.h"
static LLDefaultChildRegistry::Register<LLPanelCameraItem> r("panel_camera_item");
@@ -65,13 +66,19 @@ class LLPanelCameraZoom
: public LLPanel
{
LOG_CLASS(LLPanelCameraZoom);
+
public:
- LLPanelCameraZoom();
+ struct Params : public LLInitParam::Block<Params, LLPanel::Params> {};
+
+ LLPanelCameraZoom() { onCreate(); }
/* virtual */ bool postBuild();
/* virtual */ void draw();
protected:
+ LLPanelCameraZoom(const Params& p) { onCreate(); }
+
+ void onCreate();
void onZoomPlusHeldDown();
void onZoomMinusHeldDown();
void onSliderValueChanged();
@@ -80,9 +87,11 @@ protected:
F32 getOrbitRate(F32 time);
private:
- LLButton* mPlusBtn;
- LLButton* mMinusBtn;
- LLSlider* mSlider;
+ LLButton* mPlusBtn { nullptr };
+ LLButton* mMinusBtn{ nullptr };
+ LLSlider* mSlider{ nullptr };
+
+ friend class LLUICtrlFactory;
};
LLPanelCameraItem::Params::Params()
@@ -158,10 +167,7 @@ static LLPanelInjector<LLPanelCameraZoom> t_camera_zoom_panel("camera_zoom_panel
// LLPanelCameraZoom
//-------------------------------------------------------------------------------
-LLPanelCameraZoom::LLPanelCameraZoom()
-: mPlusBtn( NULL ),
- mMinusBtn( NULL ),
- mSlider( NULL )
+void LLPanelCameraZoom::onCreate()
{
mCommitCallbackRegistrar.add("Zoom.minus", boost::bind(&LLPanelCameraZoom::onZoomMinusHeldDown, this));
mCommitCallbackRegistrar.add("Zoom.plus", boost::bind(&LLPanelCameraZoom::onZoomPlusHeldDown, this));
@@ -172,9 +178,9 @@ LLPanelCameraZoom::LLPanelCameraZoom()
bool LLPanelCameraZoom::postBuild()
{
- mPlusBtn = getChild <LLButton> ("zoom_plus_btn");
- mMinusBtn = getChild <LLButton> ("zoom_minus_btn");
- mSlider = getChild <LLSlider> ("zoom_slider");
+ mPlusBtn = getChild<LLButton>("zoom_plus_btn");
+ mMinusBtn = getChild<LLButton>("zoom_minus_btn");
+ mSlider = getChild<LLSlider>("zoom_slider");
return LLPanel::postBuild();
}
@@ -240,11 +246,80 @@ void activate_camera_tool()
LLToolMgr::getInstance()->setTransientTool(LLToolCamera::getInstance());
};
+class LLCameraInfoPanel : public LLPanel
+{
+public:
+ typedef std::function<LLVector3()> get_vector_t;
+
+ LLCameraInfoPanel(
+ const LLView* parent,
+ const char* title,
+ const LLCoordFrame& camera,
+ const get_vector_t get_focus
+ )
+ : LLPanel([&]() -> LLPanel::Params
+ {
+ LLPanel::Params params;
+ params.rect = LLRect(parent->getLocalRect());
+ return params;
+ }())
+ , mTitle(title)
+ , mCamera(camera)
+ , mGetFocus(get_focus)
+ , mFont(LLFontGL::getFontSansSerifBig())
+ {
+ }
+
+ virtual void draw() override
+ {
+ LLPanel::draw();
+
+ static const U32 HPADDING = 10;
+ static const U32 VPADDING = 5;
+ LLVector3 focus = mGetFocus();
+ LLVector3 sight = focus - mCamera.mOrigin;
+ std::pair<const char*, const LLVector3&> const data[] =
+ {
+ { "Origin:", mCamera.mOrigin },
+ { "X Axis:", mCamera.mXAxis },
+ { "Y Axis:", mCamera.mYAxis },
+ { "Z Axis:", mCamera.mZAxis },
+ { "Focus:", focus },
+ { "Sight:", sight }
+ };
+ S32 width = getRect().getWidth();
+ S32 height = getRect().getHeight();
+ S32 row_count = 1 + sizeof(data) / sizeof(*data);
+ S32 row_height = (height - VPADDING * 2) / row_count;
+ S32 top = height - VPADDING - row_height / 2;
+ mFont->renderUTF8(mTitle, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER);
+ for (const auto& row : data)
+ {
+ top -= row_height;
+ mFont->renderUTF8(row.first, 0, HPADDING, top, LLColor4::white, LLFontGL::LEFT, LLFontGL::VCENTER);
+ const LLVector3& vector = row.second;
+ for (S32 i = 0; i < 3; ++i)
+ {
+ std::string text = llformat("%.6f", vector[i]);
+ S32 right = width / 4 * (i + 2) - HPADDING;
+ mFont->renderUTF8(text, 0, right, top, LLColor4::white, LLFontGL::RIGHT, LLFontGL::VCENTER);
+ }
+ }
+ }
+
+private:
+ const char* mTitle;
+ const LLCoordFrame& mCamera;
+ const get_vector_t mGetFocus;
+ const LLFontGL* mFont;
+};
+
//
// Member functions
//
-/*static*/ bool LLFloaterCamera::inFreeCameraMode()
+// static
+bool LLFloaterCamera::inFreeCameraMode()
{
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
if (floater_camera && floater_camera->mCurrMode == CAMERA_CTRL_MODE_FREE_CAMERA && gAgentCamera.getCameraMode() != CAMERA_MODE_MOUSELOOK)
@@ -254,6 +329,7 @@ void activate_camera_tool()
return false;
}
+// static
void LLFloaterCamera::resetCameraMode()
{
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
@@ -261,6 +337,7 @@ void LLFloaterCamera::resetCameraMode()
floater_camera->switchMode(CAMERA_CTRL_MODE_PAN);
}
+// static
void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
{
sAppearanceEditing = editing;
@@ -269,15 +346,46 @@ void LLFloaterCamera::onAvatarEditingAppearance(bool editing)
floater_camera->handleAvatarEditingAppearance(editing);
}
-void LLFloaterCamera::handleAvatarEditingAppearance(bool editing)
+// static
+void LLFloaterCamera::onDebugCameraToggled()
{
+ if (LLFloaterCamera* instance = LLFloaterCamera::findInstance())
+ {
+ instance->showDebugInfo(LLView::sDebugCamera);
+ }
+ if (LLView::sDebugCamera)
+ {
+ LLFloaterReg::showInstanceOrBringToFront("camera");
+ }
+}
+
+void LLFloaterCamera::showDebugInfo(bool show)
+{
+ // Initially LLPanel contains 1 child "view_border"
+ if (show && mViewerCameraInfo->getChildCount() < 2)
+ {
+ mViewerCameraInfo->addChild(new LLCameraInfoPanel(mViewerCameraInfo, "Viewer Camera", *LLViewerCamera::getInstance(),
+ []() { return LLViewerCamera::getInstance()->getPointOfInterest(); }));
+ mAgentCameraInfo->addChild(new LLCameraInfoPanel(mAgentCameraInfo, "Agent Camera", gAgent.getFrameAgent(),
+ []() { return gAgent.getPosAgentFromGlobal(gAgentCamera.calcFocusPositionTargetGlobal()); }));
+ }
+
+ mAgentCameraInfo->setVisible(show);
+ mViewerCameraInfo->setVisible(show);
+}
+
+void LLFloaterCamera::handleAvatarEditingAppearance(bool editing)
+{
}
void LLFloaterCamera::update()
{
ECameraControlMode mode = determineMode();
- if (mode != mCurrMode) setMode(mode);
+ if (mode != mCurrMode)
+ {
+ setMode(mode);
+ }
}
@@ -286,7 +394,8 @@ void LLFloaterCamera::toPrevMode()
switchMode(mPrevMode);
}
-/*static*/ void LLFloaterCamera::onLeavingMouseLook()
+// static
+void LLFloaterCamera::onLeavingMouseLook()
{
LLFloaterCamera* floater_camera = LLFloaterCamera::findInstance();
if (floater_camera)
@@ -320,12 +429,14 @@ void LLFloaterCamera::onOpen(const LLSD& key)
mClosed = false;
populatePresetCombo();
+
+ showDebugInfo(LLView::sDebugCamera);
}
void LLFloaterCamera::onClose(bool app_quitting)
{
//We don't care of camera mode if app is quitting
- if(app_quitting)
+ if (app_quitting)
return;
// It is necessary to reset mCurrMode to CAMERA_CTRL_MODE_PAN so
// to avoid seeing an empty floater when reopening the control.
@@ -360,14 +471,18 @@ bool LLFloaterCamera::postBuild()
{
updateTransparency(TT_ACTIVE); // force using active floater transparency (STORM-730)
+ mControls = getChild<LLPanel>("controls");
+ mAgentCameraInfo = getChild<LLPanel>("agent_camera_info");
+ mViewerCameraInfo = getChild<LLPanel>("viewer_camera_info");
mRotate = getChild<LLJoystickCameraRotate>(ORBIT);
- mZoom = findChild<LLPanelCameraZoom>(ZOOM);
+ mZoom = getChild<LLPanelCameraZoom>(ZOOM);
mTrack = getChild<LLJoystickCameraTrack>(PAN);
mPresetCombo = getChild<LLComboBox>("preset_combo");
+ mPreciseCtrls = getChild<LLTextBox>("precise_ctrs_label");
- getChild<LLTextBox>("precise_ctrs_label")->setShowCursorHand(false);
- getChild<LLTextBox>("precise_ctrs_label")->setSoundFlags(LLView::MOUSE_UP);
- getChild<LLTextBox>("precise_ctrs_label")->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), false));
+ mPreciseCtrls->setShowCursorHand(false);
+ mPreciseCtrls->setSoundFlags(LLView::MOUSE_UP);
+ mPreciseCtrls->setClickedCallback(boost::bind(&LLFloaterReg::showInstance, "prefs_view_advanced", LLSD(), false));
mPresetCombo->setCommitCallback(boost::bind(&LLFloaterCamera::onCustomPresetSelected, this));
LLPresetsManager::getInstance()->setPresetListChangeCameraCallback(boost::bind(&LLFloaterCamera::populatePresetCombo, this));
@@ -507,6 +622,7 @@ void LLFloaterCamera::updateItemsSelection()
getChild<LLPanelCameraItem>("object_view")->setValue(argument);
}
+// static
void LLFloaterCamera::onClickCameraItem(const LLSD& param)
{
std::string name = param.asString();
@@ -533,7 +649,7 @@ void LLFloaterCamera::onClickCameraItem(const LLSD& param)
}
}
-/*static*/
+// static
void LLFloaterCamera::switchToPreset(const std::string& name)
{
sFreeCamera = false;
diff --git a/indra/newview/llfloatercamera.h b/indra/newview/llfloatercamera.h
index 7a30485d4f..0ff5ae14bc 100644
--- a/indra/newview/llfloatercamera.h
+++ b/indra/newview/llfloatercamera.h
@@ -63,6 +63,9 @@ public:
/** Called when Avatar is entered/exited editing appearance mode */
static void onAvatarEditingAppearance(bool editing);
+ /** Called when opening and when "Advanced | Debug Camera" menu item is toggled */
+ static void onDebugCameraToggled();
+
/* determines actual mode and updates ui */
void update();
@@ -77,9 +80,9 @@ public:
void populatePresetCombo();
- LLJoystickCameraRotate* mRotate;
- LLPanelCameraZoom* mZoom;
- LLJoystickCameraTrack* mTrack;
+ LLJoystickCameraRotate* mRotate { nullptr };
+ LLPanelCameraZoom* mZoom { nullptr };
+ LLJoystickCameraTrack* mTrack { nullptr };
private:
@@ -117,6 +120,8 @@ private:
void handleAvatarEditingAppearance(bool editing);
+ void showDebugInfo(bool show);
+
// set to true when free camera mode is selected in modes list
// remains true until preset camera mode is chosen, or pan button is clicked, or escape pressed
static bool sFreeCamera;
@@ -126,7 +131,11 @@ private:
ECameraControlMode mCurrMode;
std::map<ECameraControlMode, LLButton*> mMode2Button;
- LLComboBox* mPresetCombo;
+ LLPanel* mControls { nullptr };
+ LLPanel* mViewerCameraInfo { nullptr };
+ LLPanel* mAgentCameraInfo { nullptr };
+ LLComboBox* mPresetCombo { nullptr };
+ LLTextBox* mPreciseCtrls { nullptr };
};
/**
diff --git a/indra/newview/llfloatereditextdaycycle.cpp b/indra/newview/llfloatereditextdaycycle.cpp
index 00e4961f6a..befc765cb0 100644
--- a/indra/newview/llfloatereditextdaycycle.cpp
+++ b/indra/newview/llfloatereditextdaycycle.cpp
@@ -1213,7 +1213,7 @@ void LLFloaterEditExtDayCycle::updateButtons()
mDeleteFrameButton->setEnabled(can_manipulate && isRemovingFrameAllowed());
mLoadFrame->setEnabled(can_manipulate);
- bool enable_play = mEditDay ? true : false;
+ bool enable_play = (bool)mEditDay;
childSetEnabled(BTN_PLAY, enable_play);
childSetEnabled(BTN_SKIP_BACK, enable_play);
childSetEnabled(BTN_SKIP_FORWARD, enable_play);
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index bfde125476..96908df2ab 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -832,8 +832,8 @@ void LLFloaterEmojiPicker::createEmojiIcon(const LLEmojiSearchResult& emoji,
void LLFloaterEmojiPicker::showPreview(bool show)
{
//mPreview->setIcon(nullptr);
- mDummy->setVisible(show ? false : true);
- mPreview->setVisible(show ? true : false);
+ mDummy->setVisible(show);
+ mPreview->setVisible(show);
}
void LLFloaterEmojiPicker::onGroupButtonClick(LLUICtrl* ctrl)
diff --git a/indra/newview/llfloatergodtools.cpp b/indra/newview/llfloatergodtools.cpp
index 813bde0fac..da4947839f 100644
--- a/indra/newview/llfloatergodtools.cpp
+++ b/indra/newview/llfloatergodtools.cpp
@@ -718,14 +718,14 @@ void LLPanelRegionTools::setParentEstateID(U32 id)
void LLPanelRegionTools::setCheckFlags(U64 flags)
{
- getChild<LLUICtrl>("check prelude")->setValue(is_prelude(flags) ? true : false);
- getChild<LLUICtrl>("check fixed sun")->setValue(flags & REGION_FLAGS_SUN_FIXED ? true : false);
- getChild<LLUICtrl>("check reset home")->setValue(flags & REGION_FLAGS_RESET_HOME_ON_TELEPORT ? true : false);
- getChild<LLUICtrl>("check damage")->setValue(flags & REGION_FLAGS_ALLOW_DAMAGE ? true : false);
- getChild<LLUICtrl>("check visible")->setValue(flags & REGION_FLAGS_EXTERNALLY_VISIBLE ? true : false);
- getChild<LLUICtrl>("block terraform")->setValue(flags & REGION_FLAGS_BLOCK_TERRAFORM ? true : false);
- getChild<LLUICtrl>("block dwell")->setValue(flags & REGION_FLAGS_BLOCK_DWELL ? true : false);
- getChild<LLUICtrl>("is sandbox")->setValue(flags & REGION_FLAGS_SANDBOX ? true : false );
+ getChild<LLUICtrl>("check prelude")->setValue(is_prelude(flags));
+ getChild<LLUICtrl>("check fixed sun")->setValue(is_flag_set(flags, REGION_FLAGS_SUN_FIXED));
+ getChild<LLUICtrl>("check reset home")->setValue(is_flag_set(flags, REGION_FLAGS_RESET_HOME_ON_TELEPORT));
+ getChild<LLUICtrl>("check damage")->setValue(is_flag_set(flags, REGION_FLAGS_ALLOW_DAMAGE));
+ getChild<LLUICtrl>("check visible")->setValue(is_flag_set(flags, REGION_FLAGS_EXTERNALLY_VISIBLE));
+ getChild<LLUICtrl>("block terraform")->setValue(is_flag_set(flags, REGION_FLAGS_BLOCK_TERRAFORM));
+ getChild<LLUICtrl>("block dwell")->setValue(is_flag_set(flags, REGION_FLAGS_BLOCK_DWELL));
+ getChild<LLUICtrl>("is sandbox")->setValue(is_flag_set(flags, REGION_FLAGS_SANDBOX));
}
void LLPanelRegionTools::setBillableFactor(F32 billable_factor)
@@ -1004,9 +1004,9 @@ U64 LLPanelObjectTools::computeRegionFlags(U64 flags) const
void LLPanelObjectTools::setCheckFlags(U64 flags)
{
- getChild<LLUICtrl>("disable scripts")->setValue(flags & REGION_FLAGS_SKIP_SCRIPTS ? true : false);
- getChild<LLUICtrl>("disable collisions")->setValue(flags & REGION_FLAGS_SKIP_COLLISIONS ? true : false);
- getChild<LLUICtrl>("disable physics")->setValue(flags & REGION_FLAGS_SKIP_PHYSICS ? true : false);
+ getChild<LLUICtrl>("disable scripts")->setValue(is_flag_set(flags, REGION_FLAGS_SKIP_SCRIPTS));
+ getChild<LLUICtrl>("disable collisions")->setValue(is_flag_set(flags, REGION_FLAGS_SKIP_COLLISIONS));
+ getChild<LLUICtrl>("disable physics")->setValue(is_flag_set(flags, REGION_FLAGS_SKIP_PHYSICS));
}
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index 88dc2c78e2..13fe7e16a9 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -57,7 +57,6 @@
#include "llsdserialize.h"
#include "llviewermenu.h" // is_agent_mappable
#include "llviewerobjectlist.h"
-#include "boost/foreach.hpp"
const S32 EVENTS_PER_IDLE_LOOP_CURRENT_SESSION = 80;
@@ -805,12 +804,11 @@ void LLFloaterIMContainer::setVisible(bool visible)
void LLFloaterIMContainer::getDetachedConversationFloaters(floater_list_t& floaters)
{
- typedef conversations_widgets_map::value_type conv_pair;
LLFloaterIMNearbyChat *nearby_chat = LLFloaterReg::findTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
- BOOST_FOREACH(conv_pair item, mConversationsWidgets)
+ for (const auto& [key, fvi] : mConversationsWidgets)
{
- LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(item.second);
+ LLConversationViewSession* widget = dynamic_cast<LLConversationViewSession*>(fvi);
if (widget)
{
LLFloater* session_floater = widget->getSessionFloater();
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 2e66d6f359..c76c1da8d6 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -282,7 +282,7 @@ bool LLFloaterIMNearbyChatScreenChannel::createPoolToast()
void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
{
//look in pool. if there is any message
- if(mStopProcessing)
+ if (mStopProcessing)
return;
if (mFloaterSnapRegion == NULL)
@@ -297,7 +297,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
find last toast and check ID
*/
- if(m_active_toasts.size())
+ if (m_active_toasts.size())
{
LLUUID fromID = chat["from_id"].asUUID(); // agent id or object id
std::string from = chat["from"].asString();
@@ -306,7 +306,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
{
LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel());
- if(panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText())
+ if (panel && panel->messageID() == fromID && panel->getFromName() == from && panel->canAddText())
{
panel->addMessage(chat);
toast->reshapeToPanel();
@@ -320,7 +320,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
- if(m_toast_pool.empty())
+ if (m_toast_pool.empty())
{
//"pool" is empty - create one more panel
LL_DEBUGS("NearbyChat") << "Empty pool" << LL_ENDL;
@@ -331,15 +331,14 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
}
int chat_type = chat["chat_type"].asInteger();
-
- if( ((EChatType)chat_type == CHAT_TYPE_DEBUG_MSG))
+
+ if (chat_type == CHAT_TYPE_DEBUG_MSG)
{
- if(gSavedSettings.getBOOL("ShowScriptErrors") == false)
+ if (!gSavedSettings.getBOOL("ShowScriptErrors"))
return;
- if(gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)
+ if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)
return;
}
-
//take 1st element from pool, (re)initialize it, put it in active toasts
@@ -350,7 +349,7 @@ void LLFloaterIMNearbyChatScreenChannel::addChat(LLSD& chat)
LLFloaterIMNearbyChatToastPanel* panel = dynamic_cast<LLFloaterIMNearbyChatToastPanel*>(toast->getPanel());
- if(!panel)
+ if (!panel)
return;
panel->init(chat);
@@ -453,7 +452,7 @@ void LLFloaterIMNearbyChatScreenChannel::arrangeToasts()
//-----------------------------------------------------------------------------------------------
//LLFloaterIMNearbyChatHandler
//-----------------------------------------------------------------------------------------------
-boost::scoped_ptr<LLEventPump> LLFloaterIMNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat"));
+std::unique_ptr<LLEventPump> LLFloaterIMNearbyChatHandler::sChatWatcher(new LLEventStream("LLChat"));
LLFloaterIMNearbyChatHandler::LLFloaterIMNearbyChatHandler()
{
@@ -487,11 +486,11 @@ void LLFloaterIMNearbyChatHandler::initChannel()
void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
const LLSD &args)
{
- if(chat_msg.mMuted == true)
+ if (chat_msg.mMuted)
return;
- if(chat_msg.mText.empty())
- return;//don't process empty messages
+ if (chat_msg.mText.empty())
+ return; // don't process empty messages
LLFloaterReg::getInstance("im_container");
LLFloaterIMNearbyChat* nearby_chat = LLFloaterReg::getTypedInstance<LLFloaterIMNearbyChat>("nearby_chat");
@@ -522,9 +521,10 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
// errors in separate window.
if (chat_msg.mChatType == CHAT_TYPE_DEBUG_MSG)
{
- if (LLFloater::isQuitRequested()) return;
+ if (LLFloater::isQuitRequested())
+ return;
- if(gSavedSettings.getBOOL("ShowScriptErrors") == false)
+ if (!gSavedSettings.getBOOL("ShowScriptErrors"))
return;
// don't process debug messages from not owned objects, see EXT-7762
@@ -533,7 +533,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
return;
}
- if (gSavedSettings.getS32("ShowScriptErrorsLocation")== 1)// show error in window //("ScriptErrorsAsChat"))
+ if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat"))
{
LLColor4 txt_color;
@@ -550,7 +550,7 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
nearby_chat->addMessage(chat_msg, true, args);
- if(chat_msg.mSourceType == CHAT_SOURCE_AGENT
+ if (chat_msg.mSourceType == CHAT_SOURCE_AGENT
&& chat_msg.mFromID.notNull()
&& chat_msg.mFromID != gAgentID)
{
diff --git a/indra/newview/llfloaterimnearbychathandler.h b/indra/newview/llfloaterimnearbychathandler.h
index 5e6f8cde30..1849604470 100644
--- a/indra/newview/llfloaterimnearbychathandler.h
+++ b/indra/newview/llfloaterimnearbychathandler.h
@@ -46,7 +46,7 @@ public:
protected:
virtual void initChannel();
- static boost::scoped_ptr<LLEventPump> sChatWatcher;
+ static std::unique_ptr<LLEventPump> sChatWatcher;
};
}
diff --git a/indra/newview/llfloaterimsessiontab.cpp b/indra/newview/llfloaterimsessiontab.cpp
index 9b1fc96706..9a7737657d 100644
--- a/indra/newview/llfloaterimsessiontab.cpp
+++ b/indra/newview/llfloaterimsessiontab.cpp
@@ -473,7 +473,7 @@ void LLFloaterIMSessionTab::onInputEditorClicked()
void LLFloaterIMSessionTab::onEmojiRecentPanelToggleBtnClicked()
{
- bool show = mEmojiRecentPanel->getVisible() ? false : true;
+ bool show = !mEmojiRecentPanel->getVisible();
if (show)
{
initEmojiRecentPanel();
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.cpp b/indra/newview/llfloaterinventorythumbnailshelper.cpp
new file mode 100644
index 0000000000..9775eda697
--- /dev/null
+++ b/indra/newview/llfloaterinventorythumbnailshelper.cpp
@@ -0,0 +1,543 @@
+/**
+ * @file llfloaterinventorythumbnailshelper.cpp
+ * @author Callum Prentice
+ * @brief LLFloaterInventoryThumbnailsHelper class implementation
+ *
+ * Usage instructions and some brief notes can be found in Confluence here:
+ * https://lindenlab.atlassian.net/wiki/spaces/~174746736/pages/2928672843/Inventory+Thumbnail+Helper+Tool
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, 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 "llaisapi.h"
+#include "llclipboard.h"
+#include "llinventoryfunctions.h"
+#include "llinventorymodel.h"
+#include "llnotifications.h"
+#include "llnotificationsutil.h"
+#include "llscrolllistctrl.h"
+#include "lltexteditor.h"
+#include "lluictrlfactory.h"
+#include "lluuid.h"
+
+#include "llfloaterinventorythumbnailshelper.h"
+
+LLFloaterInventoryThumbnailsHelper::LLFloaterInventoryThumbnailsHelper(const LLSD& key)
+ : LLFloater("floater_inventory_thumbnails_helper")
+{
+}
+
+LLFloaterInventoryThumbnailsHelper::~LLFloaterInventoryThumbnailsHelper()
+{
+}
+
+bool LLFloaterInventoryThumbnailsHelper::postBuild()
+{
+ mInventoryThumbnailsList = getChild<LLScrollListCtrl>("inventory_thumbnails_list");
+ mInventoryThumbnailsList->setAllowMultipleSelection(true);
+
+ mOutputLog = getChild<LLTextEditor>("output_log");
+ mOutputLog->setMaxTextLength(0xffff * 0x10);
+
+ mPasteItemsBtn = getChild<LLUICtrl>("paste_items_btn");
+ mPasteItemsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onPasteItems, this));
+ mPasteItemsBtn->setEnabled(true);
+
+ mPasteTexturesBtn = getChild<LLUICtrl>("paste_textures_btn");
+ mPasteTexturesBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onPasteTextures, this));
+ mPasteTexturesBtn->setEnabled(true);
+
+ mWriteThumbnailsBtn = getChild<LLUICtrl>("write_thumbnails_btn");
+ mWriteThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onWriteThumbnails, this));
+ mWriteThumbnailsBtn->setEnabled(false);
+
+ mLogMissingThumbnailsBtn = getChild<LLUICtrl>("log_missing_thumbnails_btn");
+ mLogMissingThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onLogMissingThumbnails, this));
+ mLogMissingThumbnailsBtn->setEnabled(false);
+
+ mClearThumbnailsBtn = getChild<LLUICtrl>("clear_thumbnails_btn");
+ mClearThumbnailsBtn->setCommitCallback(boost::bind(&LLFloaterInventoryThumbnailsHelper::onClearThumbnails, this));
+ mClearThumbnailsBtn->setEnabled(false);
+
+ return true;
+}
+
+// Records an entry in the pasted items - saves it to a map and writes it to the log
+// window for later confirmation/validation - since it uses a map, duplicates (based on
+// the name) are discarded
+void LLFloaterInventoryThumbnailsHelper::recordInventoryItemEntry(LLViewerInventoryItem* item)
+{
+ const std::string name = item->getName();
+
+ std::map<std::string, LLViewerInventoryItem*>::iterator iter = mItemNamesItems.find(name);
+ if (iter == mItemNamesItems.end())
+ {
+ mItemNamesItems.insert({name, item});
+
+ writeToLog(
+ STRINGIZE(
+ "ITEM " << mItemNamesItems.size() << "> " <<
+ name <<
+ std::endl
+ ), false);
+ }
+ else
+ {
+ // dupe - do not save
+ }
+}
+
+// Called when the user has copied items from their inventory and selects the Paste Items button
+// in the UI - iterates over items and folders and saves details of each one.
+// The first use of this tool is for updating NUX items and as such, only looks for OBJECTS,
+// CLOTHING and BODYPARTS - later versions of this tool should make that selection editable.
+void LLFloaterInventoryThumbnailsHelper::onPasteItems()
+{
+ if (!LLClipboard::instance().hasContents())
+ {
+ return;
+ }
+
+ writeToLog(
+ STRINGIZE(
+ "\n==== Pasting items from inventory ====" <<
+ std::endl
+ ), false);
+
+ std::vector<LLUUID> objects;
+ LLClipboard::instance().pasteFromClipboard(objects);
+ size_t count = objects.size();
+
+ for (size_t i = 0; i < count; i++)
+ {
+ const LLUUID& entry = objects.at(i);
+
+ // Check for a folder
+ const LLInventoryCategory* cat = gInventory.getCategory(entry);
+ if (cat)
+ {
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+
+ LLIsType is_object(LLAssetType::AT_OBJECT);
+ gInventory.collectDescendentsIf(cat->getUUID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_object);
+
+ LLIsType is_bodypart(LLAssetType::AT_BODYPART);
+ gInventory.collectDescendentsIf(cat->getUUID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_bodypart);
+
+ LLIsType is_clothing(LLAssetType::AT_CLOTHING);
+ gInventory.collectDescendentsIf(cat->getUUID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_clothing);
+
+ for (size_t i = 0; i < item_array.size(); i++)
+ {
+ LLViewerInventoryItem* item = item_array.at(i);
+ recordInventoryItemEntry(item);
+ }
+ }
+
+ // Check for an item
+ LLViewerInventoryItem* item = gInventory.getItem(entry);
+ if (item)
+ {
+ const LLAssetType::EType item_type = item->getType();
+ if (item_type == LLAssetType::AT_OBJECT || item_type == LLAssetType::AT_BODYPART || item_type == LLAssetType::AT_CLOTHING)
+ {
+ recordInventoryItemEntry(item);
+ }
+ }
+ }
+
+ // update the main list view based on what we found
+ updateDisplayList();
+
+ // update the buttons enabled state based on what we found/saved
+ updateButtonStates();
+}
+
+// Records a entry in the pasted textures - saves it to a map and writes it to the log
+// window for later confirmation/validation - since it uses a map, duplicates (based on
+// the name) are discarded
+void LLFloaterInventoryThumbnailsHelper::recordTextureItemEntry(LLViewerInventoryItem* item)
+{
+ const std::string name = item->getName();
+
+ std::map<std::string, LLUUID>::iterator iter = mTextureNamesIDs.find(name);
+ if (iter == mTextureNamesIDs.end())
+ {
+ LLUUID id = item->getAssetUUID();
+ mTextureNamesIDs.insert({name, id});
+
+ writeToLog(
+ STRINGIZE(
+ "TEXTURE " << mTextureNamesIDs.size() << "> " <<
+ name <<
+ //" | " <<
+ //id.asString() <<
+ std::endl
+ ), false);
+ }
+ else
+ {
+ // dupe - do not save
+ }
+}
+
+// Called when the user has copied textures from their inventory and selects the Paste Textures
+// button in the UI - iterates over textures and folders and saves details of each one.
+void LLFloaterInventoryThumbnailsHelper::onPasteTextures()
+{
+ if (!LLClipboard::instance().hasContents())
+ {
+ return;
+ }
+
+ writeToLog(
+ STRINGIZE(
+ "\n==== Pasting textures from inventory ====" <<
+ std::endl
+ ), false);
+
+ std::vector<LLUUID> objects;
+ LLClipboard::instance().pasteFromClipboard(objects);
+ size_t count = objects.size();
+
+ for (size_t i = 0; i < count; i++)
+ {
+ const LLUUID& entry = objects.at(i);
+
+ const LLInventoryCategory* cat = gInventory.getCategory(entry);
+ if (cat)
+ {
+ LLInventoryModel::cat_array_t cat_array;
+ LLInventoryModel::item_array_t item_array;
+
+ LLIsType is_object(LLAssetType::AT_TEXTURE);
+ gInventory.collectDescendentsIf(cat->getUUID(),
+ cat_array,
+ item_array,
+ LLInventoryModel::EXCLUDE_TRASH,
+ is_object);
+
+ for (size_t i = 0; i < item_array.size(); i++)
+ {
+ LLViewerInventoryItem* item = item_array.at(i);
+ recordTextureItemEntry(item);
+ }
+ }
+
+ LLViewerInventoryItem* item = gInventory.getItem(entry);
+ if (item)
+ {
+ const LLAssetType::EType item_type = item->getType();
+ if (item_type == LLAssetType::AT_TEXTURE)
+ {
+ recordTextureItemEntry(item);
+ }
+ }
+ }
+
+ // update the main list view based on what we found
+ updateDisplayList();
+
+ // update the buttons enabled state based on what we found/saved
+ updateButtonStates();
+}
+
+// Updates the main list of entries in the UI based on what is in the maps/storage
+void LLFloaterInventoryThumbnailsHelper::updateDisplayList()
+{
+ mInventoryThumbnailsList->deleteAllItems();
+
+ std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+ while (item_iter != mItemNamesItems.end())
+ {
+ std::string item_name = (*item_iter).first;
+
+ std::string existing_texture_name = std::string();
+ LLUUID existing_thumbnail_id = (*item_iter).second->getThumbnailUUID();
+ if (existing_thumbnail_id != LLUUID::null)
+ {
+ existing_texture_name = existing_thumbnail_id.asString();
+ }
+ else
+ {
+ existing_texture_name = "none";
+ }
+
+ std::string new_texture_name = std::string();
+ std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+ if (texture_iter != mTextureNamesIDs.end())
+ {
+ new_texture_name = (*texture_iter).first;
+ }
+ else
+ {
+ new_texture_name = "missing";
+ }
+
+ LLSD row;
+ row["columns"][EListColumnNum::NAME]["column"] = "item_name";
+ row["columns"][EListColumnNum::NAME]["type"] = "text";
+ row["columns"][EListColumnNum::NAME]["value"] = item_name;
+ row["columns"][EListColumnNum::NAME]["font"]["name"] = "Monospace";
+
+ row["columns"][EListColumnNum::EXISTING_TEXTURE]["column"] = "existing_texture";
+ row["columns"][EListColumnNum::EXISTING_TEXTURE]["type"] = "text";
+ row["columns"][EListColumnNum::EXISTING_TEXTURE]["font"]["name"] = "Monospace";
+ row["columns"][EListColumnNum::EXISTING_TEXTURE]["value"] = existing_texture_name;
+
+ row["columns"][EListColumnNum::NEW_TEXTURE]["column"] = "new_texture";
+ row["columns"][EListColumnNum::NEW_TEXTURE]["type"] = "text";
+ row["columns"][EListColumnNum::NEW_TEXTURE]["font"]["name"] = "Monospace";
+ row["columns"][EListColumnNum::NEW_TEXTURE]["value"] = new_texture_name;
+
+ mInventoryThumbnailsList->addElement(row);
+
+ ++item_iter;
+ }
+}
+
+#if 1
+// *TODO$: LLInventoryCallback should be deprecated to conform to the new boost::bind/coroutine model.
+// temp code in transition
+void inventoryThumbnailsHelperCb(LLPointer<LLInventoryCallback> cb, LLUUID id)
+{
+ if (cb.notNull())
+ {
+ cb->fire(id);
+ }
+}
+#endif
+
+// Makes calls to the AIS v3 API to record the local changes made to the thumbnails.
+// If this is not called, the operations (e.g. set thumbnail or clear thumbnail)
+// appear to work but do not push the changes back to the inventory (local cache view only)
+bool writeInventoryThumbnailID(LLUUID item_id, LLUUID thumbnail_asset_id)
+{
+ if (AISAPI::isAvailable())
+ {
+
+ LLSD updates;
+ updates["thumbnail"] = LLSD().with("asset_id", thumbnail_asset_id.asString());
+
+ LLPointer<LLInventoryCallback> cb;
+
+ AISAPI::completion_t cr = boost::bind(&inventoryThumbnailsHelperCb, cb, _1);
+ AISAPI::UpdateItem(item_id, updates, cr);
+
+ return true;
+ }
+ else
+ {
+ LL_WARNS() << "Unable to write inventory thumbnail because the AIS API is not available" << LL_ENDL;
+ return false;
+ }
+}
+
+// Called when the Write Thumbanils button is pushed. Iterates over the name/item and
+// name/.texture maps and where it finds a common name, extracts what is needed and
+// writes the thumbnail accordingly.
+void LLFloaterInventoryThumbnailsHelper::onWriteThumbnails()
+{
+ // create and show confirmation (Yes/No) textbox since this is a destructive operation
+ LLNotificationsUtil::add("WriteInventoryThumbnailsWarning", LLSD(), LLSD(),
+ [&](const LLSD & notif, const LLSD & resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+ while (item_iter != mItemNamesItems.end())
+ {
+ std::string item_name = (*item_iter).first;
+
+ std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+ if (texture_iter != mTextureNamesIDs.end())
+ {
+ LLUUID item_id = (*item_iter).second->getUUID();
+
+ LLUUID thumbnail_asset_id = (*texture_iter).second;
+
+ writeToLog(
+ STRINGIZE(
+ "WRITING THUMB " <<
+ (*item_iter).first <<
+ "\n" <<
+ "item ID: " <<
+ item_id <<
+ "\n" <<
+ "thumbnail texture ID: " <<
+ thumbnail_asset_id <<
+ "\n"
+ ), true);
+
+
+ (*item_iter).second->setThumbnailUUID(thumbnail_asset_id);
+
+ // This additional step (notifying AIS API) is required
+ // to make the changes persist outside of the local cache
+ writeInventoryThumbnailID(item_id, thumbnail_asset_id);
+ }
+
+ ++item_iter;
+ }
+
+ updateDisplayList();
+ }
+ else
+ {
+ LL_INFOS() << "Writing new thumbnails was canceled" << LL_ENDL;
+ }
+ });
+}
+
+// Called when the Log Items with Missing Thumbnails is selected. This merely writes
+// a list of all the items for which the thumbnail ID is Null. Typical use case is to
+// copy from the log window, pasted to Slack to illustrate which items are missing
+// a thumbnail
+void LLFloaterInventoryThumbnailsHelper::onLogMissingThumbnails()
+{
+ std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+ while (item_iter != mItemNamesItems.end())
+ {
+ LLUUID thumbnail_id = (*item_iter).second->getThumbnailUUID();
+
+ if (thumbnail_id == LLUUID::null)
+ {
+ writeToLog(
+ STRINGIZE(
+ "Missing thumbnail: " <<
+ (*item_iter).first <<
+ std::endl
+ ), true);
+ }
+
+ ++item_iter;
+ }
+}
+
+// Called when the Clear Thumbnail button is selected. Code to perform the clear (really
+// just writing a NULL UUID into the thumbnail field) is behind an "Are you Sure?" dialog
+// since it cannot be undone and potentinally, you could remove the thumbnails from your
+// whole inventory this way.
+void LLFloaterInventoryThumbnailsHelper::onClearThumbnails()
+{
+ // create and show confirmation (Yes/No) textbox since this is a destructive operation
+ LLNotificationsUtil::add("ClearInventoryThumbnailsWarning", LLSD(), LLSD(),
+ [&](const LLSD & notif, const LLSD & resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+ while (item_iter != mItemNamesItems.end())
+ {
+ (*item_iter).second->setThumbnailUUID(LLUUID::null);
+
+ // This additional step (notifying AIS API) is required
+ // to make the changes persist outside of the local cache
+ const LLUUID item_id = (*item_iter).second->getUUID();
+ writeInventoryThumbnailID(item_id, LLUUID::null);
+
+ ++item_iter;
+ }
+
+ updateDisplayList();
+ }
+ else
+ {
+ LL_INFOS() << "Clearing on thumbnails was canceled" << LL_ENDL;
+ }
+ });
+}
+
+// Update the endabled state of some of the UI buttons based on what has
+// been recorded so far. For example, if there are no valid item/texture pairs,
+// then the Write Thumbnails button is not enabled.
+void LLFloaterInventoryThumbnailsHelper::updateButtonStates()
+{
+ size_t found_count = 0;
+
+ std::map<std::string, LLViewerInventoryItem*>::iterator item_iter = mItemNamesItems.begin();
+ while (item_iter != mItemNamesItems.end())
+ {
+ std::string item_name = (*item_iter).first;
+
+ std::map<std::string, LLUUID>::iterator texture_iter = mTextureNamesIDs.find(item_name);
+ if (texture_iter != mTextureNamesIDs.end())
+ {
+ found_count++;
+ }
+
+ ++item_iter;
+ }
+
+ // the "Write Thumbnails" button is only enabled when there is at least one
+ // item with a matching texture ready to be written to the thumbnail field
+ if (found_count > 0)
+ {
+ mWriteThumbnailsBtn->setEnabled(true);
+ }
+ else
+ {
+ mWriteThumbnailsBtn->setEnabled(false);
+ }
+
+ // The "Log Missing Items" and "Clear Thumbnails" buttons are only enabled
+ // when there is at least 1 item that was pasted from inventory (doesn't need
+ // to have a matching texture for these operations)
+ if (mItemNamesItems.size() > 0)
+ {
+ mLogMissingThumbnailsBtn->setEnabled(true);
+ mClearThumbnailsBtn->setEnabled(true);
+ }
+ else
+ {
+ mLogMissingThumbnailsBtn->setEnabled(false);
+ mClearThumbnailsBtn->setEnabled(false);
+ }
+}
+
+// Helper function for writing a line to the log window. Currently the only additional
+// feature is that it scrolls to the bottom each time a line is written but it
+// is envisaged that other common actions will be added here eventually - E.G. write eavh
+// line to the Second Life log too for example.
+void LLFloaterInventoryThumbnailsHelper::writeToLog(std::string logline, bool prepend_newline)
+{
+ mOutputLog->appendText(logline, prepend_newline);
+
+ mOutputLog->setCursorAndScrollToEnd();
+}
diff --git a/indra/newview/llfloaterinventorythumbnailshelper.h b/indra/newview/llfloaterinventorythumbnailshelper.h
new file mode 100644
index 0000000000..71eeef31ee
--- /dev/null
+++ b/indra/newview/llfloaterinventorythumbnailshelper.h
@@ -0,0 +1,82 @@
+/**
+ * @file llfloaterinventorythumbnailshelper.h
+ * @author Callum Prentice
+ * @brief Helper floater for bulk processing of inventory thumbnails tool
+ *
+ * $LicenseInfo:firstyear=2008&license=viewerlgpl$
+ * Second Life Viewer Source Code
+ * Copyright (C) 2010, 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_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
+#define LL_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
+
+#include "llfloater.h"
+class LLTextEditor;
+class LLScrollListCtrl;
+class LLViewerInventoryItem;
+class LLUUID;
+
+class LLFloaterInventoryThumbnailsHelper:
+ public LLFloater
+{
+ friend class LLFloaterReg;
+ private:
+ LLFloaterInventoryThumbnailsHelper(const LLSD& key);
+ bool postBuild() override;
+ ~LLFloaterInventoryThumbnailsHelper();
+
+ LLScrollListCtrl* mInventoryThumbnailsList;
+
+ LLTextEditor* mOutputLog;
+
+ LLUICtrl* mPasteItemsBtn;
+ void onPasteItems();
+
+ LLUICtrl* mPasteTexturesBtn;
+ void onPasteTextures();
+
+ LLUICtrl* mWriteThumbnailsBtn;
+ void onWriteThumbnails();
+
+ LLUICtrl* mLogMissingThumbnailsBtn;
+ void onLogMissingThumbnails();
+
+ LLUICtrl* mClearThumbnailsBtn;
+ void onClearThumbnails();
+
+ void recordInventoryItemEntry(LLViewerInventoryItem* item);
+ void recordTextureItemEntry(LLViewerInventoryItem* item);
+ void updateButtonStates();
+ void updateDisplayList();
+ void writeToLog(std::string logline, bool prepend_newline);
+
+ std::map<std::string, LLViewerInventoryItem*> mItemNamesItems;
+ std::map<std::string, LLUUID> mTextureNamesIDs;
+
+ enum EListColumnNum
+ {
+ NAME = 0,
+ EXISTING_TEXTURE = 1,
+ NEW_TEXTURE = 2
+ };
+};
+
+#endif // LL_LLFLOATERINVENTORYTHUMBNAILSHELPER_H
diff --git a/indra/newview/llfloaterlagmeter.cpp b/indra/newview/llfloaterlagmeter.cpp
index 1cd46cdd44..c258da6640 100644
--- a/indra/newview/llfloaterlagmeter.cpp
+++ b/indra/newview/llfloaterlagmeter.cpp
@@ -179,10 +179,6 @@ void LLFloaterLagMeter::determineClient()
{
mClientCause->setText( getString("client_texture_loading_cause_msg", mStringArgs) );
}
- else if(LLViewerTexture::isMemoryForTextureLow())
- {
- mClientCause->setText( getString("client_texture_memory_cause_msg", mStringArgs) );
- }
else
{
mClientCause->setText( getString("client_complex_objects_cause_msg", mStringArgs) );
diff --git a/indra/newview/llfloatermarketplacelistings.cpp b/indra/newview/llfloatermarketplacelistings.cpp
index 19df41689a..9e3d8e19f3 100644
--- a/indra/newview/llfloatermarketplacelistings.cpp
+++ b/indra/newview/llfloatermarketplacelistings.cpp
@@ -183,7 +183,8 @@ void LLPanelMarketplaceListings::draw()
// Get the audit button enabled only after the whole inventory is fetched
if (!mAuditBtn->getEnabled())
{
- mAuditBtn->setEnabled(LLInventoryModelBackgroundFetch::instance().isEverythingFetched());
+ LLInventoryModelBackgroundFetch* inst = LLInventoryModelBackgroundFetch::getInstance();
+ mAuditBtn->setEnabled(inst->isEverythingFetched() && !inst->folderFetchActive());
}
LLPanel::draw();
@@ -410,8 +411,14 @@ bool LLFloaterMarketplaceListings::postBuild()
mCategoryAddedObserver = new LLMarketplaceListingsAddedObserver(this);
gInventory.addObserver(mCategoryAddedObserver);
- // Fetch aggressively so we can interact with listings right onOpen()
- fetchContents();
+
+ // Fetch aggressively so we can interact with listings as soon as possible
+ if (!fetchContents())
+ {
+ const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ LLInventoryModelBackgroundFetch::instance().start(marketplacelistings_id, true);
+ }
+
return true;
}
@@ -440,17 +447,19 @@ void LLFloaterMarketplaceListings::onFocusReceived()
updateView();
}
-void LLFloaterMarketplaceListings::fetchContents()
+bool LLFloaterMarketplaceListings::fetchContents()
{
- if (mRootFolderId.notNull() &&
+ if (mRootFolderId.notNull() &&
(LLMarketplaceData::instance().getSLMDataFetched() != MarketplaceFetchCodes::MARKET_FETCH_LOADING) &&
(LLMarketplaceData::instance().getSLMDataFetched() != MarketplaceFetchCodes::MARKET_FETCH_DONE))
- {
+ {
LLMarketplaceData::instance().setDataFetchedSignal(boost::bind(&LLFloaterMarketplaceListings::updateView, this));
LLMarketplaceData::instance().setSLMDataFetched(MarketplaceFetchCodes::MARKET_FETCH_LOADING);
- LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true);
+ LLInventoryModelBackgroundFetch::instance().start(mRootFolderId, true);
LLMarketplaceData::instance().getSLMListings();
- }
+ return true;
+ }
+ return false;
}
void LLFloaterMarketplaceListings::setRootFolder()
diff --git a/indra/newview/llfloatermarketplacelistings.h b/indra/newview/llfloatermarketplacelistings.h
index c010e4d2bf..5dc0e4479e 100644
--- a/indra/newview/llfloatermarketplacelistings.h
+++ b/indra/newview/llfloatermarketplacelistings.h
@@ -114,8 +114,8 @@ public:
protected:
void setRootFolder();
void setPanels();
- void fetchContents();
-
+ bool fetchContents();
+
void setStatusString(const std::string& statusString);
void onClose(bool app_quitting);
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index d0233da920..b503fc3630 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1026,7 +1026,6 @@ void LLFloaterPreference::onBtnCancel(const LLSD& userdata)
{
cancel({"RenderQualityPerformance"});
LLFloaterReg::hideInstance("prefs_graphics_advanced");
- updateMaxComplexity();
}
else
{
@@ -1245,7 +1244,7 @@ void LLFloaterPreference::refreshEnabledState()
ctrl_pbr->setEnabled(true);
// Cannot have floater active until caps have been received
- getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() < STATE_STARTED ? false : true);
+ getChild<LLButton>("default_creation_permissions")->setEnabled(LLStartUp::getStartupState() >= STATE_STARTED);
getChildView("block_list")->setEnabled(LLLoginInstance::getInstance()->authSuccess());
}
@@ -3282,9 +3281,9 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings()
// Check for invalid states for the other HTTP proxy radio
LLRadioGroup* otherHttpProxy = getChild<LLRadioGroup>("other_http_proxy_type");
if ((otherHttpProxy->getSelectedValue().asString() == "Socks" &&
- getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get() == false )||(
+ !getChild<LLCheckBoxCtrl>("socks_proxy_enabled")->get())||(
otherHttpProxy->getSelectedValue().asString() == "Web" &&
- getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get() == false ) )
+ !getChild<LLCheckBoxCtrl>("web_proxy_enabled")->get()))
{
otherHttpProxy->selectFirstItem();
}
@@ -3293,10 +3292,10 @@ void LLFloaterPreferenceProxy::onChangeSocksSettings()
void LLFloaterPreference::onUpdateFilterTerm(bool force)
{
- LLWString seachValue = utf8str_to_wstring( mFilterEdit->getValue() );
- LLWStringUtil::toLower( seachValue );
+ LLWString seachValue = utf8str_to_wstring(mFilterEdit->getValue());
+ LLWStringUtil::toLower(seachValue);
- if( !mSearchData || (mSearchData->mLastFilter == seachValue && !force))
+ if (!mSearchData || (mSearchData->mLastFilter == seachValue && !force))
return;
if (mSearchDataDirty)
@@ -3307,14 +3306,13 @@ void LLFloaterPreference::onUpdateFilterTerm(bool force)
mSearchData->mLastFilter = seachValue;
- if( !mSearchData->mRootTab )
+ if (!mSearchData->mRootTab)
return;
mSearchData->mRootTab->hightlightAndHide( seachValue );
filterIgnorableNotifications();
- LLTabContainer *pRoot = getChild< LLTabContainer >( "pref core" );
- if( pRoot )
+ if (LLTabContainer* pRoot = getChild<LLTabContainer>("pref core"))
pRoot->selectFirstTab();
}
@@ -3331,72 +3329,69 @@ void LLFloaterPreference::filterIgnorableNotifications()
void collectChildren( LLView const *aView, ll::prefs::PanelDataPtr aParentPanel, ll::prefs::TabContainerDataPtr aParentTabContainer )
{
- if( !aView )
+ if (!aView)
return;
- llassert_always( aParentPanel || aParentTabContainer );
-
- LLView::child_list_const_iter_t itr = aView->beginChild();
- LLView::child_list_const_iter_t itrEnd = aView->endChild();
+ llassert_always(aParentPanel || aParentTabContainer);
- while( itr != itrEnd )
+ for (LLView* pView : *aView->getChildList())
{
- LLView *pView = *itr;
+ if (!pView)
+ continue;
+
ll::prefs::PanelDataPtr pCurPanelData = aParentPanel;
ll::prefs::TabContainerDataPtr pCurTabContainer = aParentTabContainer;
- if( !pView )
- continue;
- LLPanel const *pPanel = dynamic_cast< LLPanel const *>( pView );
- LLTabContainer const *pTabContainer = dynamic_cast< LLTabContainer const *>( pView );
- ll::ui::SearchableControl const *pSCtrl = dynamic_cast< ll::ui::SearchableControl const *>( pView );
- if( pTabContainer )
+ LLPanel const *pPanel = dynamic_cast<LLPanel const*>(pView);
+ LLTabContainer const *pTabContainer = dynamic_cast<LLTabContainer const*>(pView);
+ ll::ui::SearchableControl const *pSCtrl = dynamic_cast<ll::ui::SearchableControl const*>( pView );
+
+ if (pTabContainer)
{
pCurPanelData.reset();
- pCurTabContainer = ll::prefs::TabContainerDataPtr( new ll::prefs::TabContainerData );
- pCurTabContainer->mTabContainer = const_cast< LLTabContainer *>( pTabContainer );
+ pCurTabContainer = ll::prefs::TabContainerDataPtr(new ll::prefs::TabContainerData);
+ pCurTabContainer->mTabContainer = const_cast< LLTabContainer *>(pTabContainer);
pCurTabContainer->mLabel = pTabContainer->getLabel();
pCurTabContainer->mPanel = 0;
- if( aParentPanel )
- aParentPanel->mChildPanel.push_back( pCurTabContainer );
- if( aParentTabContainer )
- aParentTabContainer->mChildPanel.push_back( pCurTabContainer );
+ if (aParentPanel)
+ aParentPanel->mChildPanel.push_back(pCurTabContainer);
+ if (aParentTabContainer)
+ aParentTabContainer->mChildPanel.push_back(pCurTabContainer);
}
- else if( pPanel )
+ else if (pPanel)
{
pCurTabContainer.reset();
- pCurPanelData = ll::prefs::PanelDataPtr( new ll::prefs::PanelData );
+ pCurPanelData = ll::prefs::PanelDataPtr(new ll::prefs::PanelData);
pCurPanelData->mPanel = pPanel;
pCurPanelData->mLabel = pPanel->getLabel();
llassert_always( aParentPanel || aParentTabContainer );
- if( aParentTabContainer )
- aParentTabContainer->mChildPanel.push_back( pCurPanelData );
- else if( aParentPanel )
- aParentPanel->mChildPanel.push_back( pCurPanelData );
+ if (aParentTabContainer)
+ aParentTabContainer->mChildPanel.push_back(pCurPanelData);
+ else if (aParentPanel)
+ aParentPanel->mChildPanel.push_back(pCurPanelData);
}
- else if( pSCtrl && pSCtrl->getSearchText().size() )
+ else if (pSCtrl && pSCtrl->getSearchText().size())
{
- ll::prefs::SearchableItemPtr item = ll::prefs::SearchableItemPtr( new ll::prefs::SearchableItem() );
+ ll::prefs::SearchableItemPtr item = ll::prefs::SearchableItemPtr(new ll::prefs::SearchableItem());
item->mView = pView;
item->mCtrl = pSCtrl;
- item->mLabel = utf8str_to_wstring( pSCtrl->getSearchText() );
- LLWStringUtil::toLower( item->mLabel );
+ item->mLabel = utf8str_to_wstring(pSCtrl->getSearchText());
+ LLWStringUtil::toLower(item->mLabel);
- llassert_always( aParentPanel || aParentTabContainer );
+ llassert_always(aParentPanel || aParentTabContainer);
- if( aParentPanel )
- aParentPanel->mChildren.push_back( item );
- if( aParentTabContainer )
- aParentTabContainer->mChildren.push_back( item );
+ if (aParentPanel)
+ aParentPanel->mChildren.push_back(item);
+ if (aParentTabContainer)
+ aParentTabContainer->mChildren.push_back(item);
}
- collectChildren( pView, pCurPanelData, pCurTabContainer );
- ++itr;
+ collectChildren(pView, pCurPanelData, pCurTabContainer);
}
}
diff --git a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
index 6741dbb7e4..25ee834109 100644
--- a/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
+++ b/indra/newview/llfloaterpreferencesgraphicsadvanced.cpp
@@ -390,7 +390,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
// Bump & Shiny
LLCheckBoxCtrl* bumpshiny_ctrl = getChild<LLCheckBoxCtrl>("BumpShiny");
bool bumpshiny = LLCubeMap::sUseCubeMaps && LLFeatureManager::getInstance()->isFeatureAvailable("RenderObjectBump");
- bumpshiny_ctrl->setEnabled(bumpshiny ? true : false);
+ bumpshiny_ctrl->setEnabled(bumpshiny);
// Avatar Mode
// Enable Avatar Shaders
@@ -402,19 +402,12 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
if (LLViewerShaderMgr::sInitialized)
{
S32 max_avatar_shader = LLViewerShaderMgr::instance()->mMaxAvatarShaderLevel;
- avatar_vp_enabled = (max_avatar_shader > 0) ? true : false;
+ avatar_vp_enabled = max_avatar_shader > 0;
}
ctrl_avatar_vp->setEnabled(avatar_vp_enabled);
- if (gSavedSettings.getBOOL("RenderAvatarVP") == false)
- {
- ctrl_avatar_cloth->setEnabled(false);
- }
- else
- {
- ctrl_avatar_cloth->setEnabled(true);
- }
+ ctrl_avatar_cloth->setEnabled(gSavedSettings.getBOOL("RenderAvatarVP"));
// Vertex Shaders, Global Shader Enable
// SL-12594 Basic shaders are always enabled. DJH TODO clean up now-orphaned state handling code
@@ -438,8 +431,8 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLCheckBoxCtrl* ctrl_deferred = getChild<LLCheckBoxCtrl>("UseLightShaders");
enabled = LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferred") &&
- ((bumpshiny_ctrl && bumpshiny_ctrl->get()) ? true : false) &&
- (ctrl_wind_light->get()) ? true : false;
+ bumpshiny_ctrl && bumpshiny_ctrl->get() &&
+ ctrl_wind_light->get();
ctrl_deferred->setEnabled(enabled);
#endif
@@ -455,7 +448,7 @@ void LLFloaterPreferenceGraphicsAdvanced::refreshEnabledState()
LLTextBox* shadow_text = getChild<LLTextBox>("RenderShadowDetailText");
// note, okay here to get from ctrl_deferred as it's twin, ctrl_deferred2 will alway match it
- enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && (ctrl_deferred->get() ? true : false);
+ enabled = enabled && LLFeatureManager::getInstance()->isFeatureAvailable("RenderDeferredSSAO");// && ctrl_deferred->get();
//ctrl_deferred->set(gSavedSettings.getBOOL("RenderDeferred"));
diff --git a/indra/newview/llfloaterregioninfo.cpp b/indra/newview/llfloaterregioninfo.cpp
index bf809da5d5..8b7445e0dc 100644
--- a/indra/newview/llfloaterregioninfo.cpp
+++ b/indra/newview/llfloaterregioninfo.cpp
@@ -499,17 +499,17 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel->getChild<LLUICtrl>("region_type")->setValue(LLSD(sim_type));
panel->getChild<LLUICtrl>("version_channel_text")->setValue(gLastVersionChannel);
- panel->getChild<LLUICtrl>("block_terraform_check")->setValue((region_flags & REGION_FLAGS_BLOCK_TERRAFORM) ? true : false );
- panel->getChild<LLUICtrl>("block_fly_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLY) ? true : false );
- panel->getChild<LLUICtrl>("block_fly_over_check")->setValue((region_flags & REGION_FLAGS_BLOCK_FLYOVER) ? true : false );
- panel->getChild<LLUICtrl>("allow_damage_check")->setValue((region_flags & REGION_FLAGS_ALLOW_DAMAGE) ? true : false );
- panel->getChild<LLUICtrl>("restrict_pushobject")->setValue((region_flags & REGION_FLAGS_RESTRICT_PUSHOBJECT) ? true : false );
- panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue((region_flags & REGION_FLAGS_BLOCK_LAND_RESELL) ? false : true );
- panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue((region_flags & REGION_FLAGS_ALLOW_PARCEL_CHANGES) ? true : false );
- panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue((region_flags & REGION_FLAGS_BLOCK_PARCEL_SEARCH) ? true : false );
- panel->getChild<LLUICtrl>("agent_limit_spin")->setValue(LLSD((F32)agent_limit) );
- panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor) );
- panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access) );
+ panel->getChild<LLUICtrl>("block_terraform_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_TERRAFORM));
+ panel->getChild<LLUICtrl>("block_fly_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLY));
+ panel->getChild<LLUICtrl>("block_fly_over_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_FLYOVER));
+ panel->getChild<LLUICtrl>("allow_damage_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_DAMAGE));
+ panel->getChild<LLUICtrl>("restrict_pushobject")->setValue(is_flag_set(region_flags, REGION_FLAGS_RESTRICT_PUSHOBJECT));
+ panel->getChild<LLUICtrl>("allow_land_resell_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_LAND_RESELL));
+ panel->getChild<LLUICtrl>("allow_parcel_changes_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_ALLOW_PARCEL_CHANGES));
+ panel->getChild<LLUICtrl>("block_parcel_search_check")->setValue(is_flag_set(region_flags, REGION_FLAGS_BLOCK_PARCEL_SEARCH));
+ panel->getChild<LLUICtrl>("agent_limit_spin")->setValue(LLSD((F32)agent_limit));
+ panel->getChild<LLUICtrl>("object_bonus_spin")->setValue(LLSD(object_bonus_factor));
+ panel->getChild<LLUICtrl>("access_combo")->setValue(LLSD(sim_access));
panel->getChild<LLSpinCtrl>("agent_limit_spin")->setMaxValue(hard_agent_limit);
@@ -532,9 +532,9 @@ void LLFloaterRegionInfo::processRegionInfo(LLMessageSystem* msg)
panel = tab->getChild<LLPanel>("Debug");
panel->getChild<LLUICtrl>("region_text")->setValue(LLSD(sim_name) );
- panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_SCRIPTS) ? true : false )) );
- panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_COLLISIONS) ? true : false )) );
- panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((bool)((region_flags & REGION_FLAGS_SKIP_PHYSICS) ? true : false )) );
+ panel->getChild<LLUICtrl>("disable_scripts_check")->setValue(LLSD((bool)(region_flags & REGION_FLAGS_SKIP_SCRIPTS)));
+ panel->getChild<LLUICtrl>("disable_collisions_check")->setValue(LLSD((bool)(region_flags & REGION_FLAGS_SKIP_COLLISIONS)));
+ panel->getChild<LLUICtrl>("disable_physics_check")->setValue(LLSD((bool)(region_flags & REGION_FLAGS_SKIP_PHYSICS)));
panel->setCtrlsEnabled(allow_modify);
// TERRAIN PANEL
@@ -1893,7 +1893,7 @@ void LLPanelEstateInfo::refresh()
getChildView("limit_bots")->setEnabled(public_access);
// if this is set to false, then the limit fields are meaningless and should be turned off
- if (public_access == false)
+ if (!public_access)
{
getChild<LLUICtrl>("limit_payment")->setValue(false);
getChild<LLUICtrl>("limit_age_verified")->setValue(false);
@@ -2832,19 +2832,24 @@ void LLPanelEstateAccess::updateControls(LLViewerRegion* region)
bool manager = (region && region->isEstateManager());
bool enable_cotrols = god || owner || manager;
setCtrlsEnabled(enable_cotrols);
-
- bool has_allowed_avatar = getChild<LLNameListCtrl>("allowed_avatar_name_list")->getFirstSelected() ? true : false;
- bool has_allowed_group = getChild<LLNameListCtrl>("allowed_group_name_list")->getFirstSelected() ? true : false;
- bool has_banned_agent = getChild<LLNameListCtrl>("banned_avatar_name_list")->getFirstSelected() ? true : false;
- bool has_estate_manager = getChild<LLNameListCtrl>("estate_manager_name_list")->getFirstSelected() ? true : false;
+
+ LLNameListCtrl* allowedAvatars = getChild<LLNameListCtrl>("allowed_avatar_name_list");
+ LLNameListCtrl* allowedGroups = getChild<LLNameListCtrl>("allowed_group_name_list");
+ LLNameListCtrl* bannedAvatars = getChild<LLNameListCtrl>("banned_avatar_name_list");
+ LLNameListCtrl* estateManagers = getChild<LLNameListCtrl>("estate_manager_name_list");
+
+ bool has_allowed_avatar = allowedAvatars->getFirstSelected();
+ bool has_allowed_group = allowedGroups->getFirstSelected();
+ bool has_banned_agent = bannedAvatars->getFirstSelected();
+ bool has_estate_manager = estateManagers->getFirstSelected();
getChildView("add_allowed_avatar_btn")->setEnabled(enable_cotrols);
getChildView("remove_allowed_avatar_btn")->setEnabled(has_allowed_avatar && enable_cotrols);
- getChildView("allowed_avatar_name_list")->setEnabled(enable_cotrols);
+ allowedAvatars->setEnabled(enable_cotrols);
getChildView("add_allowed_group_btn")->setEnabled(enable_cotrols);
getChildView("remove_allowed_group_btn")->setEnabled(has_allowed_group && enable_cotrols);
- getChildView("allowed_group_name_list")->setEnabled(enable_cotrols);
+ allowedGroups->setEnabled(enable_cotrols);
// Can't ban people from mainland, orientation islands, etc. because this
// creates much network traffic and server load.
@@ -2853,12 +2858,12 @@ void LLPanelEstateAccess::updateControls(LLViewerRegion* region)
bool enable_ban = enable_cotrols && !linden_estate;
getChildView("add_banned_avatar_btn")->setEnabled(enable_ban);
getChildView("remove_banned_avatar_btn")->setEnabled(has_banned_agent && enable_ban);
- getChildView("banned_avatar_name_list")->setEnabled(enable_cotrols);
+ bannedAvatars->setEnabled(enable_cotrols);
// estate managers can't add estate managers
getChildView("add_estate_manager_btn")->setEnabled(god || owner);
getChildView("remove_estate_manager_btn")->setEnabled(has_estate_manager && (god || owner));
- getChildView("estate_manager_name_list")->setEnabled(god || owner);
+ estateManagers->setEnabled(god || owner);
if (enable_cotrols != mCtrlsEnabled)
{
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index 90e44d49dd..70504944b1 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -158,7 +158,7 @@ public:
// typedef std::map<std::string,std::pair<std::list<std::string>,std::list<std::string> > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise
typedef std::list<std::string> StringList;
- typedef boost::shared_ptr<StringList> StringListPtr;
+ typedef std::shared_ptr<StringList> StringListPtr;
typedef std::map<std::string, std::pair<StringListPtr,StringListPtr> > DiffMap;
DiffMap mDiffsMap; // map, of filename to pair of list of changed element paths and list of errors
diff --git a/indra/newview/llfloaterurlentry.cpp b/indra/newview/llfloaterurlentry.cpp
index de37c92326..ce9e1b13b6 100644
--- a/indra/newview/llfloaterurlentry.cpp
+++ b/indra/newview/llfloaterurlentry.cpp
@@ -71,7 +71,7 @@ bool LLFloaterURLEntry::postBuild()
childSetAction("clear_btn", onBtnClear, this);
// clear media list button
LLSD parcel_history = LLURLHistory::getURLHistory("parcel");
- bool enable_clear_button = parcel_history.size() > 0 ? true : false;
+ bool enable_clear_button = parcel_history.size() > 0;
getChildView("clear_btn")->setEnabled(enable_clear_button );
// OK button
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 24391046c1..8fb6710161 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -327,6 +327,7 @@ void* LLFloaterWorldMap::createWorldMapView(void* data)
bool LLFloaterWorldMap::postBuild()
{
mMapView = dynamic_cast<LLWorldMapView*>(getChild<LLPanel>("objects_mapview"));
+ mMapView->setPan(0, 0, true);
LLComboBox *avatar_combo = getChild<LLComboBox>("friend combo");
avatar_combo->selectFirstItem();
diff --git a/indra/newview/llfriendcard.cpp b/indra/newview/llfriendcard.cpp
index ca3f670518..fc8e1f3d26 100644
--- a/indra/newview/llfriendcard.cpp
+++ b/indra/newview/llfriendcard.cpp
@@ -177,7 +177,7 @@ void LLFriendCardsManager::putAvatarData(const LLUUID& avatarID)
LL_INFOS() << "Store avatar data, avatarID: " << avatarID << LL_ENDL;
std::pair< avatar_uuid_set_t::iterator, bool > pr;
pr = mBuddyIDSet.insert(avatarID);
- if (pr.second == false)
+ if (!pr.second)
{
LL_WARNS() << "Trying to add avatar UUID for the stored avatar: "
<< avatarID
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 90575ccda6..8224171297 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -247,7 +247,7 @@ void LLHUDNameTag::renderText(bool for_select)
{
return;
}
-
+
if (for_select)
{
gGL.getTexUnit(0)->disable();
@@ -257,8 +257,8 @@ void LLHUDNameTag::renderText(bool for_select)
gGL.getTexUnit(0)->enable(LLTexUnit::TT_TEXTURE);
}
- LLGLState gls_blend(GL_BLEND, for_select ? false : true);
-
+ LLGLState gls_blend(GL_BLEND, !for_select);
+
LLColor4 shadow_color(0.f, 0.f, 0.f, 1.f);
F32 alpha_factor = 1.f;
LLColor4 text_color = mColor;
diff --git a/indra/newview/llhudobject.cpp b/indra/newview/llhudobject.cpp
index 08a763bcec..7fe313e3b0 100644
--- a/indra/newview/llhudobject.cpp
+++ b/indra/newview/llhudobject.cpp
@@ -52,13 +52,13 @@ struct hud_object_further_away
bool hud_object_further_away::operator()(const LLPointer<LLHUDObject>& lhs, const LLPointer<LLHUDObject>& rhs) const
{
- return (lhs->getDistance() > rhs->getDistance()) ? true : false;
+ return lhs->getDistance() > rhs->getDistance();
}
-LLHUDObject::LLHUDObject(const U8 type) :
- mPositionGlobal(),
- mSourceObject(NULL),
+LLHUDObject::LLHUDObject(const U8 type) :
+ mPositionGlobal(),
+ mSourceObject(NULL),
mTargetObject(NULL)
{
mVisible = true;
diff --git a/indra/newview/llimprocessing.cpp b/indra/newview/llimprocessing.cpp
index 5516a8fc61..44705acb07 100644
--- a/indra/newview/llimprocessing.cpp
+++ b/indra/newview/llimprocessing.cpp
@@ -278,7 +278,7 @@ void inventory_offer_handler(LLOfferInfo* info)
p.name = info->mFromID == gAgentID ? "OwnObjectGiveItem" : "ObjectGiveItem";
// Pop up inv offer chiclet and let the user accept (keep), or reject (and silently delete) the inventory.
- LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup == true);
+ LLPostponedNotification::add<LLPostponedOfferNotification>(p, info->mFromID, info->mFromGroup);
}
else // Agent -> Agent Inventory Offer
{
@@ -450,7 +450,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
// object IMs contain sender object id in session_id (STORM-1209)
|| (dialog == IM_FROM_TASK && LLMuteList::getInstance()->isMuted(session_id));
bool is_owned_by_me = false;
- bool is_friend = (LLAvatarTracker::instance().getBuddyInfo(from_id) == NULL) ? false : true;
+ bool is_friend = LLAvatarTracker::instance().getBuddyInfo(from_id) != NULL;
bool accept_im_from_only_friend = gSavedPerAccountSettings.getBOOL("VoiceCallsFriendsOnly");
bool is_linden = chat.mSourceType != CHAT_SOURCE_OBJECT &&
LLMuteList::isLinden(name);
@@ -640,7 +640,7 @@ void LLIMProcessing::processNewMessage(LLUUID from_id,
{
// aux_id contains group id, binary bucket contains name and asset type
group_id = aux_id;
- has_inventory = binary_bucket_size > 1 ? true : false;
+ has_inventory = binary_bucket_size > 1;
from_group = true; // inaccurate value correction
if (has_inventory)
{
diff --git a/indra/newview/llimview.cpp b/indra/newview/llimview.cpp
index e9b15b2bc1..10fe740138 100644
--- a/indra/newview/llimview.cpp
+++ b/indra/newview/llimview.cpp
@@ -206,26 +206,26 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
if (msg["source_type"].asInteger() == CHAT_SOURCE_OBJECT)
{
user_preferences = gSavedSettings.getString("NotificationObjectIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM") == true))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundObjectIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
}
else
{
- user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM") == true))
+ user_preferences = gSavedSettings.getString("NotificationNearbyChatOptions");
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNearbyChatIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
+ }
}
}
- else if(session->isP2PSessionType())
+ else if (session->isP2PSessionType())
{
if (LLAvatarTracker::instance().isBuddy(participant_id))
{
user_preferences = gSavedSettings.getString("NotificationFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM") == true))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundFriendIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -233,24 +233,24 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
user_preferences = gSavedSettings.getString("NotificationNonFriendIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM") == true))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNonFriendIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
- }
+ }
+ }
}
- else if(session->isAdHocSessionType())
+ else if (session->isAdHocSessionType())
{
user_preferences = gSavedSettings.getString("NotificationConferenceIMOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM") == true))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundConferenceIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
- }
+ }
}
else if(session->isGroupSessionType())
{
user_preferences = gSavedSettings.getString("NotificationGroupChatOptions");
- if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM") == true))
+ if (!gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundGroupChatIM")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
@@ -300,8 +300,7 @@ void notify_of_message(const LLSD& msg, bool is_dnd_msg)
else
{
store_dnd_message = true;
- }
-
+ }
}
// 2. Flash line item
@@ -3162,13 +3161,15 @@ void LLIMMgr::addMessage(
// Fetch group chat history, enabled by default.
if (gSavedPerAccountSettings.getBOOL("FetchGroupChatHistory"))
{
- std::string chat_url = gAgent.getRegion()->getCapability("ChatSessionRequest");
- LLCoros::instance().launch("chatterBoxHistoryCoro",
- boost::bind(&chatterBoxHistoryCoro, chat_url, session_id, from, msg, timestamp));
+ std::string chat_url = gAgent.getRegionCapability("ChatSessionRequest");
+ if (!chat_url.empty())
+ {
+ LLCoros::instance().launch("chatterBoxHistoryCoro", boost::bind(&chatterBoxHistoryCoro, chat_url, session_id, from, msg, timestamp));
+ }
}
//Play sound for new conversations
- if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation") == true))
+ if (!skip_message & !gAgent.isDoNotDisturb() && (gSavedSettings.getBOOL("PlaySoundNewConversation")))
{
make_ui_sound("UISndNewIncomingIMSession");
}
diff --git a/indra/newview/llinspecttexture.cpp b/indra/newview/llinspecttexture.cpp
index 1d712bb7e2..c8a2bdda7f 100644
--- a/indra/newview/llinspecttexture.cpp
+++ b/indra/newview/llinspecttexture.cpp
@@ -84,7 +84,10 @@ LLToolTip* LLInspectTextureUtil::createInventoryToolTip(LLToolTip::Params p)
}
}
}
-
+ if ((!p.message.isProvided() || p.message().empty()))
+ {
+ return NULL;
+ }
// No or more than one texture found => show default tooltip
return LLUICtrlFactory::create<LLToolTip>(p);
}
diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 0dd2b4bcd9..075c11f86f 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -1190,8 +1190,8 @@ void LLInvFVBridge::addMarketplaceContextMenuOptions(U32 flags,
LLInventoryModel::cat_array_t categories;
LLInventoryModel::item_array_t items;
gInventory.collectDescendents(local_version_folder_id, categories, items, false);
- LLCachedControl<U32> max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4);
- LLCachedControl<U32> max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20);
+ static LLCachedControl<U32> max_depth(gSavedSettings, "InventoryOutboxMaxFolderDepth", 4);
+ static LLCachedControl<U32> max_count(gSavedSettings, "InventoryOutboxMaxFolderCount", 20);
if (categories.size() >= max_count
|| depth > (max_depth + 1))
{
@@ -2284,8 +2284,11 @@ bool LLFolderBridge::isItemMovable() const
void LLFolderBridge::selectItem()
{
- // Have no fear: the first thing start() does is to test if everything for that folder has been fetched...
- LLInventoryModelBackgroundFetch::instance().start(getUUID(), true);
+ LLViewerInventoryCategory* cat = gInventory.getCategory(getUUID());
+ if (cat)
+ {
+ cat->fetch();
+ }
}
void LLFolderBridge::buildDisplayName() const
@@ -2810,7 +2813,7 @@ bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
is_movable = can_move_folder_to_marketplace(master_folder, dest_folder, inv_cat, tooltip_msg, bundle_size);
}
- if (is_movable)
+ if (is_movable && !move_is_into_landmarks)
{
LLInventoryPanel* active_panel = LLInventoryPanel::getActiveInventoryPanel(false);
is_movable = active_panel != NULL;
@@ -3027,7 +3030,7 @@ bool LLFolderBridge::dragCategoryIntoFolder(LLInventoryCategory* inv_cat,
return accept;
}
-void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> move_inv)
+void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move_inv)
{
const char* dialog = NULL;
if (object->flagScripted())
@@ -3040,7 +3043,7 @@ void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> mo
}
static LLNotificationPtr notification_ptr;
- static boost::shared_ptr<LLMoveInv> inv_ptr;
+ static std::shared_ptr<LLMoveInv> inv_ptr;
// Notification blocks user from interacting with inventories so everything that comes after first message
// is part of this message - don'r show it again
@@ -3153,7 +3156,7 @@ bool move_inv_category_world_to_agent(const LLUUID& object_id,
if(drop && accept)
{
it = inventory_objects.begin();
- boost::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
+ std::shared_ptr<LLMoveInv> move_inv(new LLMoveInv);
move_inv->mObjectID = object_id;
move_inv->mCategoryID = category_id;
move_inv->mCallback = callback;
@@ -4247,7 +4250,7 @@ bool LLFolderBridge::checkFolderForContentsOfType(LLInventoryModel* model, LLInv
item_array,
LLInventoryModel::EXCLUDE_TRASH,
is_type);
- return ((item_array.size() > 0) ? true : false );
+ return !item_array.empty();
}
void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t& items, menuentry_vec_t& disabled_items)
@@ -5006,7 +5009,7 @@ LLFontGL::StyleFlags LLMarketplaceFolderBridge::getLabelStyle() const
// helper stuff
-bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv> move_inv)
+bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, std::shared_ptr<LLMoveInv> move_inv)
{
LLFloaterOpenObject::LLCatAndWear* cat_and_wear = (LLFloaterOpenObject::LLCatAndWear* )move_inv->mUserData;
LLViewerObject* object = gObjectList.findObject(move_inv->mObjectID);
@@ -5480,7 +5483,7 @@ bool LLFolderBridge::dragItemIntoFolder(LLInventoryItem* inv_item,
if (accept && drop)
{
LLUUID item_id = inv_item->getUUID();
- boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
move_inv->mObjectID = inv_item->getParentUUID();
two_uuids_t item_pair(mUUID, item_id);
move_inv->mMoveList.push_back(item_pair);
@@ -6625,7 +6628,7 @@ LLObjectBridge::LLObjectBridge(LLInventoryPanel* inventory,
LLItemBridge(inventory, root, uuid)
{
mAttachPt = (flags & 0xff); // low bye of inventory flags
- mIsMultiObject = ( flags & LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS ) ? true: false;
+ mIsMultiObject = is_flag_set(flags, LLInventoryItemFlags::II_FLAGS_OBJECT_HAS_MULTIPLE_ITEMS);
mInvType = type;
}
diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h
index 7c7c7efa18..1c58c235b8 100644
--- a/indra/newview/llinventorybridge.h
+++ b/indra/newview/llinventorybridge.h
@@ -793,7 +793,7 @@ struct LLMoveInv
void* mUserData;
};
-void warn_move_inventory(LLViewerObject* object, boost::shared_ptr<LLMoveInv> move_inv);
-bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, boost::shared_ptr<LLMoveInv>);
+void warn_move_inventory(LLViewerObject* object, std::shared_ptr<LLMoveInv> move_inv);
+bool move_task_inventory_callback(const LLSD& notification, const LLSD& response, std::shared_ptr<LLMoveInv>);
#endif // LL_LLINVENTORYBRIDGE_H
diff --git a/indra/newview/llinventoryfilter.cpp b/indra/newview/llinventoryfilter.cpp
index e1cbd291b9..83770e28b6 100644
--- a/indra/newview/llinventoryfilter.cpp
+++ b/indra/newview/llinventoryfilter.cpp
@@ -202,12 +202,18 @@ bool LLInventoryFilter::checkFolder(const LLUUID& folder_id) const
&& !LLInventoryModelBackgroundFetch::instance().inventoryFetchInProgress())
{
LLViewerInventoryCategory* cat = gInventory.getCategory(folder_id);
- if ((!cat && folder_id.notNull()) || (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN))
+ if ((!cat && folder_id.notNull()))
{
- // At the moment background fetch only cares about VERSION_UNKNOWN,
- // so do not check isCategoryComplete that compares descendant count
+ // Shouldn't happen? Server provides full list of folders on startup
LLInventoryModelBackgroundFetch::instance().start(folder_id, false);
}
+ else if (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ // At the moment background fetch only cares about VERSION_UNKNOWN,
+ // so do not check isCategoryComplete that compares descendant count,
+ // but if that is nesesary, do a forced scheduleFolderFetch.
+ cat->fetch();
+ }
}
if (!checkAgainstFilterThumbnails(folder_id))
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index b28b72452e..c7e4926220 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -91,8 +91,6 @@
#include "llvoavatarself.h"
#include "llwearablelist.h"
-#include <boost/foreach.hpp>
-
bool LLInventoryState::sWearNewClothing = false;
LLUUID LLInventoryState::sWearNewClothingTransactionID;
std::list<LLUUID> LLInventoryAction::sMarketplaceFolders;
@@ -462,6 +460,13 @@ void copy_inventory_category(LLInventoryModel* model,
gInventory.createNewCategory(parent_id, LLFolderType::FT_NONE, cat->getName(), func, cat->getThumbnailUUID());
}
+void copy_cb(const LLUUID& dest_folder, const LLUUID& root_id)
+{
+ // Decrement the count in root_id since that one item won't be copied over
+ LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+ update_folder_cb(dest_folder);
+};
+
void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryModel* model, LLViewerInventoryCategory* cat, const LLUUID& root_copy_id, bool move_no_copy_items)
{
model->notifyObservers();
@@ -480,12 +485,21 @@ void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryMode
LLMarketplaceData::instance().setValidationWaiting(root_id, count_descendants_items(cat->getUUID()));
}
+ LLPointer<LLInventoryCallback> cb;
+ if (root_copy_id.isNull())
+ {
+ cb = new LLBoostFuncInventoryCallback(boost::bind(copy_cb, new_cat_uuid, root_id));
+ }
+ else
+ {
+ cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
+ }
+
// Copy all the items
LLInventoryModel::item_array_t item_array_copy = *item_array;
for (LLInventoryModel::item_array_t::iterator iter = item_array_copy.begin(); iter != item_array_copy.end(); iter++)
{
LLInventoryItem* item = *iter;
- LLPointer<LLInventoryCallback> cb = new LLBoostFuncInventoryCallback(boost::bind(update_folder_cb, new_cat_uuid));
if (item->getIsLinkType())
{
@@ -500,8 +514,11 @@ void copy_inventory_category_content(const LLUUID& new_cat_uuid, LLInventoryMode
LLViewerInventoryItem * viewer_inv_item = (LLViewerInventoryItem *)item;
gInventory.changeItemParent(viewer_inv_item, new_cat_uuid, true);
}
- // Decrement the count in root_id since that one item won't be copied over
- LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+ if (root_copy_id.isNull())
+ {
+ // Decrement the count in root_id since that one item won't be copied over
+ LLMarketplaceData::instance().decrementValidationWaiting(root_id);
+ }
}
else
{
@@ -2973,6 +2990,23 @@ bool get_selection_object_uuids(LLFolderView *root, uuid_vec_t& ids)
void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root, const std::string& action, bool user_confirm)
{
std::set<LLFolderViewItem*> selected_items = root->getSelectionList();
+ if (selected_items.empty()
+ && action != "wear"
+ && action != "wear_add"
+ && !isRemoveAction(action))
+ {
+ // Was item removed while user was checking menu?
+ // "wear" and removal exlusions are due to use of
+ // getInventorySelectedUUIDs() below
+ LL_WARNS("Inventory") << "Menu tried to operate on empty selection" << LL_ENDL;
+
+ if (("copy" == action) || ("cut" == action))
+ {
+ LLClipboard::instance().reset();
+ }
+
+ return;
+ }
// Prompt the user and check for authorization for some marketplace active listing edits
if (user_confirm && (("delete" == action) || ("cut" == action) || ("rename" == action) || ("properties" == action) || ("task_properties" == action) || ("open" == action)))
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index aa3d45b7d2..ca9d8ecaf4 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -2452,17 +2452,22 @@ void LLInventoryGallery::startDrag()
}
const LLViewerInventoryCategory* cat = gInventory.getCategory(selected_id);
- if (cat && gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID())
- && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType()))
+ if (cat)
{
- if (cat->getOwnerID() == ALEXANDRIA_LINDEN_ID)
+ if (gInventory.isObjectDescendentOf(selected_id, gInventory.getLibraryRootFolderID()))
{
src = LLToolDragAndDrop::SOURCE_LIBRARY;
+ EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
+ types.push_back(type);
+ ids.push_back(selected_id);
+ }
+ else if (gInventory.isObjectDescendentOf(selected_id, gInventory.getRootFolderID())
+ && !LLFolderType::lookupIsProtectedType((cat)->getPreferredType()))
+ {
+ EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
+ types.push_back(type);
+ ids.push_back(selected_id);
}
-
- EDragAndDropType type = LLViewerAssetType::lookupDragAndDropType(cat->getType());
- types.push_back(type);
- ids.push_back(selected_id);
}
}
LLToolDragAndDrop::getInstance()->beginMultiDrag(types, ids, src);
@@ -3367,7 +3372,7 @@ bool dragItemIntoFolder(LLUUID folder_id, LLInventoryItem* inv_item, bool drop,
if (accept && drop)
{
- boost::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
+ std::shared_ptr<LLMoveInv> move_inv (new LLMoveInv());
move_inv->mObjectID = inv_item->getParentUUID();
std::pair<LLUUID, LLUUID> item_pair(folder_id, inv_item->getUUID());
move_inv->mMoveList.push_back(item_pair);
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 1508b81494..b8bef6361f 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -1593,7 +1593,7 @@ LLInventoryModel::cat_array_t* LLInventoryModel::getUnlockedCatArray(const LLUUI
cat_array_t* cat_array = get_ptr_in_map(mParentChildCategoryTree, id);
if (cat_array)
{
- llassert_always(mCategoryLock[id] == false);
+ llassert_always(!mCategoryLock[id]);
}
return cat_array;
}
@@ -1603,7 +1603,7 @@ LLInventoryModel::item_array_t* LLInventoryModel::getUnlockedItemArray(const LLU
item_array_t* item_array = get_ptr_in_map(mParentChildItemTree, id);
if (item_array)
{
- llassert_always(mItemLock[id] == false);
+ llassert_always(!mItemLock[id]);
}
return item_array;
}
@@ -1675,8 +1675,8 @@ void LLInventoryModel::updateCategory(const LLViewerInventoryCategory* cat, U32
}
// make space in the tree for this category's children.
- llassert_always(mCategoryLock[new_cat->getUUID()] == false);
- llassert_always(mItemLock[new_cat->getUUID()] == false);
+ llassert_always(!mCategoryLock[new_cat->getUUID()]);
+ llassert_always(!mItemLock[new_cat->getUUID()]);
cat_array_t* catsp = new cat_array_t;
item_array_t* itemsp = new item_array_t;
mParentChildCategoryTree[new_cat->getUUID()] = catsp;
@@ -2955,13 +2955,13 @@ void LLInventoryModel::buildParentChildMap()
cats.push_back(cat);
if (mParentChildCategoryTree.count(cat->getUUID()) == 0)
{
- llassert_always(mCategoryLock[cat->getUUID()] == false);
+ llassert_always(!mCategoryLock[cat->getUUID()]);
catsp = new cat_array_t;
mParentChildCategoryTree[cat->getUUID()] = catsp;
}
if (mParentChildItemTree.count(cat->getUUID()) == 0)
{
- llassert_always(mItemLock[cat->getUUID()] == false);
+ llassert_always(!mItemLock[cat->getUUID()]);
itemsp = new item_array_t;
mParentChildItemTree[cat->getUUID()] = itemsp;
}
@@ -3550,6 +3550,9 @@ void LLInventoryModel::processUpdateCreateInventoryItem(LLMessageSystem* msg, vo
gInventoryCallbacks.fire(callback_id, item_id);
+ // Message system at the moment doesn't support Thumbnails and potential
+ // newer features so just rerequest whole item
+ //
// todo: instead of unpacking message fully,
// grab only an item_id, then fetch
LLInventoryModelBackgroundFetch::instance().scheduleItemFetch(item_id, true);
@@ -3912,19 +3915,22 @@ void LLInventoryModel::processBulkUpdateInventory(LLMessageSystem* msg, void**)
for (cat_array_t::iterator cit = folders.begin(); cit != folders.end(); ++cit)
{
- gInventory.updateCategory(*cit);
-
- // Temporary workaround: just fetch the item using AIS to get missing fields.
- // If this works fine we might want to extract ids only from the message
- // then use AIS as a primary fetcher
- LLInventoryModelBackgroundFetch::instance().scheduleFolderFetch((*cit)->getUUID(), true /*force, since it has changes*/);
+ gInventory.updateCategory(*cit);
+ if ((*cit)->getVersion() != LLViewerInventoryCategory::VERSION_UNKNOWN)
+ {
+ // Temporary workaround: just fetch the item using AIS to get missing fields.
+ // If this works fine we might want to extract 'ids only' from the message
+ // then use AIS as a primary fetcher
+ LLInventoryModelBackgroundFetch::instance().scheduleFolderFetch((*cit)->getUUID(), true /*force, since it has changes*/);
+ }
+ // else already called fetch() above
}
for (item_array_t::iterator iit = items.begin(); iit != items.end(); ++iit)
{
gInventory.updateItem(*iit);
// Temporary workaround: just fetch the item using AIS to get missing fields.
- // If this works fine we might want to extract ids only from the message
+ // If this works fine we might want to extract 'ids only' from the message
// then use AIS as a primary fetcher
LLInventoryModelBackgroundFetch::instance().scheduleItemFetch((*iit)->getUUID(), true);
}
diff --git a/indra/newview/llinventorymodelbackgroundfetch.cpp b/indra/newview/llinventorymodelbackgroundfetch.cpp
index 920d5df1af..486b71120c 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.cpp
+++ b/indra/newview/llinventorymodelbackgroundfetch.cpp
@@ -193,13 +193,16 @@ LLInventoryModelBackgroundFetch::LLInventoryModelBackgroundFetch():
mLastFetchCount(0),
mFetchFolderCount(0),
mAllRecursiveFoldersFetched(false),
- mRecursiveInventoryFetchStarted(false),
- mRecursiveLibraryFetchStarted(false),
- mMinTimeBetweenFetches(0.3f)
+ mRecursiveInventoryFetchStarted(false),
+ mRecursiveLibraryFetchStarted(false),
+ mRecursiveMarketplaceFetchStarted(false),
+ mMinTimeBetweenFetches(0.3f)
{}
LLInventoryModelBackgroundFetch::~LLInventoryModelBackgroundFetch()
-{}
+{
+ gIdleCallbacks.deleteFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+}
bool LLInventoryModelBackgroundFetch::isBulkFetchProcessingComplete() const
{
@@ -314,6 +317,23 @@ void LLInventoryModelBackgroundFetch::start(const LLUUID& id, bool recursive)
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
}
+ else if (recursive && cat && cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
+ {
+ if (mFetchFolderQueue.empty() || mFetchFolderQueue.back().mUUID != id)
+ {
+ if (recursive && AISAPI::isAvailable())
+ {
+ // Request marketplace folder and content separately
+ mFetchFolderQueue.push_front(FetchQueueInfo(id, FT_FOLDER_AND_CONTENT));
+ }
+ else
+ {
+ mFetchFolderQueue.push_front(FetchQueueInfo(id, recursion_type));
+ }
+ gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
+ mRecursiveMarketplaceFetchStarted = true;
+ }
+ }
else
{
if (AISAPI::isAvailable())
@@ -359,8 +379,22 @@ void LLInventoryModelBackgroundFetch::scheduleFolderFetch(const LLUUID& cat_id,
mBackgroundFetchActive = true;
mFolderFetchActive = true;
- // Specific folder requests go to front of queue.
- mFetchFolderQueue.push_front(FetchQueueInfo(cat_id, forced ? FT_FORCED : FT_DEFAULT));
+ if (forced)
+ {
+ // check if already requested
+ if (mForceFetchSet.find(cat_id) == mForceFetchSet.end())
+ {
+ mForceFetchSet.insert(cat_id);
+ mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_FORCED));
+ }
+ }
+ else
+ {
+ // Specific folder requests go to front of queue.
+ // version presence acts as dupplicate prevention for normal fetches
+ mFetchItemQueue.push_front(FetchQueueInfo(cat_id, FT_DEFAULT));
+ }
+
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
}
@@ -370,8 +404,21 @@ void LLInventoryModelBackgroundFetch::scheduleItemFetch(const LLUUID& item_id, b
if (mFetchItemQueue.empty() || mFetchItemQueue.front().mUUID != item_id)
{
mBackgroundFetchActive = true;
+ if (forced)
+ {
+ // check if already requested
+ if (mForceFetchSet.find(item_id) == mForceFetchSet.end())
+ {
+ mForceFetchSet.insert(item_id);
+ mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_FORCED, false));
+ }
+ }
+ else
+ {
+ // 'isFinished' being set acts as dupplicate prevention for normal fetches
+ mFetchItemQueue.push_front(FetchQueueInfo(item_id, FT_DEFAULT, false));
+ }
- mFetchItemQueue.push_front(FetchQueueInfo(item_id, forced ? FT_FORCED : FT_DEFAULT, false));
gIdleCallbacks.addFunction(&LLInventoryModelBackgroundFetch::backgroundFetchCB, NULL);
}
}
@@ -591,6 +638,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
return;
}
+ LLViewerInventoryCategory::EFetchType new_state = LLViewerInventoryCategory::FETCH_NONE;
bool request_descendants = false;
if (response_id.isNull()) // Failure
{
@@ -608,10 +656,12 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
// set folder's version to prevent viewer from trying to request folder indefinetely
LLViewerInventoryCategory* cat(gInventory.getCategory(request_id));
- if (cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
+ if (cat && cat->getVersion() == LLViewerInventoryCategory::VERSION_UNKNOWN)
{
cat->setVersion(0);
}
+ // back off for a bit in case something tries to force-request immediately
+ new_state = LLViewerInventoryCategory::FETCH_FAILED;
}
}
else
@@ -664,7 +714,7 @@ void LLInventoryModelBackgroundFetch::onAISFolderCalback(const LLUUID &request_i
LLViewerInventoryCategory * cat(gInventory.getCategory(request_id));
if (cat)
{
- cat->setFetching(LLViewerInventoryCategory::FETCH_NONE);
+ cat->setFetching(new_state);
}
}
@@ -753,7 +803,26 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis()
if (isFolderFetchProcessingComplete() && mFolderFetchActive)
{
- setAllFoldersFetched();
+ if (!mRecursiveInventoryFetchStarted || mRecursiveMarketplaceFetchStarted)
+ {
+ setAllFoldersFetched();
+ }
+ else
+ {
+ // Intent is for marketplace request to happen after
+ // main inventory is done, unless requested by floater
+ mRecursiveMarketplaceFetchStarted = true;
+ const LLUUID& marketplacelistings_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_MARKETPLACE_LISTINGS);
+ if (marketplacelistings_id.notNull())
+ {
+ mFetchFolderQueue.push_front(FetchQueueInfo(marketplacelistings_id, FT_FOLDER_AND_CONTENT));
+ }
+ else
+ {
+ setAllFoldersFetched();
+ }
+ }
+
}
if (isBulkFetchProcessingComplete())
@@ -813,22 +882,8 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
if (child_cat->getPreferredType() == LLFolderType::FT_MARKETPLACE_LISTINGS)
{
- // special case
- content_done = false;
- if (children.empty())
- {
- // fetch marketplace alone
- // Should it actually be fetched as FT_FOLDER_AND_CONTENT?
- children.push_back(child_cat->getUUID());
- mExpectedFolderIds.push_back(child_cat->getUUID());
- child_cat->setFetching(target_state);
- break;
- }
- else
- {
- // fetch marketplace alone next run
- continue;
- }
+ // special case, marketplace will fetch that as needed
+ continue;
}
children.push_back(child_cat->getUUID());
@@ -902,10 +957,10 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
mExpectedFolderIds.push_back(cat_id);
EFetchType type = fetch_info.mFetchType;
- LLUUID cat_id = cat->getUUID();
- AISAPI::completion_t cb = [cat_id , type](const LLUUID& response_id)
+ LLUUID cat_cb_id = cat_id;
+ AISAPI::completion_t cb = [cat_cb_id, type](const LLUUID& response_id)
{
- LLInventoryModelBackgroundFetch::instance().onAISFolderCalback(cat_id , response_id , type);
+ LLInventoryModelBackgroundFetch::instance().onAISFolderCalback(cat_cb_id, response_id , type);
};
AISAPI::ITEM_TYPE item_type = AISAPI::INVENTORY;
@@ -964,6 +1019,11 @@ void LLInventoryModelBackgroundFetch::bulkFetchViaAis(const FetchQueueInfo& fetc
AISAPI::FetchItem(fetch_info.mUUID, AISAPI::INVENTORY, ais_simple_item_callback);
}
}
+
+ if (fetch_info.mFetchType == FT_FORCED)
+ {
+ mForceFetchSet.erase(fetch_info.mUUID);
+ }
}
// Bundle up a bunch of requests to send all at once.
diff --git a/indra/newview/llinventorymodelbackgroundfetch.h b/indra/newview/llinventorymodelbackgroundfetch.h
index 4054042a45..831ab80dba 100644
--- a/indra/newview/llinventorymodelbackgroundfetch.h
+++ b/indra/newview/llinventorymodelbackgroundfetch.h
@@ -76,7 +76,6 @@ public:
void incrFetchFolderCount(S32 fetching);
bool isBulkFetchProcessingComplete() const;
- bool isFolderFetchProcessingComplete() const;
void setAllFoldersFetched();
typedef boost::function<void()> folders_fetched_callback_t;
@@ -86,6 +85,7 @@ public:
void addRequestAtBack(const LLUUID & id, bool recursive, bool is_category);
protected:
+ bool isFolderFetchProcessingComplete() const;
typedef enum {
FT_DEFAULT = 0,
@@ -122,6 +122,7 @@ protected:
private:
bool mRecursiveInventoryFetchStarted;
bool mRecursiveLibraryFetchStarted;
+ bool mRecursiveMarketplaceFetchStarted; // AIS3 specific
bool mAllRecursiveFoldersFetched;
typedef boost::signals2::signal<void()> folders_fetched_signal_t;
folders_fetched_signal_t mFoldersFetchedSignal;
@@ -136,6 +137,7 @@ private:
F32 mMinTimeBetweenFetches;
fetch_queue_t mFetchFolderQueue;
fetch_queue_t mFetchItemQueue;
+ uuid_set_t mForceFetchSet;
std::list<LLUUID> mExpectedFolderIds; // for debug, should this track time?
};
diff --git a/indra/newview/llinventoryobserver.cpp b/indra/newview/llinventoryobserver.cpp
index 61729b1473..d80574d14c 100644
--- a/indra/newview/llinventoryobserver.cpp
+++ b/indra/newview/llinventoryobserver.cpp
@@ -356,7 +356,6 @@ void LLInventoryFetchItemsObserver::startFetch()
{
// Start fetching whole folder since we need all items
LLInventoryModelBackgroundFetch::getInstance()->scheduleFolderFetch(folder.first, true);
-
}
else
{
diff --git a/indra/newview/lllogchat.cpp b/indra/newview/lllogchat.cpp
index 3982e0fbee..8940117f0d 100644
--- a/indra/newview/lllogchat.cpp
+++ b/indra/newview/lllogchat.cpp
@@ -42,7 +42,6 @@
#include <boost/algorithm/string/trim.hpp>
#include <boost/algorithm/string/replace.hpp>
#include <boost/regex.hpp>
-#include <boost/foreach.hpp>
#if LL_MSVC
#pragma warning(push)
@@ -709,7 +708,7 @@ bool LLLogChat::moveTranscripts(const std::string originDirectory,
std::string backupFileName;
unsigned backupFileCount;
- BOOST_FOREACH(const std::string& fullpath, listOfFilesToMove)
+ for (const std::string& fullpath : listOfFilesToMove)
{
backupFileCount = 0;
newFullPath = targetDirectory + fullpath.substr(originDirectory.length(), std::string::npos);
@@ -723,7 +722,7 @@ bool LLLogChat::moveTranscripts(const std::string originDirectory,
while(LLFile::isfile(backupFileName))
{
++backupFileCount;
- backupFileName = newFullPath + ".backup" + boost::lexical_cast<std::string>(backupFileCount);
+ backupFileName = newFullPath + ".backup" + std::to_string(backupFileCount);
}
//Rename the file to its backup name so it is not overwritten
@@ -780,7 +779,7 @@ void LLLogChat::deleteTranscripts()
getListOfTranscriptFiles(list_of_transcriptions);
getListOfTranscriptBackupFiles(list_of_transcriptions);
- BOOST_FOREACH(const std::string& fullpath, list_of_transcriptions)
+ for (const std::string& fullpath : list_of_transcriptions)
{
S32 retry_count = 0;
while (retry_count < 5)
diff --git a/indra/newview/lllogininstance.h b/indra/newview/lllogininstance.h
index 2e9aab7c00..74d6890d1d 100644
--- a/indra/newview/lllogininstance.h
+++ b/indra/newview/lllogininstance.h
@@ -90,7 +90,7 @@ private:
void attemptComplete() { mAttemptComplete = true; } // In the future an event?
- boost::scoped_ptr<LLLogin> mLoginModule;
+ std::unique_ptr<LLLogin> mLoginModule;
LLNotificationsInterface* mNotifications;
std::string mLoginState;
diff --git a/indra/newview/llmachineid.cpp b/indra/newview/llmachineid.cpp
index 583742f970..1f4418f119 100644
--- a/indra/newview/llmachineid.cpp
+++ b/indra/newview/llmachineid.cpp
@@ -85,11 +85,11 @@ void LLWMIMethods::initCOMObjects()
// Step 1: --------------------------------------------------
// Initialize COM. ------------------------------------------
- mHR = CoInitializeEx(0, COINIT_MULTITHREADED);
+ mHR = CoInitializeEx(0, COINIT_APARTMENTTHREADED);
if (FAILED(mHR))
{
+ // if result S_FALSE, it's already initialized
LL_DEBUGS("AppInit") << "Failed to initialize COM library. Error code = 0x" << std::hex << mHR << LL_ENDL;
- return;
}
// Step 2: --------------------------------------------------
diff --git a/indra/newview/llmarketplacefunctions.cpp b/indra/newview/llmarketplacefunctions.cpp
index 2c98ba3d42..1f29058474 100644
--- a/indra/newview/llmarketplacefunctions.cpp
+++ b/indra/newview/llmarketplacefunctions.cpp
@@ -609,27 +609,17 @@ private:
static void onIdleProcessQueue(void *userdata);
// doesn't hold just marketplace related ids
- static std::set<LLUUID> sAddQueue;
static std::set<LLUUID> sStructureQueue;
static bool sProcessingQueue;
};
-std::set<LLUUID> LLMarketplaceInventoryObserver::sAddQueue;
std::set<LLUUID> LLMarketplaceInventoryObserver::sStructureQueue;
bool LLMarketplaceInventoryObserver::sProcessingQueue = false;
void LLMarketplaceInventoryObserver::changed(U32 mask)
{
- if (mask & LLInventoryObserver::ADD && LLMarketplaceData::instance().hasValidationWaiting())
- {
- // When things are added to the marketplace, we might need to re-validate and fix the containing listings
- // just add whole list even if it contains items and non-marketplace folders
- const std::set<LLUUID>& changed_items = gInventory.getChangedIDs();
- sAddQueue.insert(changed_items.begin(), changed_items.end());
- }
-
- if (mask & (LLInventoryObserver::INTERNAL | LLInventoryObserver::STRUCTURE))
- {
+ if (mask & (LLInventoryObserver::INTERNAL | LLInventoryObserver::STRUCTURE))
+ {
// When things are changed in the inventory, this can trigger a host of changes in the marketplace listings folder:
// * stock counts changing : no copy items coming in and out will change the stock count on folders
// * version and listing folders : moving those might invalidate the marketplace data itself
@@ -639,7 +629,7 @@ void LLMarketplaceInventoryObserver::changed(U32 mask)
sStructureQueue.insert(changed_items.begin(), changed_items.end());
}
- if (!sProcessingQueue && (!sAddQueue.empty() || !sStructureQueue.empty()))
+ if (!sProcessingQueue && !sStructureQueue.empty())
{
gIdleCallbacks.addFunction(onIdleProcessQueue, NULL);
// can do without sProcessingQueue, but it's usufull for simplicity and reliability
@@ -653,40 +643,6 @@ void LLMarketplaceInventoryObserver::onIdleProcessQueue(void *userdata)
const U64 MAX_PROCESSING_TIME = 1000;
U64 stop_time = start_time + MAX_PROCESSING_TIME;
- if (!sAddQueue.empty())
- {
- // Make a copy of sAddQueue since decrementValidationWaiting
- // can theoretically add more items
- std::set<LLUUID> add_queue(sAddQueue);
- sAddQueue.clear();
-
- std::set<LLUUID>::const_iterator id_it = add_queue.begin();
- std::set<LLUUID>::const_iterator id_end = add_queue.end();
- // First, count the number of items in this list...
- S32 count = 0;
- for (; id_it != id_end; ++id_it)
- {
- LLInventoryObject* obj = gInventory.getObject(*id_it);
- if (obj && (LLAssetType::AT_CATEGORY != obj->getType()))
- {
- count++;
- }
- }
- // Then, decrement the folders of that amount
- // Note that of all of those, only one folder will be a listing folder (if at all).
- // The other will be ignored by the decrement method.
- id_it = add_queue.begin();
- for (; id_it != id_end; ++id_it)
- {
- LLInventoryObject* obj = gInventory.getObject(*id_it);
- if (obj && (LLAssetType::AT_CATEGORY == obj->getType()))
- {
- // can trigger notifyObservers
- LLMarketplaceData::instance().decrementValidationWaiting(obj->getUUID(), count);
- }
- }
- }
-
while (!sStructureQueue.empty() && LLTimer::getTotalTime() < stop_time)
{
std::set<LLUUID>::const_iterator id_it = sStructureQueue.begin();
@@ -720,7 +676,7 @@ void LLMarketplaceInventoryObserver::onIdleProcessQueue(void *userdata)
sStructureQueue.erase(id_it);
}
- if (LLApp::isExiting() || (sAddQueue.empty() && sStructureQueue.empty()))
+ if (LLApp::isExiting() || sStructureQueue.empty())
{
// Nothing to do anymore
gIdleCallbacks.deleteFunction(onIdleProcessQueue, NULL);
diff --git a/indra/newview/llmarketplacenotifications.cpp b/indra/newview/llmarketplacenotifications.cpp
index 0886f9a990..02bd9e1f34 100644
--- a/indra/newview/llmarketplacenotifications.cpp
+++ b/indra/newview/llmarketplacenotifications.cpp
@@ -33,7 +33,6 @@
#include "llerror.h"
-#include <boost/foreach.hpp>
#include <boost/signals2.hpp>
@@ -54,7 +53,7 @@ namespace LLMarketplaceInventoryNotifications
llassert(!no_copy_payloads.empty());
llassert(no_copy_cb_action != NULL);
- BOOST_FOREACH(const LLSD& payload, no_copy_payloads)
+ for (const LLSD& payload : no_copy_payloads)
{
(*no_copy_cb_action)(payload);
}
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 06876d84df..98d2a6d375 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2658,7 +2658,7 @@ const std::string LLMaterialEditor::getImageNameFromUri(std::string image_uri, c
}
// uri doesn't include the type at all
- if (name_includes_type == false)
+ if (!name_includes_type)
{
// uri doesn't include the type and the uri is not empty
// so we can include everything
diff --git a/indra/newview/llmaterialmgr.cpp b/indra/newview/llmaterialmgr.cpp
index 3b59b2f05e..577ab0048f 100644
--- a/indra/newview/llmaterialmgr.cpp
+++ b/indra/newview/llmaterialmgr.cpp
@@ -68,7 +68,7 @@ class LLMaterialHttpHandler : public LLHttpSDHandler
{
public:
typedef boost::function<void(bool, const LLSD&)> CallbackFunction;
- typedef boost::shared_ptr<LLMaterialHttpHandler> ptr_t;
+ typedef std::shared_ptr<LLMaterialHttpHandler> ptr_t;
LLMaterialHttpHandler(const std::string& method, CallbackFunction cback);
diff --git a/indra/newview/llmediactrl.cpp b/indra/newview/llmediactrl.cpp
index 72fbab406b..5461f98624 100644
--- a/indra/newview/llmediactrl.cpp
+++ b/indra/newview/llmediactrl.cpp
@@ -633,7 +633,7 @@ void LLMediaCtrl::navigateTo( std::string url_in, std::string mime_type, bool cl
void LLMediaCtrl::navigateToLocalPage( const std::string& subdir, const std::string& filename_in )
{
std::string filename(gDirUtilp->add(subdir, filename_in));
- std::string expanded_filename = gDirUtilp->findSkinnedFilename(LLDir::HTML, filename);
+ std::string expanded_filename = gDirUtilp->findSkinnedFilename("html", filename);
if (expanded_filename.empty())
{
diff --git a/indra/newview/llmediadataclient.h b/indra/newview/llmediadataclient.h
index cd45825c77..8c4b3cff90 100644
--- a/indra/newview/llmediadataclient.h
+++ b/indra/newview/llmediadataclient.h
@@ -116,10 +116,10 @@ protected:
// Request (pure virtual base class for requests in the queue)
class Request:
- public boost::enable_shared_from_this<Request>
+ public std::enable_shared_from_this<Request>
{
public:
- typedef boost::shared_ptr<Request> ptr_t;
+ typedef std::shared_ptr<Request> ptr_t;
// Subclasses must implement this to build a payload for their request type.
virtual LLSD getPayload() const = 0;
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 6ec69268d0..9a2f47cc8d 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -411,7 +411,7 @@ namespace {
static S32 dump_num = 0;
std::string make_dump_name(std::string prefix, S32 num)
{
- return prefix + boost::lexical_cast<std::string>(num) + std::string(".xml");
+ return prefix + std::to_string(num) + std::string(".xml");
}
void dump_llsd_to_file(const LLSD& content, std::string filename);
LLSD llsd_from_file(std::string filename);
@@ -572,10 +572,10 @@ S32 LLMeshRepoThread::sRequestWaterLevel = 0;
// LLMeshUploadThread
class LLMeshHandlerBase : public LLCore::HttpHandler,
- public boost::enable_shared_from_this<LLMeshHandlerBase>
+ public std::enable_shared_from_this<LLMeshHandlerBase>
{
public:
- typedef boost::shared_ptr<LLMeshHandlerBase> ptr_t;
+ typedef std::shared_ptr<LLMeshHandlerBase> ptr_t;
LOG_CLASS(LLMeshHandlerBase);
LLMeshHandlerBase(U32 offset, U32 requested_bytes)
@@ -1355,7 +1355,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
{
//check cache for mesh skin info
LLFileSystem file(mesh_id, LLAssetType::AT_MESH);
- if (file.getSize() >= offset+size)
+ if (file.getSize() >= offset + size)
{
U8* buffer = new(std::nothrow) U8[size];
if (!buffer)
@@ -1372,7 +1372,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
- zero = buffer[i] > 0 ? false : true;
+ zero = buffer[i] == 0;
}
if (!zero)
@@ -1486,7 +1486,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
- zero = buffer[i] > 0 ? false : true;
+ zero = buffer[i] == 0;
}
if (!zero)
@@ -1584,7 +1584,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
- zero = buffer[i] > 0 ? false : true;
+ zero = buffer[i] == 0;
}
if (!zero)
@@ -1784,7 +1784,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
bool zero = true;
for (S32 i = 0; i < llmin(size, 1024) && zero; ++i)
{
- zero = buffer[i] > 0 ? false : true;
+ zero = buffer[i] == 0;
}
if (!zero)
diff --git a/indra/newview/llmodelpreview.cpp b/indra/newview/llmodelpreview.cpp
index d5636980b0..c94f87bddc 100644
--- a/indra/newview/llmodelpreview.cpp
+++ b/indra/newview/llmodelpreview.cpp
@@ -68,6 +68,8 @@
#include "lltabcontainer.h"
#include "lltextbox.h"
+#include <filesystem>
+
#include <boost/algorithm/string.hpp>
bool LLModelPreview::sIgnoreLoadedCallback = false;
@@ -220,6 +222,16 @@ LLModelPreview::~LLModelPreview()
mPreviewAvatar->markDead();
mPreviewAvatar = NULL;
}
+
+ mUploadData.clear();
+ mTextureSet.clear();
+
+ for (U32 i = 0; i < LLModel::NUM_LODS; i++)
+ {
+ clearModel(i);
+ }
+ mBaseModel.clear();
+ mBaseScene.clear();
}
void LLModelPreview::updateDimentionsAndOffsets()
@@ -1057,6 +1069,29 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
{ //only replace given LoD
mModel[loaded_lod] = mModelLoader->mModelList;
mScene[loaded_lod] = mModelLoader->mScene;
+
+ // Duplicate the model if it is an internal bounding box model
+ if (loaded_lod == LLModel::LOD_PHYSICS &&
+ mBaseModel.size() > 1 && // This makes sense for multiple models only
+ mModelLoader->mModelList.size() == 1 && // Just on the off-chance
+ mModelLoader->mScene.size() == 1 && // Just on the off-chance
+ std::filesystem::path(mModelLoader->mFilename).filename() == "cube.dae")
+ {
+ // Create a copy of the just loaded model for each model in mBaseModel
+ const LLModel* origin = mModelLoader->mModelList.front();
+ const LLModelInstance& mi = mModelLoader->mScene.begin()->second.front();
+ for (U32 i = 1; i < mBaseModel.size(); ++i)
+ {
+ LLPointer<LLModel> copy(new LLModel(origin->getParams(), origin->getDetail()));
+ copy->mLabel = origin->mLabel;
+ copy->copyVolumeFaces(origin);
+ copy->mPosition = origin->mPosition;
+ copy->mMaterialList = origin->mMaterialList;
+ mModel[loaded_lod].push_back(copy);
+ mScene[loaded_lod][mi.mTransform].push_back(LLModelInstance(copy, copy->mLabel, mi.mTransform, mi.mMaterial));
+ }
+ }
+
mVertexBuffer[loaded_lod].clear();
setPreviewLOD(loaded_lod);
@@ -1153,6 +1188,17 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod)
LLFloaterModelPreview::addStringToLog(out, false);
}
mModel[loaded_lod][idx]->mLabel = name;
+ // Rename the correspondent instance as well
+ [&]()
+ {
+ for (auto& p : mScene[loaded_lod])
+ for (auto& i : p.second)
+ if (i.mModel == mModel[loaded_lod][idx])
+ {
+ i.mLabel = name;
+ return;
+ }
+ }();
}
}
}
diff --git a/indra/newview/llmodelpreview.h b/indra/newview/llmodelpreview.h
index 43b0ae785e..c4876ba8c4 100644
--- a/indra/newview/llmodelpreview.h
+++ b/indra/newview/llmodelpreview.h
@@ -310,7 +310,6 @@ protected:
vv_LLVolumeFace_t mBaseModelFacesCopy;
U32 mGroup;
- std::map<LLPointer<LLModel>, U32> mObject;
// Amount of triangles in original(base) model
U32 mMaxTriangleLimit;
diff --git a/indra/newview/llnotificationhandlerutil.cpp b/indra/newview/llnotificationhandlerutil.cpp
index 01a1361ceb..739144a377 100644
--- a/indra/newview/llnotificationhandlerutil.cpp
+++ b/indra/newview/llnotificationhandlerutil.cpp
@@ -60,11 +60,9 @@ bool LLHandlerUtil::isIMFloaterOpened(const LLNotificationPtr& notification)
LLUUID from_id = notification->getPayload()["from_id"];
LLUUID session_id = LLIMMgr::computeSessionID(IM_NOTHING_SPECIAL, from_id);
- LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id);
-
- if (im_floater != NULL)
+ if (LLFloaterIMSession* im_floater = LLFloaterReg::findTypedInstance<LLFloaterIMSession>("impanel", session_id))
{
- res = im_floater->getVisible() == true;
+ res = im_floater->getVisible();
}
return res;
diff --git a/indra/newview/llnotificationlistitem.cpp b/indra/newview/llnotificationlistitem.cpp
index 79a90c4f4c..75edac105a 100644
--- a/indra/newview/llnotificationlistitem.cpp
+++ b/indra/newview/llnotificationlistitem.cpp
@@ -594,7 +594,7 @@ LLSystemNotificationListItem::LLSystemNotificationListItem(const Params& p)
mSystemNotificationIcon(NULL),
mIsCaution(false)
{
- buildFromFile("panel_notification_list_item.xml", true);
+ buildFromFile("panel_notification_list_item.xml");
mIsCaution = p.notification_priority >= NOTIFICATION_PRIORITY_HIGH;
if (mIsCaution)
{
diff --git a/indra/newview/llnotificationmanager.cpp b/indra/newview/llnotificationmanager.cpp
index b06131cf38..3f6a86106a 100644
--- a/indra/newview/llnotificationmanager.cpp
+++ b/indra/newview/llnotificationmanager.cpp
@@ -34,9 +34,6 @@
#include "llfloaterimnearbychathandler.h"
#include "llnotifications.h"
-#include <boost/bind.hpp>
-#include <boost/foreach.hpp>
-
using namespace LLNotificationsUI;
//--------------------------------------------------------------------------
@@ -53,15 +50,15 @@ LLNotificationManager::~LLNotificationManager()
//--------------------------------------------------------------------------
void LLNotificationManager::init()
{
- mChannels.push_back(new LLScriptHandler());
- mChannels.push_back(new LLTipHandler());
- mChannels.push_back(new LLGroupHandler());
- mChannels.push_back(new LLAlertHandler("Alerts", "alert", false));
- mChannels.push_back(new LLAlertHandler("AlertModal", "alertmodal", true));
- mChannels.push_back(new LLOfferHandler());
- mChannels.push_back(new LLHintHandler());
- mChannels.push_back(new LLBrowserNotification());
- mChannels.push_back(new LLIMHandler());
+ mChannels.emplace_back(new LLScriptHandler());
+ mChannels.emplace_back(new LLTipHandler());
+ mChannels.emplace_back(new LLGroupHandler());
+ mChannels.emplace_back(new LLAlertHandler("Alerts", "alert", false));
+ mChannels.emplace_back(new LLAlertHandler("AlertModal", "alertmodal", true));
+ mChannels.emplace_back(new LLOfferHandler());
+ mChannels.emplace_back(new LLHintHandler());
+ mChannels.emplace_back(new LLBrowserNotification());
+ mChannels.emplace_back(new LLIMHandler());
mChatHandler = std::shared_ptr<LLFloaterIMNearbyChatHandler>(new LLFloaterIMNearbyChatHandler());
}
diff --git a/indra/newview/llnotificationofferhandler.cpp b/indra/newview/llnotificationofferhandler.cpp
index 3f22467544..578af50ed8 100644
--- a/indra/newview/llnotificationofferhandler.cpp
+++ b/indra/newview/llnotificationofferhandler.cpp
@@ -70,20 +70,19 @@ void LLOfferHandler::initChannel()
//--------------------------------------------------------------------------
bool LLOfferHandler::processNotification(const LLNotificationPtr& notification, bool should_log)
{
- if(mChannel.isDead())
+ if (mChannel.isDead())
{
return false;
}
// arrange a channel on a screen
- if(!mChannel.get()->getVisible())
+ if (!mChannel.get()->getVisible())
{
initChannel();
}
-
- if( notification->getPayload().has("give_inventory_notification")
- && notification->getPayload()["give_inventory_notification"].asBoolean() == false)
+ if (notification->getPayload().has("give_inventory_notification") &&
+ !notification->getPayload()["give_inventory_notification"].asBoolean())
{
// This is an original inventory offer, so add a script floater
LLScriptFloaterManager::instance().onAddNotification(notification->getID());
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index bd5703ecb5..51ff664913 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -28,8 +28,6 @@
#include "llviewerprecompiledheaders.h" // must be first include
#include "lloutfitgallery.h"
-#include <boost/foreach.hpp>
-
// llcommon
#include "llcommonutils.h"
#include "llfilesystem.h"
@@ -1151,22 +1149,13 @@ LLContextMenu* LLOutfitGalleryContextMenu::createMenu()
registrar.add("Outfit.Delete", boost::bind(LLOutfitGallery::onRemoveOutfit, selected_id));
registrar.add("Outfit.Create", boost::bind(&LLOutfitGalleryContextMenu::onCreate, this, _2));
registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitGalleryContextMenu::onThumbnail, this, selected_id));
+ registrar.add("Outfit.Save", boost::bind(&LLOutfitGalleryContextMenu::onSave, this, selected_id));
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitGalleryContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitGalleryContextMenu::onVisible, this, _2));
return createFromFile("menu_gallery_outfit_tab.xml");
}
-void LLOutfitGalleryContextMenu::onThumbnail(const LLUUID& outfit_cat_id)
-{
- LLOutfitGallery* gallery = dynamic_cast<LLOutfitGallery*>(mOutfitList);
- if (gallery && outfit_cat_id.notNull())
- {
- LLSD data(outfit_cat_id);
- LLFloaterReg::showInstance("change_item_thumbnail", data);
- }
-}
-
void LLOutfitGalleryContextMenu::onCreate(const LLSD& data)
{
LLWearableType::EType type = LLWearableType::getInstance()->typeNameToType(data.asString());
@@ -1249,7 +1238,7 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
sub_cat_array,
outfit_item_array,
LLInventoryModel::EXCLUDE_TRASH);
- BOOST_FOREACH(LLViewerInventoryItem* outfit_item, outfit_item_array)
+ for (LLViewerInventoryItem* outfit_item : outfit_item_array)
{
LLViewerInventoryItem* linked_item = outfit_item->getLinkedItem();
LLUUID asset_id, inv_id;
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index badaa8bd19..0b1eacd289 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -193,17 +193,13 @@ public:
friend class LLOutfitGallery;
LLOutfitGalleryContextMenu(LLOutfitListBase* outfit_list)
- : LLOutfitContextMenu(outfit_list),
- mOutfitList(outfit_list){}
+ : LLOutfitContextMenu(outfit_list){}
protected:
/* virtual */ LLContextMenu* createMenu();
bool onEnable(LLSD::String param);
bool onVisible(LLSD::String param);
- void onThumbnail(const LLUUID& outfit_cat_id);
void onCreate(const LLSD& data);
-private:
- LLOutfitListBase* mOutfitList;
};
diff --git a/indra/newview/lloutfitslist.cpp b/indra/newview/lloutfitslist.cpp
index 4fe614b0a7..060f10d813 100644
--- a/indra/newview/lloutfitslist.cpp
+++ b/indra/newview/lloutfitslist.cpp
@@ -37,6 +37,7 @@
#include "llappearancemgr.h"
#include "llfloaterreg.h"
#include "llfloatersidepanelcontainer.h"
+#include "llinspecttexture.h"
#include "llinventoryfunctions.h"
#include "llinventorymodel.h"
#include "llmenubutton.h"
@@ -62,7 +63,7 @@ bool LLOutfitTabNameComparator::compare(const LLAccordionCtrlTab* tab1, const LL
return (LLStringUtil::compareDict(name1, name2) < 0);
}
-struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLAccordionCtrlTab::Params>
+struct outfit_accordion_tab_params : public LLInitParam::Block<outfit_accordion_tab_params, LLOutfitAccordionCtrlTab::Params>
{
Mandatory<LLWearableItemsList::Params> wearable_list;
@@ -144,7 +145,8 @@ void LLOutfitsList::updateAddedCategory(LLUUID cat_id)
std::string name = cat->getName();
outfit_accordion_tab_params tab_params(get_accordion_tab_params());
- LLAccordionCtrlTab* tab = LLUICtrlFactory::create<LLAccordionCtrlTab>(tab_params);
+ tab_params.cat_id = cat_id;
+ LLOutfitAccordionCtrlTab *tab = LLUICtrlFactory::create<LLOutfitAccordionCtrlTab>(tab_params);
if (!tab) return;
LLWearableItemsList* wearable_list = LLUICtrlFactory::create<LLWearableItemsList>(tab_params.wearable_list);
wearable_list->setShape(tab->getLocalRect());
@@ -1059,6 +1061,8 @@ LLContextMenu* LLOutfitContextMenu::createMenu()
registrar.add("Outfit.Edit", boost::bind(editOutfit));
registrar.add("Outfit.Rename", boost::bind(renameOutfit, selected_id));
registrar.add("Outfit.Delete", boost::bind(&LLOutfitListBase::removeSelected, mOutfitList));
+ registrar.add("Outfit.Thumbnail", boost::bind(&LLOutfitContextMenu::onThumbnail, this, selected_id));
+ registrar.add("Outfit.Save", boost::bind(&LLOutfitContextMenu::onSave, this, selected_id));
enable_registrar.add("Outfit.OnEnable", boost::bind(&LLOutfitContextMenu::onEnable, this, _2));
enable_registrar.add("Outfit.OnVisible", boost::bind(&LLOutfitContextMenu::onVisible, this, _2));
@@ -1123,6 +1127,31 @@ void LLOutfitContextMenu::renameOutfit(const LLUUID& outfit_cat_id)
LLAppearanceMgr::instance().renameOutfit(outfit_cat_id);
}
+void LLOutfitContextMenu::onThumbnail(const LLUUID &outfit_cat_id)
+{
+ if (outfit_cat_id.notNull())
+ {
+ LLSD data(outfit_cat_id);
+ LLFloaterReg::showInstance("change_item_thumbnail", data);
+ }
+}
+
+void LLOutfitContextMenu::onSave(const LLUUID &outfit_cat_id)
+{
+ if (outfit_cat_id.notNull())
+ {
+ LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+ [outfit_cat_id](const LLSD &notif, const LLSD &resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ LLAppearanceMgr::getInstance()->onOutfitFolderCreated(outfit_cat_id, true);
+ }
+ });
+ }
+}
+
LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
: mOutfitList(olist),
mMenu(NULL)
@@ -1141,6 +1170,7 @@ LLOutfitListGearMenuBase::LLOutfitListGearMenuBase(LLOutfitListBase* olist)
registrar.add("Gear.Expand", boost::bind(&LLOutfitListBase::onExpandAllFolders, mOutfitList));
registrar.add("Gear.WearAdd", boost::bind(&LLOutfitListGearMenuBase::onAdd, this));
+ registrar.add("Gear.Save", boost::bind(&LLOutfitListGearMenuBase::onSave, this));
registrar.add("Gear.Thumbnail", boost::bind(&LLOutfitListGearMenuBase::onThumbnail, this));
registrar.add("Gear.SortByName", boost::bind(&LLOutfitListGearMenuBase::onChangeSortOrder, this));
@@ -1166,8 +1196,7 @@ void LLOutfitListGearMenuBase::onUpdateItemsVisibility()
if (!mMenu) return;
bool have_selection = getSelectedOutfitID().notNull();
- mMenu->setItemVisible("sepatator1", have_selection);
- mMenu->setItemVisible("sepatator2", have_selection);
+ mMenu->setItemVisible("wear_separator", have_selection);
mMenu->arrangeAndClear(); // update menu height
}
@@ -1212,6 +1241,20 @@ void LLOutfitListGearMenuBase::onAdd()
}
}
+void LLOutfitListGearMenuBase::onSave()
+{
+ const LLUUID &selected_id = getSelectedOutfitID();
+ LLNotificationsUtil::add("ConfirmOverwriteOutfit", LLSD(), LLSD(),
+ [selected_id](const LLSD &notif, const LLSD &resp)
+ {
+ S32 opt = LLNotificationsUtil::getSelectedOption(notif, resp);
+ if (opt == 0)
+ {
+ LLAppearanceMgr::getInstance()->onOutfitFolderCreated(selected_id, true);
+ }
+ });
+}
+
void LLOutfitListGearMenuBase::onTakeOff()
{
// Take off selected outfit.
@@ -1265,15 +1308,6 @@ bool LLOutfitListGearMenuBase::onVisible(LLSD::String param)
return false;
}
- // *TODO This condition leads to menu item behavior inconsistent with
- // "Wear" button behavior and should be modified or removed.
- bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
-
- if ("wear" == param)
- {
- return !is_worn;
- }
-
return true;
}
@@ -1301,10 +1335,30 @@ void LLOutfitListGearMenu::onUpdateItemsVisibility()
if (!mMenu) return;
mMenu->setItemVisible("expand", true);
mMenu->setItemVisible("collapse", true);
- mMenu->setItemVisible("thumbnail", false); // Never visible?
+ mMenu->setItemVisible("thumbnail", getSelectedOutfitID().notNull());
mMenu->setItemVisible("sepatator3", false);
mMenu->setItemVisible("sort_folders_by_name", false);
LLOutfitListGearMenuBase::onUpdateItemsVisibility();
}
+bool LLOutfitAccordionCtrlTab::handleToolTip(S32 x, S32 y, MASK mask)
+{
+ if (y >= getLocalRect().getHeight() - getHeaderHeight())
+ {
+ LLSD params;
+ params["inv_type"] = LLInventoryType::IT_CATEGORY;
+ params["thumbnail_id"] = gInventory.getCategory(mFolderID)->getThumbnailUUID();
+ params["item_id"] = mFolderID;
+
+ LLToolTipMgr::instance().show(LLToolTip::Params()
+ .message(getToolTip())
+ .sticky_rect(calcScreenRect())
+ .delay_time(LLView::getTooltipTimeout())
+ .create_callback(boost::bind(&LLInspectTextureUtil::createInventoryToolTip, _1))
+ .create_params(params));
+ return true;
+ }
+
+ return LLAccordionCtrlTab::handleToolTip(x, y, mask);
+}
// EOF
diff --git a/indra/newview/lloutfitslist.h b/indra/newview/lloutfitslist.h
index 5bd5b0329c..30aa9d9cdf 100644
--- a/indra/newview/lloutfitslist.h
+++ b/indra/newview/lloutfitslist.h
@@ -31,6 +31,7 @@
#include "llpanel.h"
// newview
+#include "llaccordionctrltab.h"
#include "llinventorymodel.h"
#include "lllistcontextmenu.h"
#include "llpanelappearancetab.h"
@@ -159,6 +160,9 @@ protected:
static void renameOutfit(const LLUUID& outfit_cat_id);
+ void onThumbnail(const LLUUID &outfit_cat_id);
+ void onSave(const LLUUID &outfit_cat_id);
+
private:
LLOutfitListBase* mOutfitList;
};
@@ -190,6 +194,7 @@ private:
void onAdd();
void onTakeOff();
void onRename();
+ void onSave();
void onCreate(const LLSD& data);
bool onEnable(LLSD::String param);
bool onVisible(LLSD::String param);
@@ -205,7 +210,27 @@ protected:
/*virtual*/ void onUpdateItemsVisibility();
};
-/**
+class LLOutfitAccordionCtrlTab : public LLAccordionCtrlTab
+{
+public:
+ struct Params : public LLInitParam::Block<Params, LLAccordionCtrlTab::Params>
+ {
+ Optional<LLUUID> cat_id;
+ Params() : cat_id("cat_id") {}
+ };
+
+ virtual bool handleToolTip(S32 x, S32 y, MASK mask);
+
+ protected:
+ LLOutfitAccordionCtrlTab(const LLOutfitAccordionCtrlTab::Params &p)
+ : LLAccordionCtrlTab(p),
+ mFolderID(p.cat_id)
+ {}
+ friend class LLUICtrlFactory;
+
+ LLUUID mFolderID;
+};
+ /**
* @class LLOutfitsList
*
* A list of agents's outfits from "My Outfits" inventory category
diff --git a/indra/newview/llpaneleditwearable.cpp b/indra/newview/llpaneleditwearable.cpp
index 5a4dfd5458..6890469131 100644
--- a/indra/newview/llpaneleditwearable.cpp
+++ b/indra/newview/llpaneleditwearable.cpp
@@ -1344,7 +1344,7 @@ void LLPanelEditWearable::updateTypeSpecificControls(LLWearableType::EType type)
{
// Update avatar height
F32 new_size = gAgentAvatarp->mBodySize.mV[VZ];
- if (gSavedSettings.getBOOL("HeightUnits") == false)
+ if (!gSavedSettings.getBOOL("HeightUnits"))
{
// convert meters to feet
new_size = new_size / ONE_FOOT;
@@ -1668,7 +1668,7 @@ public:
bool handle(const LLSD& params, const LLSD& query_map, const std::string& grid, LLMediaCtrl* web)
{
// change height units true for meters and false for feet
- bool new_value = (gSavedSettings.getBOOL("HeightUnits") == false) ? true : false;
+ bool new_value = !gSavedSettings.getBOOL("HeightUnits");
gSavedSettings.setBOOL("HeightUnits", new_value);
return true;
}
diff --git a/indra/newview/llpanelexperiencelisteditor.cpp b/indra/newview/llpanelexperiencelisteditor.cpp
index 00015d13c8..4af30ef443 100644
--- a/indra/newview/llpanelexperiencelisteditor.cpp
+++ b/indra/newview/llpanelexperiencelisteditor.cpp
@@ -40,7 +40,6 @@
#include "lltextbox.h"
#include "lltrans.h"
#include "llsdutil.h"
-#include <boost/foreach.hpp>
static LLPanelInjector<LLPanelExperienceListEditor> t_panel_experience_list_editor("panel_experience_list_editor");
@@ -96,7 +95,7 @@ void LLPanelExperienceListEditor::addExperienceIds( const uuid_vec_t& experience
void LLPanelExperienceListEditor::setExperienceIds( const LLSD& experience_ids )
{
mExperienceIds.clear();
- BOOST_FOREACH(LLSD uuid, llsd::inArray(experience_ids))
+ for (LLSD uuid : llsd::inArray(experience_ids))
{
// Using insert(range) doesn't work here because the conversion from
// LLSD to LLUUID is ambiguous: have to specify asUUID() for each entry.
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 84ee0c326b..cd3cf00b7b 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -1999,7 +1999,7 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
{
LLSelectedTE::getPbrMaterialId(pbr_id, identical_pbr, has_pbr_material, has_faces_without_pbr);
- pbr_ctrl->setTentative(identical_pbr ? false : true);
+ pbr_ctrl->setTentative(!identical_pbr);
pbr_ctrl->setEnabled(settable);
pbr_ctrl->setImageAssetID(pbr_id);
diff --git a/indra/newview/llpanelgroupbulkban.cpp b/indra/newview/llpanelgroupbulkban.cpp
index 847a895bb8..e38c8acdaa 100644
--- a/indra/newview/llpanelgroupbulkban.cpp
+++ b/indra/newview/llpanelgroupbulkban.cpp
@@ -49,8 +49,6 @@
#include "lluictrlfactory.h"
#include "llviewerwindow.h"
-#include <boost/foreach.hpp>
-
LLPanelGroupBulkBan::LLPanelGroupBulkBan(const LLUUID& group_id) : LLPanelGroupBulk(group_id)
{
// Pass on construction of this panel to the control factory.
@@ -172,18 +170,17 @@ void LLPanelGroupBulkBan::submit()
}
if (group_datap)
{
- BOOST_FOREACH(const LLGroupMgrGroupData::ban_list_t::value_type& group_ban_pair, group_datap->mBanList)
+ for (const auto& [group_ban_agent_id, group_ban_data] : group_datap->mBanList)
{
- const LLUUID& group_ban_agent_id = group_ban_pair.first;
std::vector<LLUUID>::iterator conflict = std::find(banned_agent_list.begin(), banned_agent_list.end(), group_ban_agent_id);
if (conflict != banned_agent_list.end())
{
LLAvatarName av_name;
LLAvatarNameCache::get(group_ban_agent_id, &av_name);
- banned_avatar_names.push_back(av_name);
+ banned_avatar_names.emplace_back(av_name);
banned_agent_list.erase(conflict);
- if (banned_agent_list.size() == 0)
+ if (banned_agent_list.empty())
{
break;
}
diff --git a/indra/newview/llpanellandmarkinfo.cpp b/indra/newview/llpanellandmarkinfo.cpp
index 24b0074bb0..e4022494de 100644
--- a/indra/newview/llpanellandmarkinfo.cpp
+++ b/indra/newview/llpanellandmarkinfo.cpp
@@ -353,7 +353,7 @@ void LLPanelLandmarkInfo::toggleLandmarkEditMode(bool enabled)
mLandmarkTitle->setText(mLandmarkTitleEditor->getText());
}
- if (mNotesEditor->getReadOnly() == (enabled == true))
+ if (mNotesEditor->getReadOnly() == enabled)
{
mLandmarkTitle->setVisible(!enabled);
mLandmarkTitleEditor->setVisible(enabled);
diff --git a/indra/newview/llpanellogin.cpp b/indra/newview/llpanellogin.cpp
index 97c192d87d..06cfd5b23c 100644
--- a/indra/newview/llpanellogin.cpp
+++ b/indra/newview/llpanellogin.cpp
@@ -1117,7 +1117,7 @@ void LLPanelLogin::onPassKey(LLLineEditor* caller, void* user_data)
{
LLPanelLogin *self = (LLPanelLogin *)user_data;
self->mPasswordModified = true;
- if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && sCapslockDidNotification == false)
+ if (gKeyboard->getKeyDown(KEY_CAPSLOCK) && !sCapslockDidNotification)
{
// *TODO: use another way to notify user about enabled caps lock, see EXT-6858
sCapslockDidNotification = true;
diff --git a/indra/newview/llpanellogin.h b/indra/newview/llpanellogin.h
index b6cb6e9600..39ca861026 100644
--- a/indra/newview/llpanellogin.h
+++ b/indra/newview/llpanellogin.h
@@ -107,7 +107,7 @@ private:
static void onPassKey(LLLineEditor* caller, void* user_data);
private:
- boost::scoped_ptr<LLPanelLoginListener> mListener;
+ std::unique_ptr<LLPanelLoginListener> mListener;
void updateLoginButtons();
void populateUserList(LLPointer<LLCredential> credential);
diff --git a/indra/newview/llpanelmediasettingsgeneral.cpp b/indra/newview/llpanelmediasettingsgeneral.cpp
index ffbf91b522..db421708ee 100644
--- a/indra/newview/llpanelmediasettingsgeneral.cpp
+++ b/indra/newview/llpanelmediasettingsgeneral.cpp
@@ -121,7 +121,7 @@ void LLPanelMediaSettingsGeneral::draw()
checkHomeUrlPassesWhitelist();
// enable/disable pixel values image entry based on auto scale checkbox
- if ( mAutoScale->getValue().asBoolean() == false )
+ if (!mAutoScale->getValue().asBoolean())
{
getChildView( LLMediaEntry::WIDTH_PIXELS_KEY )->setEnabled( true );
getChildView( LLMediaEntry::HEIGHT_PIXELS_KEY )->setEnabled( true );
@@ -134,10 +134,9 @@ void LLPanelMediaSettingsGeneral::draw()
// enable/disable UI based on type of media
bool reset_button_is_active = true;
- if( mPreviewMedia )
+ if (mPreviewMedia)
{
- LLPluginClassMedia* media_plugin = mPreviewMedia->getMediaPlugin();
- if( media_plugin )
+ if (LLPluginClassMedia* media_plugin = mPreviewMedia->getMediaPlugin())
{
// turn off volume (if we can) for preview. Note: this really only
// works for QuickTime movies right now - no way to control the
@@ -147,8 +146,7 @@ void LLPanelMediaSettingsGeneral::draw()
// some controls are only appropriate for time or browser type plugins
// so we selectively enable/disable them - need to do it in draw
// because the information from plugins arrives assynchronously
- bool show_time_controls = media_plugin->pluginSupportsMediaTime();
- if ( show_time_controls )
+ if (media_plugin->pluginSupportsMediaTime())
{
getChildView( LLMediaEntry::CURRENT_URL_KEY )->setEnabled( false );
reset_button_is_active = false;
diff --git a/indra/newview/llpanelnearbymedia.cpp b/indra/newview/llpanelnearbymedia.cpp
index a8553b654e..36605fed7a 100644
--- a/indra/newview/llpanelnearbymedia.cpp
+++ b/indra/newview/llpanelnearbymedia.cpp
@@ -260,10 +260,16 @@ bool LLPanelNearByMedia::handleRightMouseDown(S32 x, S32 y, MASK mask)
S32 x_list, y_list;
localPointToOtherView(x, y, &x_list, &y_list, mMediaList);
if (mMoreLessBtn->getToggleState()
- && mMediaList->pointInView(x_list, y_list)
- && mMediaList->selectItemAt(x_list, y_list, mask))
+ && mMediaList->pointInView(x_list, y_list))
{
- if (mContextMenu)
+ LLScrollListItem* hit_item = mMediaList->hitItem(x_list, y_list);
+ bool selected = hit_item && hit_item->getSelected();
+ if (!selected)
+ {
+ selected = mMediaList->selectItemAt(x_list, y_list, mask);
+ }
+
+ if (selected && mContextMenu)
{
mContextMenu->buildDrawLabels();
mContextMenu->updateParent(LLMenuGL::sMenuContainer);
diff --git a/indra/newview/llpanelobject.cpp b/indra/newview/llpanelobject.cpp
index ac0b5d40a4..b06f41b920 100644
--- a/indra/newview/llpanelobject.cpp
+++ b/indra/newview/llpanelobject.cpp
@@ -1766,30 +1766,39 @@ void LLPanelObject::sendSculpt()
LLUUID sculpt_id = LLUUID::null;
if (mCtrlSculptTexture)
+ {
sculpt_id = mCtrlSculptTexture->getImageAssetID();
+ }
U8 sculpt_type = 0;
if (mCtrlSculptType)
+ {
sculpt_type |= mCtrlSculptType->getValue().asInteger();
+ }
bool enabled = sculpt_type != LL_SCULPT_TYPE_MESH;
if (mCtrlSculptMirror)
{
- mCtrlSculptMirror->setEnabled(enabled ? true : false);
+ mCtrlSculptMirror->setEnabled(enabled);
}
+
if (mCtrlSculptInvert)
{
- mCtrlSculptInvert->setEnabled(enabled ? true : false);
+ mCtrlSculptInvert->setEnabled(enabled);
}
-
+
if ((mCtrlSculptMirror) && (mCtrlSculptMirror->get()))
+ {
sculpt_type |= LL_SCULPT_FLAG_MIRROR;
+ }
if ((mCtrlSculptInvert) && (mCtrlSculptInvert->get()))
+ {
sculpt_type |= LL_SCULPT_FLAG_INVERT;
-
+ }
+
sculpt_params.setSculptTexture(sculpt_id, sculpt_type);
mObject->setParameterEntry(LLNetworkData::PARAMS_SCULPT, sculpt_params, true);
}
diff --git a/indra/newview/llpaneloutfitsinventory.h b/indra/newview/llpaneloutfitsinventory.h
index 3bf374d8fd..157e051923 100644
--- a/indra/newview/llpaneloutfitsinventory.h
+++ b/indra/newview/llpaneloutfitsinventory.h
@@ -61,6 +61,8 @@ public:
void openApearanceTab(const std::string& tab_name);
+ bool isCOFPanelActive() const;
+
protected:
void updateVerbs();
@@ -72,7 +74,6 @@ private:
protected:
void initTabPanels();
void onTabChange();
- bool isCOFPanelActive() const;
bool isOutfitsListPanelActive() const;
bool isOutfitsGalleryPanelActive() const;
diff --git a/indra/newview/llpanelprofile.cpp b/indra/newview/llpanelprofile.cpp
index 3a26fb086b..0fc2ad4d6d 100644
--- a/indra/newview/llpanelprofile.cpp
+++ b/indra/newview/llpanelprofile.cpp
@@ -779,11 +779,11 @@ void LLFloaterProfilePermissions::fillRightsData()
{
S32 rights = relation->getRightsGrantedTo();
- bool see_online = LLRelationship::GRANT_ONLINE_STATUS & rights ? true : false;
+ bool see_online = LLRelationship::GRANT_ONLINE_STATUS & rights;
mOnlineStatus->setValue(see_online);
mMapRights->setEnabled(see_online);
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
- mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights ? true : false);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights);
+ mEditObjectRights->setValue(LLRelationship::GRANT_MODIFY_OBJECTS & rights);
}
else
{
@@ -798,7 +798,7 @@ void LLFloaterProfilePermissions::rightsConfirmationCallback(const LLSD& notific
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0) // canceled
{
- mEditObjectRights->setValue(mEditObjectRights->getValue().asBoolean() ? false : true);
+ mEditObjectRights->setValue(!mEditObjectRights->getValue().asBoolean());
}
else
{
@@ -824,7 +824,7 @@ void LLFloaterProfilePermissions::onCommitSeeOnlineRights()
if (relation)
{
S32 rights = relation->getRightsGrantedTo();
- mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights ? true : false);
+ mMapRights->setValue(LLRelationship::GRANT_MAP_LOCATION & rights);
}
else
{
diff --git a/indra/newview/llpanelprofileclassifieds.cpp b/indra/newview/llpanelprofileclassifieds.cpp
index b0ee96c04b..b39e4fddf1 100644
--- a/indra/newview/llpanelprofileclassifieds.cpp
+++ b/indra/newview/llpanelprofileclassifieds.cpp
@@ -650,6 +650,8 @@ bool LLPanelProfileClassified::postBuild()
mSnapshotCtrl->setOnSelectCallback(boost::bind(&LLPanelProfileClassified::onTextureSelected, this));
mSnapshotCtrl->setMouseEnterCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseEnter, this));
mSnapshotCtrl->setMouseLeaveCallback(boost::bind(&LLPanelProfileClassified::onTexturePickerMouseLeave, this));
+ mSnapshotCtrl->setAllowLocalTexture(false);
+ mSnapshotCtrl->setBakeTextureEnabled(false);
mEditIcon->setVisible(false);
mMapButton->setCommitCallback(boost::bind(&LLPanelProfileClassified::onMapClick, this));
@@ -667,7 +669,7 @@ bool LLPanelProfileClassified::postBuild()
mCategoryCombo->add(LLTrans::getString(iter->second));
}
- mClassifiedNameEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onChange, this), NULL);
+ mClassifiedNameEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onTitleChange, this), NULL);
mClassifiedDescEdit->setKeystrokeCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
mCategoryCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
mContentTypeCombo->setCommitCallback(boost::bind(&LLPanelProfileClassified::onChange, this));
@@ -935,6 +937,8 @@ void LLPanelProfileClassified::onCancelClick()
}
else
{
+ updateTabLabel(mClassifiedNameText->getValue());
+
// Reload data to undo changes to forms
LLAvatarPropertiesProcessor::getInstance()->sendClassifiedInfoRequest(getClassifiedId());
}
@@ -955,7 +959,7 @@ void LLPanelProfileClassified::onSaveClick()
}
if(isNew() || isNewWithErrors())
{
- if(gStatusBar->getBalance() < getPriceForListing())
+ if(gStatusBar->getBalance() < MINIMUM_PRICE_FOR_LISTING)
{
LLNotificationsUtil::add("ClassifiedInsufficientFunds");
return;
@@ -1403,6 +1407,12 @@ void LLPanelProfileClassified::onChange()
enableSave(isDirty());
}
+void LLPanelProfileClassified::onTitleChange()
+{
+ updateTabLabel(getClassifiedName());
+ onChange();
+}
+
void LLPanelProfileClassified::doSave()
{
//*TODO: Fix all of this
@@ -1428,6 +1438,14 @@ void LLPanelProfileClassified::doSave()
void LLPanelProfileClassified::onPublishFloaterPublishClicked()
{
+ if (mPublishFloater->getPrice() < MINIMUM_PRICE_FOR_LISTING)
+ {
+ LLSD args;
+ args["MIN_PRICE"] = MINIMUM_PRICE_FOR_LISTING;
+ LLNotificationsUtil::add("MinClassifiedPrice", args);
+ return;
+ }
+
setPriceForListing(mPublishFloater->getPrice());
doSave();
diff --git a/indra/newview/llpanelprofileclassifieds.h b/indra/newview/llpanelprofileclassifieds.h
index da98fb2556..9f0b27139a 100644
--- a/indra/newview/llpanelprofileclassifieds.h
+++ b/indra/newview/llpanelprofileclassifieds.h
@@ -257,6 +257,7 @@ protected:
void onSetLocationClick();
void onChange();
+ void onTitleChange();
void onPublishFloaterPublishClicked();
diff --git a/indra/newview/llpanelprofilepicks.cpp b/indra/newview/llpanelprofilepicks.cpp
index 05a26a45a1..7a0b4ff1ce 100644
--- a/indra/newview/llpanelprofilepicks.cpp
+++ b/indra/newview/llpanelprofilepicks.cpp
@@ -488,6 +488,8 @@ LLPanelProfilePick::LLPanelProfilePick()
, mLocationChanged(false)
, mNewPick(false)
, mIsEditing(false)
+ , mRegionCallbackConnection()
+ , mParcelCallbackConnection()
{
}
@@ -505,6 +507,15 @@ LLPanelProfilePick::~LLPanelProfilePick()
{
LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelId, this);
}
+
+ if (mRegionCallbackConnection.connected())
+ {
+ mRegionCallbackConnection.disconnect();
+ }
+ if (mParcelCallbackConnection.connected())
+ {
+ mParcelCallbackConnection.disconnect();
+ }
}
void LLPanelProfilePick::setAvatarId(const LLUUID& avatar_id)
@@ -579,6 +590,8 @@ bool LLPanelProfilePick::postBuild()
mSnapshotCtrl = getChild<LLTextureCtrl>("pick_snapshot");
mSnapshotCtrl->setCommitCallback(boost::bind(&LLPanelProfilePick::onSnapshotChanged, this));
+ mSnapshotCtrl->setAllowLocalTexture(false);
+ mSnapshotCtrl->setBakeTextureEnabled(false);
childSetAction("teleport_btn", boost::bind(&LLPanelProfilePick::onClickTeleport, this));
childSetAction("show_on_map_btn", boost::bind(&LLPanelProfilePick::onClickMap, this));
@@ -667,6 +680,7 @@ void LLPanelProfilePick::setSnapshotId(const LLUUID& id)
void LLPanelProfilePick::setPickName(const std::string& name)
{
mPickName->setValue(name);
+ mPickNameStr = name;
}
const std::string LLPanelProfilePick::getPickName()
@@ -749,6 +763,14 @@ bool LLPanelProfilePick::isDirty() const
void LLPanelProfilePick::onClickSave()
{
+ if (mRegionCallbackConnection.connected())
+ {
+ mRegionCallbackConnection.disconnect();
+ }
+ if (mParcelCallbackConnection.connected())
+ {
+ mParcelCallbackConnection.disconnect();
+ }
sendUpdate();
mLocationChanged = false;
@@ -756,6 +778,7 @@ void LLPanelProfilePick::onClickSave()
void LLPanelProfilePick::onClickCancel()
{
+ updateTabLabel(mPickNameStr);
LLAvatarPropertiesProcessor::getInstance()->sendPickInfoRequest(getAvatarId(), getPickId());
mLocationChanged = false;
enableSaveButton(false);
diff --git a/indra/newview/llpanelprofilepicks.h b/indra/newview/llpanelprofilepicks.h
index 62e626936b..3608d113ed 100644
--- a/indra/newview/llpanelprofilepicks.h
+++ b/indra/newview/llpanelprofilepicks.h
@@ -140,7 +140,7 @@ public:
void setParcelID(const LLUUID& parcel_id) override { mParcelId = parcel_id; }
void setErrorStatus(S32 status, const std::string& reason) override {};
-protected:
+ protected:
/**
* Sends remote parcel info request to resolve parcel name from its ID.
@@ -231,6 +231,10 @@ protected:
LLUUID mParcelId;
LLUUID mPickId;
LLUUID mRequestedId;
+ std::string mPickNameStr;
+
+ boost::signals2::connection mRegionCallbackConnection;
+ boost::signals2::connection mParcelCallbackConnection;
bool mLocationChanged;
bool mNewPick;
diff --git a/indra/newview/llpanelteleporthistory.cpp b/indra/newview/llpanelteleporthistory.cpp
index 65059e4231..5e6e61b6b3 100644
--- a/indra/newview/llpanelteleporthistory.cpp
+++ b/indra/newview/llpanelteleporthistory.cpp
@@ -949,8 +949,8 @@ void LLTeleportHistoryPanel::onAccordionTabRightClick(LLView *view, S32 x, S32 y
mAccordionTabMenu = LLUICtrlFactory::getInstance()->createFromFile<LLContextMenu>(
"menu_teleport_history_tab.xml", LLMenuGL::sMenuContainer, LLViewerMenuHolderGL::child_registry_t::instance());
- mAccordionTabMenu->setItemVisible("TabOpen", !tab->isExpanded() ? true : false);
- mAccordionTabMenu->setItemVisible("TabClose", tab->isExpanded() ? true : false);
+ mAccordionTabMenu->setItemVisible("TabOpen", !tab->isExpanded());
+ mAccordionTabMenu->setItemVisible("TabClose", tab->isExpanded());
mAccordionTabMenu->show(x, y);
LLMenuGL::showPopup(tab, mAccordionTabMenu, x, y);
@@ -1067,6 +1067,12 @@ void LLTeleportHistoryPanel::onGearMenuAction(const LLSD& userdata)
LLLandmarkActions::getSLURLfromPosGlobal(globalPos,
boost::bind(&LLTeleportHistoryPanel::gotSLURLCallback, _1));
}
+ else if ("remove" == command_name)
+ {
+ LLTeleportHistoryStorage::getInstance()->removeItem(index);
+ LLTeleportHistoryStorage::getInstance()->save();
+ showTeleportHistory();
+ }
}
bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
@@ -1121,7 +1127,8 @@ bool LLTeleportHistoryPanel::isActionEnabled(const LLSD& userdata) const
if ("teleport" == command_name
|| "view" == command_name
|| "show_on_map" == command_name
- || "copy_slurl" == command_name)
+ || "copy_slurl" == command_name
+ || "remove" == command_name)
{
if (!mLastSelectedFlatlList)
{
diff --git a/indra/newview/llpanelvolume.cpp b/indra/newview/llpanelvolume.cpp
index 5a3ef63edf..4d262fe477 100644
--- a/indra/newview/llpanelvolume.cpp
+++ b/indra/newview/llpanelvolume.cpp
@@ -1456,7 +1456,7 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item
if (item && volobjp->isAttachment())
{
const LLPermissions& perm = item->getPermissions();
- bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
if (!unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -1468,7 +1468,8 @@ void LLPanelVolume::setLightTextureID(const LLUUID &asset_id, const LLUUID &item
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLToolDragAndDrop::handleDropMaterialProtections(volobjp, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
- }
+ }
+
volobjp->setLightTextureID(asset_id);
}
}
diff --git a/indra/newview/llpathfindingmanager.cpp b/indra/newview/llpathfindingmanager.cpp
index a9563c7c17..dc1c749126 100644
--- a/indra/newview/llpathfindingmanager.cpp
+++ b/indra/newview/llpathfindingmanager.cpp
@@ -114,7 +114,7 @@ public:
void handleTerrainLinksetsResult(const LLSD &pContent);
void handleTerrainLinksetsError();
- typedef boost::shared_ptr<LinksetsResponder> ptr_t;
+ typedef std::shared_ptr<LinksetsResponder> ptr_t;
protected:
@@ -139,7 +139,7 @@ private:
LLPathfindingObjectPtr mTerrainLinksetPtr;
};
-typedef boost::shared_ptr<LinksetsResponder> LinksetsResponderPtr;
+typedef std::shared_ptr<LinksetsResponder> LinksetsResponderPtr;
//---------------------------------------------------------------------------
// LLPathfindingManager
diff --git a/indra/newview/llpathfindingmanager.h b/indra/newview/llpathfindingmanager.h
index ac781cedcc..13589b603b 100644
--- a/indra/newview/llpathfindingmanager.h
+++ b/indra/newview/llpathfindingmanager.h
@@ -107,8 +107,8 @@ private:
void navMeshStatusRequestCoro(std::string url, U64 regionHandle, bool isGetStatusOnly);
void navAgentStateRequestCoro(std::string url);
void navMeshRebakeCoro(std::string url, rebake_navmesh_callback_t rebakeNavMeshCallback);
- void linksetObjectsCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
- void linksetTerrainCoro(std::string url, boost::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
+ void linksetObjectsCoro(std::string url, std::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
+ void linksetTerrainCoro(std::string url, std::shared_ptr<LinksetsResponder> linksetsResponsderPtr, LLSD putData) const;
void charactersCoro(std::string url, request_id_t requestId, object_request_callback_t callback) const;
//void handleNavMeshStatusRequest(const LLPathfindingNavMeshStatus &pNavMeshStatus, LLViewerRegion *pRegion, bool pIsGetStatusOnly);
diff --git a/indra/newview/llpathfindingnavmesh.h b/indra/newview/llpathfindingnavmesh.h
index 87f32b8d56..ddc886f01c 100644
--- a/indra/newview/llpathfindingnavmesh.h
+++ b/indra/newview/llpathfindingnavmesh.h
@@ -39,7 +39,7 @@
class LLPathfindingNavMesh;
class LLUUID;
-typedef boost::shared_ptr<LLPathfindingNavMesh> LLPathfindingNavMeshPtr;
+typedef std::shared_ptr<LLPathfindingNavMesh> LLPathfindingNavMeshPtr;
class LLPathfindingNavMesh
{
diff --git a/indra/newview/llpathfindingnavmeshzone.h b/indra/newview/llpathfindingnavmeshzone.h
index baa1cc5979..b76f4421a6 100644
--- a/indra/newview/llpathfindingnavmeshzone.h
+++ b/indra/newview/llpathfindingnavmeshzone.h
@@ -114,7 +114,7 @@ private:
LLPathfindingNavMesh::navmesh_slot_t mNavMeshSlot;
};
- typedef boost::shared_ptr<NavMeshLocation> NavMeshLocationPtr;
+ typedef std::shared_ptr<NavMeshLocation> NavMeshLocationPtr;
typedef std::vector<NavMeshLocationPtr> NavMeshLocationPtrs;
void handleNavMeshLocation();
diff --git a/indra/newview/llpathfindingobject.h b/indra/newview/llpathfindingobject.h
index 12dd18f986..4095d05f36 100644
--- a/indra/newview/llpathfindingobject.h
+++ b/indra/newview/llpathfindingobject.h
@@ -41,7 +41,7 @@
class LLPathfindingObject;
class LLSD;
-typedef boost::shared_ptr<LLPathfindingObject> LLPathfindingObjectPtr;
+typedef std::shared_ptr<LLPathfindingObject> LLPathfindingObjectPtr;
class LLPathfindingObject
{
diff --git a/indra/newview/llpathfindingobjectlist.h b/indra/newview/llpathfindingobjectlist.h
index 61580582d3..e2e0dce4da 100644
--- a/indra/newview/llpathfindingobjectlist.h
+++ b/indra/newview/llpathfindingobjectlist.h
@@ -36,7 +36,7 @@
class LLPathfindingObjectList;
-typedef boost::shared_ptr<LLPathfindingObjectList> LLPathfindingObjectListPtr;
+typedef std::shared_ptr<LLPathfindingObjectList> LLPathfindingObjectListPtr;
typedef std::map<std::string, LLPathfindingObjectPtr> LLPathfindingObjectMap;
class LLPathfindingObjectList
diff --git a/indra/newview/llperfstats.cpp b/indra/newview/llperfstats.cpp
index af407c73f1..93851a4980 100644
--- a/indra/newview/llperfstats.cpp
+++ b/indra/newview/llperfstats.cpp
@@ -69,7 +69,7 @@ namespace LLPerfStats
{
assert_main_thread();
// these following variables are proxies for pipeline statics we do not need a two way update (no llviewercontrol handler)
- if( tuningFlag & NonImpostors ){ gSavedSettings.setU32("IndirectMaxNonImpostors", nonImpostors); };
+ if( tuningFlag & NonImpostors ){ gSavedSettings.setU32("RenderAvatarMaxNonImpostors", nonImpostors); };
if( tuningFlag & ReflectionDetail ){ gSavedSettings.setS32("RenderReflectionDetail", reflectionDetail); };
if( tuningFlag & FarClip ){ gSavedSettings.setF32("RenderFarClip", farClip); };
if( tuningFlag & UserMinDrawDistance ){ gSavedSettings.setF32("AutoTuneRenderFarClipMin", userMinDrawDistance); };
@@ -378,7 +378,7 @@ namespace LLPerfStats
auto count = countNearbyAvatars(std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance));
if( count != tunables.nonImpostors )
{
- tunables.updateNonImposters( (count < LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER)?count : LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER );
+ tunables.updateNonImposters( (count < LLVOAvatar::NON_IMPOSTORS_MAX_SLIDER)?count : 0 );
LL_DEBUGS("AutoTune") << "There are " << count << "avatars within " << std::min(LLPipeline::RenderFarClip, tunables.userImpostorDistance) << "m of the camera" << LL_ENDL;
}
}
@@ -411,7 +411,7 @@ namespace LLPerfStats
return;
}
- if(belowTargetFPS == false)
+ if (!belowTargetFPS)
{
// this is the first frame under. hold fire to add a little hysteresis
belowTargetFPS = true;
@@ -488,7 +488,7 @@ namespace LLPerfStats
new_render_limit_ns = std::max((U64)new_render_limit_ns, (U64)LLPerfStats::ART_MINIMUM_NANOS);
// assign the new value
- if(renderAvatarMaxART_ns != new_render_limit_ns)
+ if (renderAvatarMaxART_ns != new_render_limit_ns)
{
renderAvatarMaxART_ns = new_render_limit_ns;
tunables.updateSettingsFromRenderCostLimit();
@@ -497,10 +497,10 @@ namespace LLPerfStats
}
// LL_DEBUGS() << "AUTO_TUNE: Target frame time:"<< LLPerfStats::raw_to_us(target_frame_time_raw) << "usecs (non_avatar is " << LLPerfStats::raw_to_us(non_avatar_time_raw) << "usecs) Max cost limited=" << renderAvatarMaxART_ns << LL_ENDL;
}
- else if(( LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns) ) ||
+ else if ((LLPerfStats::raw_to_ns(target_frame_time_raw) > (LLPerfStats::raw_to_ns(tot_frame_time_raw) + renderAvatarMaxART_ns)) ||
(tunables.vsyncEnabled && (target_fps == LLPerfStats::vsync_max_fps) && (target_frame_time_raw > getMeanTotalFrameTime())))
{
- if(belowTargetFPS == true)
+ if (belowTargetFPS)
{
// we reached target, force a pause
lastGlobalPrefChange = gFrameCount;
@@ -508,15 +508,17 @@ namespace LLPerfStats
}
// once we're over the FPS target we slow down further
- if((gFrameCount - lastGlobalPrefChange) > settingsChangeFrequency*3)
+ if ((gFrameCount - lastGlobalPrefChange) > settingsChangeFrequency * 3)
{
- if(!tunables.userAutoTuneLock)
+ if (!tunables.userAutoTuneLock)
{
// we've reached the target and stayed long enough to consider stable.
// turn off if we are not locked.
tunables.updateUserAutoTuneEnabled(false);
}
- if(renderAvatarMaxART_ns != 0 && LLPerfStats::tunedAvatars > 0 && (tunables.userFPSTuningStrategy != TUNE_SCENE_ONLY) )
+ if (renderAvatarMaxART_ns > 0 &&
+ LLPerfStats::tunedAvatars > 0 &&
+ tunables.userFPSTuningStrategy != TUNE_SCENE_ONLY)
{
// if we have more time to spare let's shift up little in the hope we'll restore an avatar.
U64 up_step = LLPerfStats::tunedAvatars > 2 ? LLPerfStats::ART_MIN_ADJUST_UP_NANOS : LLPerfStats::ART_MIN_ADJUST_UP_NANOS * 2;
@@ -524,15 +526,15 @@ namespace LLPerfStats
tunables.updateSettingsFromRenderCostLimit();
return;
}
- if(tunables.userFPSTuningStrategy != TUNE_AVATARS_ONLY)
+ if (tunables.userFPSTuningStrategy != TUNE_AVATARS_ONLY)
{
- if( LLPipeline::RenderFarClip < tunables.userTargetDrawDistance )
+ if (LLPipeline::RenderFarClip < tunables.userTargetDrawDistance)
{
LLPerfStats::tunables.updateFarClip( std::min(LLPipeline::RenderFarClip + DD_STEP, tunables.userTargetDrawDistance) );
LLPerfStats::lastGlobalPrefChange = gFrameCount;
return;
}
- if( (tot_frame_time_raw * 1.5) < target_frame_time_raw )
+ if ((tot_frame_time_raw * 1.5) < target_frame_time_raw)
{
// if everything else is "max" and we have >50% headroom let's knock the water quality up a notch at a time.
# if 0 // RenderReflectionDetail went away
diff --git a/indra/newview/llphysicsshapebuilderutil.h b/indra/newview/llphysicsshapebuilderutil.h
index b3b100296f..7dbc577562 100644
--- a/indra/newview/llphysicsshapebuilderutil.h
+++ b/indra/newview/llphysicsshapebuilderutil.h
@@ -73,7 +73,8 @@ public:
{
return LLVolumeParams::operator<(params);
}
- return (params.mForceConvex == false) && (mForceConvex == true);
+
+ return !params.mForceConvex && mForceConvex;
}
bool shouldForceConvex() const { return mForceConvex; }
diff --git a/indra/newview/llplacesinventorypanel.cpp b/indra/newview/llplacesinventorypanel.cpp
index a67dc37dc9..ccb2feac10 100644
--- a/indra/newview/llplacesinventorypanel.cpp
+++ b/indra/newview/llplacesinventorypanel.cpp
@@ -120,3 +120,13 @@ S32 LLPlacesInventoryPanel::notify(const LLSD& info)
}
return 0;
}
+
+bool LLPlacesInventoryPanel::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data,
+ EAcceptance *accept, std::string &tooltip_msg)
+{
+ if (mAcceptsDragAndDrop)
+ {
+ return LLInventoryPanel::handleDragAndDrop(x, y, mask, drop, cargo_type, cargo_data, accept, tooltip_msg);
+ }
+ return false;
+}
diff --git a/indra/newview/llplacesinventorypanel.h b/indra/newview/llplacesinventorypanel.h
index 3c27964ec5..0f6aa03e0d 100644
--- a/indra/newview/llplacesinventorypanel.h
+++ b/indra/newview/llplacesinventorypanel.h
@@ -47,11 +47,14 @@ public:
LLPlacesInventoryPanel(const Params& p);
~LLPlacesInventoryPanel();
- LLFolderView * createFolderRoot(LLUUID root_id );
+ LLFolderView * createFolderRoot(LLUUID root_id ) override;
void saveFolderState();
void restoreFolderState();
- virtual S32 notify(const LLSD& info) ;
+ virtual S32 notify(const LLSD& info) override;
+
+ bool handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop, EDragAndDropType cargo_type, void *cargo_data,
+ EAcceptance *accept, std::string &tooltip_msg) override;
private:
LLSaveFolderState* mSavedFolderState;
diff --git a/indra/newview/llpreviewgesture.cpp b/indra/newview/llpreviewgesture.cpp
index 1f66db92d5..05faf17bdc 100644
--- a/indra/newview/llpreviewgesture.cpp
+++ b/indra/newview/llpreviewgesture.cpp
@@ -616,10 +616,9 @@ void LLPreviewGesture::refresh()
LLPreview::refresh();
// If previewing or item is incomplete, all controls are disabled
LLViewerInventoryItem* item = (LLViewerInventoryItem*)getItem();
- bool is_complete = (item && item->isFinished()) ? true : false;
+ bool is_complete = item && item->isFinished();
if (mPreviewGesture || !is_complete)
{
-
getChildView("desc")->setEnabled(false);
//mDescEditor->setEnabled(false);
mTriggerEditor->setEnabled(false);
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp
index 151252fb2d..4be3f6c742 100644
--- a/indra/newview/llpreviewscript.cpp
+++ b/indra/newview/llpreviewscript.cpp
@@ -2309,7 +2309,6 @@ LLLiveLSLSaveData::LLLiveLSLSaveData(const LLUUID& id,
mItem = new LLViewerInventoryItem(item);
}
-
/*static*/
void LLLiveLSLEditor::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAssetId, LLSD response, bool isRunning)
{
@@ -2333,15 +2332,13 @@ void LLLiveLSLEditor::finishLSLUpload(LLUUID itemId, LLUUID taskId, LLUUID newAs
preview->callbackLSLCompileFailed(response["errors"]);
}
}
-
}
-
// virtual
void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
{
LLViewerObject* object = gObjectList.findObject(mObjectUUID);
- if(!object)
+ if (!object)
{
LLNotificationsUtil::add("SaveScriptFailObjectNotFound");
return;
@@ -2366,7 +2363,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
}
// Don't need to save if we're pristine
- if(!mScriptEd->hasChanged())
+ if (!mScriptEd->hasChanged())
{
return;
}
@@ -2383,6 +2380,7 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
{
mScriptEd->sync();
}
+
bool isRunning = getChild<LLCheckBoxCtrl>("running")->get();
getWindow()->incBusyCount();
mPendingUploads++;
@@ -2409,14 +2407,14 @@ void LLLiveLSLEditor::saveIfNeeded(bool sync /*= true*/)
bool LLLiveLSLEditor::canClose()
{
- return (mScriptEd->canClose());
+ return mScriptEd->canClose();
}
void LLLiveLSLEditor::closeIfNeeded()
{
getWindow()->decBusyCount();
mPendingUploads--;
- if (mPendingUploads <= 0 && mCloseAfterSave)
+ if ((mPendingUploads <= 0) && mCloseAfterSave)
{
closeFloater();
}
@@ -2432,8 +2430,7 @@ void LLLiveLSLEditor::onLoad(void* userdata)
// static
void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save)
{
- LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata;
- if(self)
+ if (LLLiveLSLEditor* self = (LLLiveLSLEditor*)userdata)
{
self->mCloseAfterSave = close_after_save;
self->mScriptEd->mErrorList->setCommentText("");
@@ -2441,7 +2438,6 @@ void LLLiveLSLEditor::onSave(void* userdata, bool close_after_save)
}
}
-
// static
void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
{
@@ -2453,8 +2449,7 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
LLSD floater_key;
floater_key["taskid"] = object_id;
floater_key["itemid"] = item_id;
- LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key);
- if(instance)
+ if (LLLiveLSLEditor* instance = LLFloaterReg::findTypedInstance<LLLiveLSLEditor>("preview_scriptedit", floater_key))
{
instance->mHaveRunningInfo = true;
bool running;
@@ -2469,7 +2464,6 @@ void LLLiveLSLEditor::processScriptRunningReply(LLMessageSystem* msg, void**)
}
}
-
void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata)
{
LLLiveLSLEditor* self = static_cast<LLLiveLSLEditor*>(userdata);
@@ -2479,20 +2473,15 @@ void LLLiveLSLEditor::onMonoCheckboxClicked(LLUICtrl*, void* userdata)
bool LLLiveLSLEditor::monoChecked() const
{
- if(NULL != mMonoCheckbox)
- {
- return mMonoCheckbox->getValue()? true : false;
- }
- return false;
+ return mMonoCheckbox && mMonoCheckbox->getValue();
}
void LLLiveLSLEditor::setAssociatedExperience( LLHandle<LLLiveLSLEditor> editor, const LLSD& experience )
{
- LLLiveLSLEditor* scriptEd = editor.get();
- if(scriptEd)
+ if (LLLiveLSLEditor* scriptEd = editor.get())
{
LLUUID id;
- if(experience.has(LLExperienceCache::EXPERIENCE_ID))
+ if (experience.has(LLExperienceCache::EXPERIENCE_ID))
{
id=experience[LLExperienceCache::EXPERIENCE_ID].asUUID();
}
diff --git a/indra/newview/llpreviewtexture.cpp b/indra/newview/llpreviewtexture.cpp
index 039e9b2797..91b8f0496e 100644
--- a/indra/newview/llpreviewtexture.cpp
+++ b/indra/newview/llpreviewtexture.cpp
@@ -67,6 +67,7 @@ const F32 PREVIEW_TEXTURE_MIN_ASPECT = 0.005f;
LLPreviewTexture::LLPreviewTexture(const LLSD& key)
: LLPreview(key),
mLoadingFullImage( false ),
+ mSavingMultiple(false),
mShowKeepDiscard(false),
mCopyToInv(false),
mIsCopyable(false),
@@ -310,9 +311,12 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
// remember the user-approved/edited file name.
mSaveFileName = filenames[0];
+ mSavingMultiple = false;
mLoadingFullImage = true;
getWindow()->incBusyCount();
+ LL_DEBUGS("FileSaveAs") << "Scheduling saving file to " << mSaveFileName << LL_ENDL;
+
mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList);
@@ -322,35 +326,16 @@ void LLPreviewTexture::saveTextureToFile(const std::vector<std::string>& filenam
void LLPreviewTexture::saveMultipleToFile(const std::string& file_name)
{
std::string texture_location(gSavedSettings.getString("TextureSaveLocation"));
- std::string texture_name = file_name.empty() ? getItem()->getName() : file_name;
-
- std::string filepath;
- S32 i = 0;
- S32 err = 0;
- std::string extension(".png");
- do
- {
- filepath = texture_location;
- filepath += gDirUtilp->getDirDelimiter();
- filepath += texture_name;
-
- if (i != 0)
- {
- filepath += llformat("_%.3d", i);
- }
+ std::string texture_name = LLDir::getScrubbedFileName(file_name.empty() ? getItem()->getName() : file_name);
- filepath += extension;
+ mSaveFileName = texture_location + gDirUtilp->getDirDelimiter() + texture_name + ".png";
- llstat stat_info;
- err = LLFile::stat( filepath, &stat_info );
- i++;
- } while (-1 != err); // Search until the file is not found (i.e., stat() gives an error).
-
-
- mSaveFileName = filepath;
+ mSavingMultiple = true;
mLoadingFullImage = true;
getWindow()->incBusyCount();
+ LL_DEBUGS("FileSaveAs") << "Scheduling saving file to " << mSaveFileName << LL_ENDL;
+
mImage->forceToSaveRawImage(0);//re-fetch the raw image if the old one is removed.
mImage->setLoadedCallback(LLPreviewTexture::onFileLoadedForSave,
0, true, false, new LLUUID(mItemUUID), &mCallbackTextureList);
@@ -451,8 +436,39 @@ void LLPreviewTexture::onFileLoadedForSave(bool success,
if( self && final && success )
{
+ LL_DEBUGS("FileSaveAs") << "Saving file to " << self->mSaveFileName << LL_ENDL;
const U32 ext_length = 3;
std::string extension = self->mSaveFileName.substr( self->mSaveFileName.length() - ext_length);
+
+ std::string filepath;
+ if (self->mSavingMultiple)
+ {
+ std::string part_path = self->mSaveFileName.substr(0, self->mSaveFileName.length() - ext_length - 1);
+
+ S32 i = 0;
+ S32 err = 0;
+ do
+ {
+ filepath = part_path;
+
+ if (i != 0)
+ {
+ filepath += llformat("_%.3d", i);
+ }
+
+ filepath += ".";
+ filepath += extension;
+
+ llstat stat_info;
+ err = LLFile::stat(filepath, &stat_info);
+ i++;
+ } while (-1 != err); // Search until the file is not found (i.e., stat() gives an error).
+ }
+ else
+ {
+ filepath = self->mSaveFileName;
+ }
+
LLStringUtil::toLower(extension);
// We only support saving in PNG or TGA format
LLPointer<LLImageFormatted> image;
@@ -468,13 +484,13 @@ void LLPreviewTexture::onFileLoadedForSave(bool success,
if( image && !image->encode( src, 0 ) )
{
LLSD args;
- args["FILE"] = self->mSaveFileName;
+ args["FILE"] = filepath;
LLNotificationsUtil::add("CannotEncodeFile", args);
}
- else if( image && !image->save( self->mSaveFileName ) )
+ else if( image && !image->save(filepath) )
{
LLSD args;
- args["FILE"] = self->mSaveFileName;
+ args["FILE"] = filepath;
LLNotificationsUtil::add("CannotWriteFile", args);
}
else
@@ -482,6 +498,7 @@ void LLPreviewTexture::onFileLoadedForSave(bool success,
self->mSavedFileTimer.reset();
self->mSavedFileTimer.setTimerExpirySec( SECONDS_TO_SHOW_FILE_SAVED_MSG );
}
+ LL_DEBUGS("FileSaveAs") << "Done saving file to " << filepath << LL_ENDL;
self->mSaveFileName.clear();
}
@@ -653,7 +670,7 @@ void LLPreviewTexture::adjustAspectRatio()
{
// No existing ratio found, create an element that will show image at original ratio
populateRatioList(); // makes sure previous custom ratio is cleared
- std::string ratio = boost::lexical_cast<std::string>(num)+":" + boost::lexical_cast<std::string>(denom);
+ std::string ratio = std::to_string(num)+":" + std::to_string(denom);
mRatiosList.push_back(ratio);
combo->add(ratio);
combo->setCurrentByIndex(mRatiosList.size()- 1);
diff --git a/indra/newview/llpreviewtexture.h b/indra/newview/llpreviewtexture.h
index fdc6dddb38..e8a0a43245 100644
--- a/indra/newview/llpreviewtexture.h
+++ b/indra/newview/llpreviewtexture.h
@@ -86,6 +86,7 @@ private:
S32 mImageOldBoostLevel;
std::string mSaveFileName;
LLFrameTimer mSavedFileTimer;
+ bool mSavingMultiple;
bool mLoadingFullImage;
bool mShowKeepDiscard;
bool mCopyToInv;
diff --git a/indra/newview/llprogressview.cpp b/indra/newview/llprogressview.cpp
index 7c22514264..a46c444eb9 100644
--- a/indra/newview/llprogressview.cpp
+++ b/indra/newview/llprogressview.cpp
@@ -141,7 +141,7 @@ void LLProgressView::revealIntroPanel()
std::string intro_url = gSavedSettings.getString("PostFirstLoginIntroURL");
if ( intro_url.length() > 0 &&
gSavedSettings.getBOOL("BrowserJavascriptEnabled") &&
- gSavedSettings.getBOOL("PostFirstLoginIntroViewed" ) == false )
+ !gSavedSettings.getBOOL("PostFirstLoginIntroViewed"))
{
// hide the progress bar
getChild<LLView>("stack1")->setVisible(false);
@@ -504,8 +504,8 @@ void LLProgressView::initTextures(S32 location_id, bool is_in_production)
initStartTexture(location_id, is_in_production);
initLogos();
- childSetVisible("panel_icons", mLogosList.empty() ? false : true);
- childSetVisible("panel_top_spacer", mLogosList.empty() ? true : false);
+ childSetVisible("panel_icons", !mLogosList.empty());
+ childSetVisible("panel_top_spacer", mLogosList.empty());
}
void LLProgressView::releaseTextures()
@@ -519,8 +519,8 @@ void LLProgressView::releaseTextures()
void LLProgressView::setCancelButtonVisible(bool b, const std::string& label)
{
- mCancelBtn->setVisible( b );
- mCancelBtn->setEnabled( b );
+ mCancelBtn->setVisible(b);
+ mCancelBtn->setEnabled(b);
mCancelBtn->setLabelSelected(label);
mCancelBtn->setLabelUnselected(label);
}
diff --git a/indra/newview/llscrollingpanelparam.cpp b/indra/newview/llscrollingpanelparam.cpp
index 76340a9ea8..833eaaf8ca 100644
--- a/indra/newview/llscrollingpanelparam.cpp
+++ b/indra/newview/llscrollingpanelparam.cpp
@@ -254,15 +254,19 @@ void LLScrollingPanelParam::onHintHeldDown( LLVisualParamHint* hint )
// Make sure we're not taking the slider out of bounds
// (this is where some simple UI limits are stored)
- F32 new_percent = weightToSlider(new_weight);
- if (mSlider->getMinValue() < new_percent
- && new_percent < mSlider->getMaxValue())
+ F32 new_percent = weightToPercent(new_weight);
+ LLSliderCtrl* slider = getChild<LLSliderCtrl>("param slider");
+ if (slider)
{
- mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight);
- mWearable->writeToAvatar(gAgentAvatarp);
- gAgentAvatarp->updateVisualParams();
+ if (slider->getMinValue() < new_percent
+ && new_percent < slider->getMaxValue())
+ {
+ mWearable->setVisualParamWeight( hint->getVisualParam()->getID(), new_weight);
+ mWearable->writeToAvatar(gAgentAvatarp);
+ gAgentAvatarp->updateVisualParams();
- mSlider->setValue( weightToSlider( new_weight ) );
+ slider->setValue( weightToPercent( new_weight ) );
+ }
}
}
}
@@ -283,13 +287,17 @@ void LLScrollingPanelParam::onHintMinMouseUp( void* userdata )
F32 range = self->mHintMax->getVisualParamWeight() - self->mHintMin->getVisualParamWeight();
// step a fraction in the negative directiona
F32 new_weight = current_weight - (range / 10.f);
- F32 new_percent = self->weightToSlider(new_weight);
- if (self->mSlider->getMinValue() < new_percent
- && new_percent < self->mSlider->getMaxValue())
+ F32 new_percent = self->weightToPercent(new_weight);
+ LLSliderCtrl* slider = self->getChild<LLSliderCtrl>("param slider");
+ if (slider)
{
- self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
- self->mWearable->writeToAvatar(gAgentAvatarp);
- self->mSlider->setValue( self->weightToSlider( new_weight ) );
+ if (slider->getMinValue() < new_percent
+ && new_percent < slider->getMaxValue())
+ {
+ self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
+ self->mWearable->writeToAvatar(gAgentAvatarp);
+ slider->setValue( self->weightToPercent( new_weight ) );
+ }
}
}
@@ -313,16 +321,33 @@ void LLScrollingPanelParam::onHintMaxMouseUp( void* userdata )
F32 range = self->mHintMax->getVisualParamWeight() - self->mHintMin->getVisualParamWeight();
// step a fraction in the negative direction
F32 new_weight = current_weight + (range / 10.f);
- F32 new_percent = self->weightToSlider(new_weight);
- if (self->mSlider->getMinValue() < new_percent
- && new_percent < self->mSlider->getMaxValue())
+ F32 new_percent = self->weightToPercent(new_weight);
+ LLSliderCtrl* slider = self->getChild<LLSliderCtrl>("param slider");
+ if (slider)
{
- self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
- self->mWearable->writeToAvatar(gAgentAvatarp);
- self->mSlider->setValue( self->weightToSlider( new_weight ) );
+ if (slider->getMinValue() < new_percent
+ && new_percent < slider->getMaxValue())
+ {
+ self->mWearable->setVisualParamWeight(hint->getVisualParam()->getID(), new_weight);
+ self->mWearable->writeToAvatar(gAgentAvatarp);
+ slider->setValue( self->weightToPercent( new_weight ) );
+ }
}
}
}
LLVisualParamHint::requestHintUpdates( self->mHintMin, self->mHintMax );
}
+
+
+F32 LLScrollingPanelParam::weightToPercent( F32 weight )
+{
+ LLViewerVisualParam* param = mParam;
+ return (weight - param->getMinWeight()) / (param->getMaxWeight() - param->getMinWeight()) * 100.f;
+}
+
+F32 LLScrollingPanelParam::percentToWeight( F32 percent )
+{
+ LLViewerVisualParam* param = mParam;
+ return percent / 100.f * (param->getMaxWeight() - param->getMinWeight()) + param->getMinWeight();
+}
diff --git a/indra/newview/llscrollingpanelparam.h b/indra/newview/llscrollingpanelparam.h
index fd8ef75cdd..1ebf89f483 100644
--- a/indra/newview/llscrollingpanelparam.h
+++ b/indra/newview/llscrollingpanelparam.h
@@ -63,6 +63,9 @@ public:
void onHintMouseDown( LLVisualParamHint* hint );
void onHintHeldDown( LLVisualParamHint* hint );
+ F32 weightToPercent( F32 weight );
+ F32 percentToWeight( F32 percent );
+
public:
// Constants for LLPanelVisualParam
const static F32 PARAM_STEP_TIME_THRESHOLD;
diff --git a/indra/newview/llscrollingpanelparambase.cpp b/indra/newview/llscrollingpanelparambase.cpp
index 4df619ed7d..eb490127a1 100644
--- a/indra/newview/llscrollingpanelparambase.cpp
+++ b/indra/newview/llscrollingpanelparambase.cpp
@@ -43,7 +43,6 @@ LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& pan
LLViewerJointMesh* mesh, LLViewerVisualParam* param, bool allow_modify, LLWearable* wearable, LLJoint* jointp, bool use_hints)
: LLScrollingPanel( panel_params ),
mParam(param),
- mSlider(nullptr),
mAllowModify(allow_modify),
mWearable(wearable)
{
@@ -51,15 +50,13 @@ LLScrollingPanelParamBase::LLScrollingPanelParamBase( const LLPanel::Params& pan
buildFromFile( "panel_scrolling_param.xml");
else
buildFromFile( "panel_scrolling_param_base.xml");
-
- mSlider = getChild<LLSliderCtrl>("param slider");
- mSlider->setMaxValue(100.f * (mParam->getMaxWeight() - mParam->getMinWeight()));
- mSlider->setValue(weightToSlider(param->getWeight()));
+
+ getChild<LLUICtrl>("param slider")->setValue(weightToPercent(param->getWeight()));
std::string display_name = LLTrans::getString(param->getDisplayName());
- mSlider->setLabelArg("[DESC]", display_name);
- mSlider->setEnabled(mAllowModify);
- mSlider->setCommitCallback(boost::bind(LLScrollingPanelParamBase::onSliderMoved, mSlider, this));
+ getChild<LLUICtrl>("param slider")->setLabelArg("[DESC]", display_name);
+ getChildView("param slider")->setEnabled(mAllowModify);
+ childSetCommitCallback("param slider", LLScrollingPanelParamBase::onSliderMoved, this);
setVisible(false);
setBorderVisible( false );
@@ -80,9 +77,9 @@ void LLScrollingPanelParamBase::updatePanel(bool allow_modify)
}
F32 current_weight = mWearable->getVisualParamWeight( param->getID() );
- mSlider->setValue(weightToSlider( current_weight ) );
+ getChild<LLUICtrl>("param slider")->setValue(weightToPercent( current_weight ) );
mAllowModify = allow_modify;
- mSlider->setEnabled(mAllowModify);
+ getChildView("param slider")->setEnabled(mAllowModify);
}
// static
@@ -93,7 +90,7 @@ void LLScrollingPanelParamBase::onSliderMoved(LLUICtrl* ctrl, void* userdata)
LLViewerVisualParam* param = self->mParam;
F32 current_weight = self->mWearable->getVisualParamWeight( param->getID() );
- F32 new_weight = self->sliderToWeight( (F32)slider->getValue().asReal() );
+ F32 new_weight = self->percentToWeight( (F32)slider->getValue().asReal() );
if (current_weight != new_weight )
{
self->mWearable->setVisualParamWeight( param->getID(), new_weight);
@@ -102,12 +99,14 @@ void LLScrollingPanelParamBase::onSliderMoved(LLUICtrl* ctrl, void* userdata)
}
}
-F32 LLScrollingPanelParamBase::weightToSlider(F32 weight)
+F32 LLScrollingPanelParamBase::weightToPercent( F32 weight )
{
- return (weight - mParam->getMinWeight()) * 100.f;
+ LLViewerVisualParam* param = mParam;
+ return (weight - param->getMinWeight()) / (param->getMaxWeight() - param->getMinWeight()) * 100.f;
}
-F32 LLScrollingPanelParamBase::sliderToWeight(F32 slider)
+F32 LLScrollingPanelParamBase::percentToWeight( F32 percent )
{
- return slider / 100.f + mParam->getMinWeight();
+ LLViewerVisualParam* param = mParam;
+ return percent / 100.f * (param->getMaxWeight() - param->getMinWeight()) + param->getMinWeight();
}
diff --git a/indra/newview/llscrollingpanelparambase.h b/indra/newview/llscrollingpanelparambase.h
index 1e9d1628bb..fd686636f2 100644
--- a/indra/newview/llscrollingpanelparambase.h
+++ b/indra/newview/llscrollingpanelparambase.h
@@ -36,7 +36,6 @@ class LLViewerVisualParam;
class LLWearable;
class LLVisualParamHint;
class LLViewerVisualParam;
-class LLSliderCtrl;
class LLJoint;
class LLScrollingPanelParamBase : public LLScrollingPanel
@@ -50,13 +49,11 @@ public:
static void onSliderMoved(LLUICtrl* ctrl, void* userdata);
- F32 weightToSlider(F32 weight);
- F32 sliderToWeight(F32 slider);
+ F32 weightToPercent( F32 weight );
+ F32 percentToWeight( F32 percent );
public:
LLViewerVisualParam* mParam;
- LLSliderCtrl* mSlider;
-
protected:
bool mAllowModify;
LLWearable *mWearable;
diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp
index 5d051d0ebf..bedee32213 100644
--- a/indra/newview/llsculptidsize.cpp
+++ b/indra/newview/llsculptidsize.cpp
@@ -66,7 +66,7 @@ void LLSculptIDSize::inc(const LLDrawable *pdrawable, int sz)
if (itLU.first == itLU.second)
{ //register
//llassert(mSizeInfo.get<tag_BY_DRAWABLE>().end() == mSizeInfo.get<tag_BY_DRAWABLE>().find(pdrawable));
- mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, boost::make_shared<SizeSum>(sz), sculptId));
+ mSizeInfo.get<tag_BY_DRAWABLE>().insert(Info(pdrawable, sz, std::make_shared<SizeSum>(sz), sculptId));
total_size = sz;
}
else
diff --git a/indra/newview/llsculptidsize.h b/indra/newview/llsculptidsize.h
index 87ee417b86..679fcbd44c 100644
--- a/indra/newview/llsculptidsize.h
+++ b/indra/newview/llsculptidsize.h
@@ -52,7 +52,7 @@ public:
struct Info
{
- typedef boost::shared_ptr<SizeSum> PtrSizeSum;
+ typedef std::shared_ptr<SizeSum> PtrSizeSum;
Info(const LLDrawable *drawable, int size, PtrSizeSum sizeInfo, LLUUID sculptId)
: mDrawable(drawable)
diff --git a/indra/newview/llsearchableui.h b/indra/newview/llsearchableui.h
index 31f11eb8ef..84fcefb835 100644
--- a/indra/newview/llsearchableui.h
+++ b/indra/newview/llsearchableui.h
@@ -93,7 +93,7 @@ namespace ll
{
struct SearchableItem;
- typedef boost::shared_ptr< SearchableItem > SearchableItemPtr;
+ typedef std::shared_ptr< SearchableItem > SearchableItemPtr;
typedef std::vector< SearchableItemPtr > tSearchableItemList;
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 64105e5740..eceaa28872 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -1864,7 +1864,7 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
if (mItem && objectp->isAttachment())
{
const LLPermissions& perm = mItem->getPermissions();
- bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
if (!unrestricted)
{
// Attachments are in world and in inventory simultaneously,
@@ -2292,6 +2292,7 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL;
return;
}
+
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
@@ -2300,7 +2301,7 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
return;
}
const LLPermissions& perm = item->getPermissions();
- bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
bool attached = object->isAttachment();
if (attached && !unrestricted)
{
@@ -2311,7 +2312,7 @@ void LLSelectMgr::selectionSetBumpmap(U8 bumpmap, const LLUUID &image_id)
LLToolDragAndDrop::handleDropMaterialProtections(object, item, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
}
getSelection()->applyToTEs(&setfunc);
-
+
LLSelectMgrSendFunctor sendfunc;
getSelection()->applyToObjects(&sendfunc);
}
@@ -2364,6 +2365,7 @@ void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id)
LL_WARNS() << "Attempted to apply no-copy texture to multiple objects" << LL_ENDL;
return;
}
+
if (item && !item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
{
LLViewerObject *object = mSelectedObjects->getFirstRootObject();
@@ -2372,7 +2374,7 @@ void LLSelectMgr::selectionSetShiny(U8 shiny, const LLUUID &image_id)
return;
}
const LLPermissions& perm = item->getPermissions();
- bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
+ bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
bool attached = object->isAttachment();
if (attached && !unrestricted)
{
@@ -3876,7 +3878,7 @@ bool LLSelectMgr::selectIsGroupOwned()
LLSelectGetFirstGroupOwner test;
getFirst(&test);
- return test.mFirstValue.notNull() ? true : false;
+ return test.mFirstValue.notNull();
}
//-----------------------------------------------------------------------------
@@ -6942,7 +6944,7 @@ bool LLSelectNode::allowOperationOnNode(PermissionBit op, U64 group_proxy_power)
if (PERM_OWNER == op)
{
// This this was just a check for ownership, we can now return the answer.
- return (proxy_agent_id == object_owner_id ? true : false);
+ return proxy_agent_id == object_owner_id;
}
// check permissions to see if the agent can operate
@@ -8017,7 +8019,7 @@ bool LLObjectSelection::checkAnimatedObjectLinkable()
bool LLObjectSelection::applyToRootObjects(LLSelectedObjectFunctor* func, bool firstonly)
{
- bool result = firstonly ? false : true;
+ bool result = !firstonly;
for (root_iterator iter = root_begin(); iter != root_end(); )
{
root_iterator nextiter = iter++;
@@ -8035,7 +8037,7 @@ bool LLObjectSelection::applyToRootObjects(LLSelectedObjectFunctor* func, bool f
bool LLObjectSelection::applyToTEs(LLSelectedTEFunctor* func, bool firstonly)
{
- bool result = firstonly ? false : true;
+ bool result = !firstonly;
for (iterator iter = begin(); iter != end(); )
{
iterator nextiter = iter++;
@@ -8061,7 +8063,7 @@ bool LLObjectSelection::applyToTEs(LLSelectedTEFunctor* func, bool firstonly)
bool LLObjectSelection::applyToNodes(LLSelectedNodeFunctor *func, bool firstonly)
{
- bool result = firstonly ? false : true;
+ bool result = !firstonly;
for (iterator iter = begin(); iter != end(); )
{
iterator nextiter = iter++;
@@ -8077,7 +8079,7 @@ bool LLObjectSelection::applyToNodes(LLSelectedNodeFunctor *func, bool firstonly
bool LLObjectSelection::applyToRootNodes(LLSelectedNodeFunctor *func, bool firstonly)
{
- bool result = firstonly ? false : true;
+ bool result = !firstonly;
for (root_iterator iter = root_begin(); iter != root_end(); )
{
root_iterator nextiter = iter++;
diff --git a/indra/newview/llsetkeybinddialog.cpp b/indra/newview/llsetkeybinddialog.cpp
index 1e5a67302a..dc3b34b1b9 100644
--- a/indra/newview/llsetkeybinddialog.cpp
+++ b/indra/newview/llsetkeybinddialog.cpp
@@ -217,7 +217,7 @@ bool LLSetKeyBindDialog::recordAndHandleKey(KEY key, MASK mask, bool down)
// Masks by themself are not allowed
return false;
}
- if (down == true)
+ if (down)
{
// Most keys are handled on 'down' event because menu is handled on 'down'
// masks are exceptions to let other keys be handled
diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 8f7267a54f..0e45385c2e 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -361,6 +361,15 @@ void LLSidepanelAppearance::toggleMyOutfitsPanel(bool visible, const std::string
}
}
+bool LLSidepanelAppearance::isCOFPanelVisible()
+{
+ if (mPanelOutfitsInventory && mPanelOutfitsInventory->getVisible())
+ {
+ return mPanelOutfitsInventory->isCOFPanelActive();
+ }
+ return false;
+}
+
void LLSidepanelAppearance::toggleOutfitEditPanel(bool visible, bool disable_camera_switch)
{
if (!mOutfitEdit || mOutfitEdit->getVisible() == visible)
diff --git a/indra/newview/llsidepanelappearance.h b/indra/newview/llsidepanelappearance.h
index 29d9a4585c..4949f78a3f 100644
--- a/indra/newview/llsidepanelappearance.h
+++ b/indra/newview/llsidepanelappearance.h
@@ -66,6 +66,8 @@ public:
void updateToVisibility( const LLSD& new_visibility );
LLPanelEditWearable* getWearable(){ return mEditWearable; }
+ bool isCOFPanelVisible();
+
private:
void onFilterEdit(const std::string& search_string);
void onVisibilityChanged ( const LLSD& new_visibility );
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 0a76a1f48f..54194e5fe6 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -633,16 +633,14 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
}
// Set values.
- bool is_group_copy = (group_mask & PERM_COPY) ? true : false;
- bool is_group_modify = (group_mask & PERM_MODIFY) ? true : false;
- bool is_group_move = (group_mask & PERM_MOVE) ? true : false;
+ bool is_group_copy = group_mask & PERM_COPY;
+ bool is_group_modify = group_mask & PERM_MODIFY;
+ bool is_group_move = group_mask & PERM_MOVE;
if (is_group_copy && is_group_modify && is_group_move)
{
getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)true));
-
- LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
- if(ctl)
+ if (LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup"))
{
ctl->setTentative(false);
}
@@ -650,22 +648,20 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
else if (!is_group_copy && !is_group_modify && !is_group_move)
{
getChild<LLUICtrl>("CheckShareWithGroup")->setValue(LLSD((bool)false));
- LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
- if(ctl)
+ if (LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup"))
{
ctl->setTentative(false);
}
}
else
{
- LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup");
- if(ctl)
+ if (LLCheckBoxCtrl* ctl = getChild<LLCheckBoxCtrl>("CheckShareWithGroup"))
{
ctl->setTentative(!ctl->getEnabled());
ctl->set(true);
}
}
-
+
getChild<LLUICtrl>("CheckEveryoneCopy")->setValue(LLSD((bool)(everyone_mask & PERM_COPY)));
///////////////
diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp
index 34bd8412f5..fd7d8bcc6c 100644
--- a/indra/newview/lltexturectrl.cpp
+++ b/indra/newview/lltexturectrl.cpp
@@ -1353,19 +1353,19 @@ void LLFloaterTexturePicker::changeMode()
{
int index = mModeSelector->getValue().asInteger();
- mDefaultBtn->setVisible(index == PICKER_INVENTORY ? true : false);
- mBlankBtn->setVisible(index == PICKER_INVENTORY ? true : false);
- mNoneBtn->setVisible(index == PICKER_INVENTORY ? true : false);
- mFilterEdit->setVisible(index == PICKER_INVENTORY ? true : false);
- mInventoryPanel->setVisible(index == PICKER_INVENTORY ? true : false);
+ mDefaultBtn->setVisible(index == PICKER_INVENTORY);
+ mBlankBtn->setVisible(index == PICKER_INVENTORY);
+ mNoneBtn->setVisible(index == PICKER_INVENTORY);
+ mFilterEdit->setVisible(index == PICKER_INVENTORY);
+ mInventoryPanel->setVisible(index == PICKER_INVENTORY);
- getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL ? true : false);
- getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL ? true : false);
- getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL ? true : false);
- getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL ? true : false);
+ getChild<LLButton>("l_add_btn")->setVisible(index == PICKER_LOCAL);
+ getChild<LLButton>("l_rem_btn")->setVisible(index == PICKER_LOCAL);
+ getChild<LLButton>("l_upl_btn")->setVisible(index == PICKER_LOCAL);
+ getChild<LLScrollListCtrl>("l_name_list")->setVisible(index == PICKER_LOCAL);
- getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE ? true : false);
- getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// index == 2 ? true : false);
+ getChild<LLComboBox>("l_bake_use_texture_combo_box")->setVisible(index == PICKER_BAKE);
+ getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(false);// index == 2);
bool pipette_visible = (index == PICKER_INVENTORY)
&& (mInventoryPickType != PICK_MATERIAL);
@@ -2239,8 +2239,8 @@ void LLTextureCtrl::draw()
// Using the discard level, do not show the string if the texture is almost but not
// fully loaded.
if (mTexturep.notNull() &&
- (!mTexturep->isFullyLoaded()) &&
- (mShowLoadingPlaceholder == true))
+ !mTexturep->isFullyLoaded() &&
+ mShowLoadingPlaceholder)
{
U32 v_offset = 25;
LLFontGL* font = LLFontGL::getFontSansSerif();
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index f410217387..e1779ba976 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -529,12 +529,11 @@ void LLGLTexMemBar::draw()
U32 texFetchLatMed = U32(recording.getMean(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
U32 texFetchLatMax = U32(recording.getMax(LLTextureFetch::sTexFetchLatency).value() * 1000.0f);
- text = llformat("GL Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f(%d MB) Cache: %.1f/%.1f MB",
- gViewerWindow->getWindow()->getAvailableVRAMMegabytes(),
+ text = llformat("Est. Free: %d MB Sys Free: %d MB FBO: %d MB Bias: %.2f Cache: %.1f/%.1f MB",
+ (S32)LLViewerTexture::sFreeVRAMMegabytes,
LLMemory::getAvailableMemKB()/1024,
LLRenderTarget::sBytesAllocated/(1024*1024),
discard_bias,
- (S32)LLViewerTexture::sFreeVRAMMegabytes,
cache_usage,
cache_max_usage);
//, cache_entries, cache_max_entries
diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp
index 5cf2e89c63..f6fadf276c 100644
--- a/indra/newview/lltoast.cpp
+++ b/indra/newview/lltoast.cpp
@@ -119,7 +119,7 @@ LLToast::LLToast(const LLToast::Params& p)
{
mTimer.reset(new LLToastLifeTimer(this, p.lifetime_secs));
- buildFromFile("panel_toast.xml", true);
+ buildFromFile("panel_toast.xml");
setCanDrag(false);
diff --git a/indra/newview/lltoastimpanel.cpp b/indra/newview/lltoastimpanel.cpp
index e4f4a94bf1..910e42addf 100644
--- a/indra/newview/lltoastimpanel.cpp
+++ b/indra/newview/lltoastimpanel.cpp
@@ -119,7 +119,7 @@ LLToastIMPanel::~LLToastIMPanel()
//virtual
bool LLToastIMPanel::handleMouseUp(S32 x, S32 y, MASK mask)
{
- if (LLPanel::handleMouseUp(x,y,mask) == false)
+ if (!LLPanel::handleMouseUp(x, y, mask))
{
mNotification->respond(mNotification->getResponseTemplate());
}
diff --git a/indra/newview/lltoastnotifypanel.cpp b/indra/newview/lltoastnotifypanel.cpp
index f7bebf08aa..1f6a88cd95 100644
--- a/indra/newview/lltoastnotifypanel.cpp
+++ b/indra/newview/lltoastnotifypanel.cpp
@@ -266,9 +266,9 @@ void LLToastNotifyPanel::init( LLRect rect, bool show_images )
LLRect current_rect = getRect();
setXMLFilename("");
- buildFromFile("panel_notification.xml", true);
+ buildFromFile("panel_notification.xml");
- if (rect != LLRect::null)
+ if(rect != LLRect::null)
{
this->setShape(rect);
}
diff --git a/indra/newview/lltoastscriptquestion.cpp b/indra/newview/lltoastscriptquestion.cpp
index 49fbf885eb..f6fc9e7889 100644
--- a/indra/newview/lltoastscriptquestion.cpp
+++ b/indra/newview/lltoastscriptquestion.cpp
@@ -37,7 +37,7 @@ LLToastScriptQuestion::LLToastScriptQuestion(const LLNotificationPtr& notificati
:
LLToastPanel(notification)
{
- buildFromFile("panel_script_question_toast.xml", true);
+ buildFromFile("panel_script_question_toast.xml");
}
bool LLToastScriptQuestion::postBuild()
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 109e6895d0..75ea1046a9 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -46,8 +46,6 @@
#include "llviewercontrol.h" // HACK for destinations guide on startup
#include "llinventorymodel.h" // HACK to disable starter avatars button for NUX
-#include <boost/foreach.hpp>
-
LLToolBarView* gToolBarView = NULL;
static LLDefaultChildRegistry::Register<LLToolBarView> r("toolbar_view");
@@ -282,7 +280,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLToolBarEnums::ButtonType button_type = toolbar_set.left_toolbar.button_display_mode;
mToolbars[LLToolBarEnums::TOOLBAR_LEFT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.left_toolbar.commands)
+ for (const LLCommandId::Params& command_params : toolbar_set.left_toolbar.commands)
{
if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_LEFT]))
{
@@ -297,7 +295,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLToolBarEnums::ButtonType button_type = toolbar_set.right_toolbar.button_display_mode;
mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.right_toolbar.commands)
+ for (const LLCommandId::Params& command_params : toolbar_set.right_toolbar.commands)
{
if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_RIGHT]))
{
@@ -312,7 +310,7 @@ bool LLToolBarView::loadToolbars(bool force_default)
LLToolBarEnums::ButtonType button_type = toolbar_set.bottom_toolbar.button_display_mode;
mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]->setButtonType(button_type);
}
- BOOST_FOREACH(const LLCommandId::Params& command_params, toolbar_set.bottom_toolbar.commands)
+ for (const LLCommandId::Params& command_params : toolbar_set.bottom_toolbar.commands)
{
if (!addCommandInternal(LLCommandId(command_params), mToolbars[LLToolBarEnums::TOOLBAR_BOTTOM]))
{
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 304784cace..49c3cb1304 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -1672,13 +1672,13 @@ void LLToolDragAndDrop::dropObject(LLViewerObject* raycast_target,
// currently the ray's end point is an approximation,
// and is sometimes too short (causing failure.) so we
// double the ray's length:
- if (bypass_sim_raycast == false)
+ if (!bypass_sim_raycast)
{
LLVector3 ray_direction = ray_start - ray_end;
ray_end = ray_end - ray_direction;
}
-
-
+
+
// Message packing code should be it's own uninterrupted block
LLMessageSystem* msg = gMessageSystem;
if (mSource == SOURCE_NOTECARD)
@@ -1835,7 +1835,9 @@ void LLToolDragAndDrop::dropInventory(LLViewerObject* hit_obj,
EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LLInventoryItem* item, EDragAndDropType type)
{
// check the basics
- if (!item || !obj) return ACCEPT_NO;
+ if (!item || !obj)
+ return ACCEPT_NO;
+
// HACK: downcast
LLViewerInventoryItem* vitem = (LLViewerInventoryItem*)item;
if (!vitem->isFinished() && (type != DAD_CATEGORY))
@@ -1846,13 +1848,14 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
// Library or agent inventory only.
return ACCEPT_NO;
}
- if (vitem->getIsLinkType()) return ACCEPT_NO; // No giving away links
+ if (vitem->getIsLinkType())
+ return ACCEPT_NO; // No giving away links
// deny attempts to drop from an object onto itself. This is to
// help make sure that drops that are from an object to an object
// don't have to worry about order of evaluation. Think of this
// like check for self in assignment.
- if(obj->getID() == item->getParentUUID())
+ if (obj->getID() == item->getParentUUID())
{
return ACCEPT_NO;
}
@@ -1862,7 +1865,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
// && (obj->mPermModify || obj->mFlagAllowInventoryAdd));
bool worn = false;
LLVOAvatarSelf* my_avatar = NULL;
- switch(item->getType())
+ switch (item->getType())
{
case LLAssetType::AT_OBJECT:
my_avatar = gAgentAvatarp;
@@ -1873,7 +1876,7 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
break;
case LLAssetType::AT_BODYPART:
case LLAssetType::AT_CLOTHING:
- if(gAgentWearables.isWearingItem(item->getUUID()))
+ if (gAgentWearables.isWearingItem(item->getUUID()))
{
worn = true;
}
@@ -1883,33 +1886,37 @@ EAcceptance LLToolDragAndDrop::willObjectAcceptInventory(LLViewerObject* obj, LL
// because of incomplete LSL support. See STORM-1117.
return ACCEPT_NO;
default:
- break;
+ break;
}
const LLPermissions& perm = item->getPermissions();
bool modify = (obj->permModify() || obj->flagAllowInventoryAdd());
bool transfer = false;
- if((obj->permYouOwner() && (perm.getOwner() == gAgent.getID()))
+ if ((obj->permYouOwner() && (perm.getOwner() == gAgent.getID()))
|| perm.allowOperationBy(PERM_TRANSFER, gAgent.getID()))
{
transfer = true;
}
bool volume = (LL_PCODE_VOLUME == obj->getPCode());
bool attached = obj->isAttachment();
- bool unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? true : false;
- if(attached && !unrestricted)
+ bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
+
+ if (attached && !unrestricted)
{
// Attachments are in world and in inventory simultaneously,
// at the moment server doesn't support such a situation.
return ACCEPT_NO_LOCKED;
}
- else if(modify && transfer && volume && !worn)
+
+ if (modify && transfer && volume && !worn)
{
return ACCEPT_YES_MULTI;
}
- else if(!modify)
+
+ if (!modify)
{
return ACCEPT_NO_LOCKED;
}
+
return ACCEPT_NO;
}
@@ -2599,41 +2606,41 @@ EAcceptance LLToolDragAndDrop::dad3dWearCategory(
return ACCEPT_NO_CUSTOM;
}
- if(mSource == SOURCE_AGENT)
+ if (mSource == SOURCE_AGENT)
{
const LLUUID trash_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_TRASH);
- if( gInventory.isObjectDescendentOf( category->getUUID(), trash_id ) )
+ if (gInventory.isObjectDescendentOf(category->getUUID(), trash_id))
{
return ACCEPT_NO;
}
const LLUUID &outbox_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_OUTBOX);
- if(outbox_id.notNull() && gInventory.isObjectDescendentOf(category->getUUID(), outbox_id))
+ if (outbox_id.notNull() && gInventory.isObjectDescendentOf(category->getUUID(), outbox_id))
{
// Legacy
return ACCEPT_NO;
}
- if(drop)
+ if (drop)
{
- bool append = ( (mask & MASK_SHIFT) ? true : false );
- LLAppearanceMgr::instance().wearInventoryCategory(category, false, append);
+ LLAppearanceMgr::instance().wearInventoryCategory(category, false, mask & MASK_SHIFT);
}
+
return ACCEPT_YES_MULTI;
}
- else if(mSource == SOURCE_LIBRARY)
+
+ if (mSource == SOURCE_LIBRARY)
{
- if(drop)
+ if (drop)
{
LLAppearanceMgr::instance().wearInventoryCategory(category, true, false);
}
+
return ACCEPT_YES_MULTI;
}
- else
- {
- // TODO: copy/move category to avatar's inventory and then wear it.
- return ACCEPT_NO;
- }
+
+ // TODO: copy/move category to avatar's inventory and then wear it.
+ return ACCEPT_NO;
}
@@ -2644,15 +2651,15 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
// *HACK: In order to resolve SL-22177, we need to block drags
// from notecards and objects onto other objects.
- if((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource))
- {
+ if ((SOURCE_WORLD == mSource) || (SOURCE_NOTECARD == mSource))
return ACCEPT_NO;
- }
LLViewerInventoryItem* item;
LLViewerInventoryCategory* cat;
locateInventory(item, cat);
- if (!item || !item->isFinished()) return ACCEPT_NO;
+ if (!item || !item->isFinished())
+ return ACCEPT_NO;
+
LLViewerObject* root_object = obj;
if (obj && obj->getParent())
{
@@ -2664,17 +2671,18 @@ EAcceptance LLToolDragAndDrop::dad3dUpdateInventory(
}
EAcceptance rv = willObjectAcceptInventory(root_object, item);
- if(root_object && drop && (ACCEPT_YES_COPY_SINGLE <= rv))
+ if (root_object && drop && (ACCEPT_YES_COPY_SINGLE <= rv))
{
dropInventory(root_object, item, mSource, mSourceID);
}
+
return rv;
}
bool LLToolDragAndDrop::dadUpdateInventory(LLViewerObject* obj, bool drop)
{
EAcceptance rv = dad3dUpdateInventory(obj, -1, MASK_NONE, drop);
- return (rv >= ACCEPT_YES_COPY_SINGLE);
+ return rv >= ACCEPT_YES_COPY_SINGLE;
}
EAcceptance LLToolDragAndDrop::dad3dUpdateInventoryCategory(
diff --git a/indra/newview/lltoolmgr.cpp b/indra/newview/lltoolmgr.cpp
index 63545ee5b0..a4f43bde11 100644
--- a/indra/newview/lltoolmgr.cpp
+++ b/indra/newview/lltoolmgr.cpp
@@ -145,12 +145,13 @@ LLToolMgr::~LLToolMgr()
bool LLToolMgr::usingTransientTool()
{
- return mTransientTool ? true : false;
+ return mTransientTool != nullptr;
}
void LLToolMgr::setCurrentToolset(LLToolset* current)
{
- if (!current) return;
+ if (!current)
+ return;
// switching toolsets?
if (current != mCurrentToolset)
@@ -164,6 +165,7 @@ void LLToolMgr::setCurrentToolset(LLToolset* current)
// select first tool of new toolset only if toolset changed
mCurrentToolset->selectFirstTool();
}
+
// update current tool based on new toolset
setCurrentTool( mCurrentToolset->getSelectedTool() );
}
diff --git a/indra/newview/lluiavatar.h b/indra/newview/lluiavatar.h
index bcdffedef2..d9fe003155 100644
--- a/indra/newview/lluiavatar.h
+++ b/indra/newview/lluiavatar.h
@@ -39,6 +39,7 @@ public:
LLUIAvatar(const LLUUID &id, const LLPCode pcode, LLViewerRegion *regionp);
virtual void initInstance(); // Called after construction to initialize the class.
virtual ~LLUIAvatar();
+ virtual bool isBuddy() const { return false; }
};
#endif //LL_CONTROLAVATAR_H
diff --git a/indra/newview/llvieweraudio.cpp b/indra/newview/llvieweraudio.cpp
index 66184abd37..318cf199c0 100644
--- a/indra/newview/llvieweraudio.cpp
+++ b/indra/newview/llvieweraudio.cpp
@@ -74,7 +74,7 @@ LLViewerAudio::~LLViewerAudio()
void LLViewerAudio::registerIdleListener()
{
- if(mIdleListnerActive==false)
+ if (!mIdleListnerActive)
{
mIdleListnerActive = true;
doOnIdleRepeating(boost::bind(boost::bind(&LLViewerAudio::onIdleUpdate, this)));
diff --git a/indra/newview/llviewercontrol.cpp b/indra/newview/llviewercontrol.cpp
index 2a248cd120..b809f06e3a 100644
--- a/indra/newview/llviewercontrol.cpp
+++ b/indra/newview/llviewercontrol.cpp
@@ -251,7 +251,7 @@ static bool handleVSyncChanged(const LLSD& newvalue)
LLPerfStats::tunables.vsyncEnabled = newvalue.asBoolean();
gViewerWindow->getWindow()->toggleVSync(newvalue.asBoolean());
- if(newvalue.asBoolean() == true)
+ if (newvalue.asBoolean())
{
U32 current_target = gSavedSettings.getU32("TargetFPS");
gSavedSettings.setU32("TargetFPS", std::min((U32)gViewerWindow->getWindow()->getRefreshRate(), current_target));
@@ -281,12 +281,12 @@ static bool handleAvatarPhysicsLODChanged(const LLSD& newvalue)
static bool handleTerrainLODChanged(const LLSD& newvalue)
{
- LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal();
- //sqaure lod factor to get exponential range of [0,4] and keep
- //a value of 1 in the middle of the detail slider for consistency
- //with other detail sliders (see panel_preferences_graphics1.xml)
- LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor;
- return true;
+ LLVOSurfacePatch::sLODFactor = (F32)newvalue.asReal();
+ //sqaure lod factor to get exponential range of [0,4] and keep
+ //a value of 1 in the middle of the detail slider for consistency
+ //with other detail sliders (see panel_preferences_graphics1.xml)
+ LLVOSurfacePatch::sLODFactor *= LLVOSurfacePatch::sLODFactor;
+ return true;
}
static bool handleTreeLODChanged(const LLSD& newvalue)
diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp
index f8f466be45..4c32459a94 100644
--- a/indra/newview/llviewerdisplay.cpp
+++ b/indra/newview/llviewerdisplay.cpp
@@ -892,7 +892,7 @@ void display(bool rebuild, F32 zoom_factor, int subfield, bool for_snapshot)
// gGL.popMatrix();
//}
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? true : false;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater();
LLGLState::checkStates();
@@ -1099,7 +1099,7 @@ void display_cube_face()
LLAppViewer::instance()->pingMainloopTimeout("Display:RenderStart");
- LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater() ? true : false;
+ LLPipeline::sUnderWaterRender = LLViewerCamera::getInstance()->cameraUnderWater();
gGL.setColorMask(true, true);
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index 8353d4d1d7..1b34bed2da 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -87,6 +87,7 @@
#include "llfloaterimsession.h"
#include "llfloaterinspect.h"
#include "llfloaterinventorysettings.h"
+#include "llfloaterinventorythumbnailshelper.h"
#include "llfloaterjoystick.h"
#include "llfloaterlagmeter.h"
#include "llfloaterland.h"
@@ -249,6 +250,7 @@ public:
"group_picker",
"hud",
"incoming_call",
+ "inventory_thumbnails_helper",
"linkreplace",
"mem_leaking",
"marketplace_validation",
@@ -335,7 +337,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("build", "floater_tools.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterTools>);
LLFloaterReg::add("build_options", "floater_build_options.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBuildOptions>);
LLFloaterReg::add("bumps", "floater_bumps.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterBump>);
-
+
LLFloaterReg::add("camera", "floater_camera.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCamera>);
LLFloaterReg::add("camera_presets", "floater_camera_presets.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterCameraPresets>);
LLFloaterReg::add("chat_voice", "floater_voice_chat_volume.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterChatVoiceVolume>);
@@ -384,6 +386,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>);
LLFloaterReg::add("inventory", "floater_my_inventory.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSidePanelContainer>);
LLFloaterReg::add("inspect", "floater_inspect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInspect>);
+ LLFloaterReg::add("inventory_thumbnails_helper", "floater_inventory_thumbnails_helper.xml", (LLFloaterBuildFunc) &LLFloaterReg::build<LLFloaterInventoryThumbnailsHelper>);
LLFloaterReg::add("item_properties", "floater_item_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterItemProperties>);
LLFloaterReg::add("task_properties", "floater_task_properties.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterItemProperties>);
LLFloaterReg::add("inventory_settings", "floater_inventory_settings.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterInventorySettings>);
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 3082165538..937f016e16 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -668,15 +668,14 @@ void LLViewerInventoryCategory::setVersion(S32 version)
mVersion = version;
}
-bool LLViewerInventoryCategory::fetch()
+bool LLViewerInventoryCategory::fetch(S32 expiry_seconds)
{
if((VERSION_UNKNOWN == getVersion())
&& mDescendentsRequested.hasExpired()) //Expired check prevents multiple downloads.
{
LL_DEBUGS(LOG_INV) << "Fetching category children: " << mName << ", UUID: " << mUUID << LL_ENDL;
- const F32 FETCH_TIMER_EXPIRY = 10.0f;
mDescendentsRequested.reset();
- mDescendentsRequested.setTimerExpirySec(FETCH_TIMER_EXPIRY);
+ mDescendentsRequested.setTimerExpirySec(expiry_seconds);
std::string url;
if (gAgent.getRegion())
@@ -685,7 +684,7 @@ bool LLViewerInventoryCategory::fetch()
}
else
{
- LL_WARNS(LOG_INV) << "agent region is null" << LL_ENDL;
+ LL_WARNS_ONCE(LOG_INV) << "agent region is null" << LL_ENDL;
}
if (!url.empty() || AISAPI::isAvailable())
{
@@ -709,7 +708,13 @@ LLViewerInventoryCategory::EFetchType LLViewerInventoryCategory::getFetching()
void LLViewerInventoryCategory::setFetching(LLViewerInventoryCategory::EFetchType fetching)
{
- if (fetching > mFetching) // allow a switch from normal to recursive
+ if (fetching == FETCH_FAILED)
+ {
+ const F32 FETCH_FAILURE_EXPIRY = 60.0f;
+ mDescendentsRequested.setTimerExpirySec(FETCH_FAILURE_EXPIRY);
+ mFetching = fetching;
+ }
+ else if (fetching > mFetching) // allow a switch from normal to recursive
{
if (mDescendentsRequested.hasExpired() || (mFetching == FETCH_NONE))
{
diff --git a/indra/newview/llviewerinventory.h b/indra/newview/llviewerinventory.h
index 997b98db9b..bb6a6edf55 100644
--- a/indra/newview/llviewerinventory.h
+++ b/indra/newview/llviewerinventory.h
@@ -209,13 +209,15 @@ public:
S32 getVersion() const;
void setVersion(S32 version);
- // Returns true if a fetch was issued (not nessesary in progress).
- bool fetch();
+ // Returns true if a fetch was issued (not nessesary in progress).
+ // no requests will happen during expiry_seconds even if fetch completed
+ bool fetch(S32 expiry_seconds = 10);
typedef enum {
FETCH_NONE = 0,
FETCH_NORMAL,
FETCH_RECURSIVE,
+ FETCH_FAILED, // back off
} EFetchType;
EFetchType getFetching();
// marks as fetch being in progress or as done
diff --git a/indra/newview/llviewerjoystick.cpp b/indra/newview/llviewerjoystick.cpp
index a53b8ebd88..0aba982ba9 100644
--- a/indra/newview/llviewerjoystick.cpp
+++ b/indra/newview/llviewerjoystick.cpp
@@ -342,7 +342,7 @@ void LLViewerJoystick::init(bool autoenable)
loadDeviceIdFromSettings();
- if (libinit == false)
+ if (!libinit)
{
// Note: The HotPlug callbacks are not actually getting called on Windows
if (ndof_libinit(HotPlugAddCallback,
@@ -401,10 +401,10 @@ void LLViewerJoystick::init(bool autoenable)
// Autoenable the joystick for recognized devices if nothing was connected previously
if (!autoenable)
{
- autoenable = gSavedSettings.getString("JoystickInitialized").empty() ? true : false;
+ autoenable = gSavedSettings.getString("JoystickInitialized").empty();
}
updateEnabled(autoenable);
-
+
if (mDriverState == JDS_INITIALIZED)
{
// A Joystick device is plugged in
diff --git a/indra/newview/llviewermedia.h b/indra/newview/llviewermedia.h
index 5b4e1096f7..dda74ec2fa 100644
--- a/indra/newview/llviewermedia.h
+++ b/indra/newview/llviewermedia.h
@@ -431,7 +431,7 @@ private:
private:
// a single media url with some data and an impl.
- boost::shared_ptr<LLPluginClassMedia> mMediaSource;
+ std::shared_ptr<LLPluginClassMedia> mMediaSource;
LLMutex mLock;
F64 mZoomFactor;
LLUUID mTextureId;
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index 668c63bbee..b3f9bab332 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -102,6 +102,7 @@
#include "llsceneview.h"
#include "llscenemonitor.h"
#include "llselectmgr.h"
+#include "llsidepanelappearance.h"
#include "llspellcheckmenuhandler.h"
#include "llstatusbar.h"
#include "lltextureview.h"
@@ -937,7 +938,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
std::string mode = userdata.asString();
if (mode == "none")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == true)
+ if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY))
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -945,7 +946,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "current")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY))
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -953,7 +954,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "desired")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY))
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -962,7 +963,7 @@ class LLAdvancedSetDisplayTextureDensity : public view_listener_t
}
else if (mode == "full")
{
- if (gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY) == false)
+ if (!gPipeline.hasRenderDebugMask(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY))
{
gPipeline.toggleRenderDebug(LLPipeline::RENDER_DEBUG_TEXEL_DENSITY);
}
@@ -1464,6 +1465,31 @@ class LLAdvancedCheckDebugUnicode : public view_listener_t
+//////////////////
+// DEBUG CAMERA //
+//////////////////
+
+
+class LLAdvancedToggleDebugCamera : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ LLView::sDebugCamera = !(LLView::sDebugCamera);
+ LLFloaterCamera::onDebugCameraToggled();
+ return true;
+ }
+};
+
+class LLAdvancedCheckDebugCamera : public view_listener_t
+{
+ bool handleEvent(const LLSD& userdata)
+ {
+ return LLView::sDebugCamera;
+ }
+};
+
+
+
///////////////////////
// XUI NAME TOOLTIPS //
///////////////////////
@@ -6772,6 +6798,13 @@ void handle_edit_outfit()
void handle_now_wearing()
{
+ LLSidepanelAppearance *panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLFloaterSidePanelContainer::getPanel("appearance"));
+ if (panel_appearance && panel_appearance->isInVisibleChain() && panel_appearance->isCOFPanelVisible())
+ {
+ LLFloaterReg::findInstance("appearance")->closeFloater();
+ return;
+ }
+
LLFloaterSidePanelContainer::showPanel("appearance", LLSD().with("type", "now_wearing"));
}
@@ -9643,6 +9676,8 @@ void initialize_menus()
view_listener_t::addMenu(new LLAdvancedToggleDebugViews(), "Advanced.ToggleDebugViews");
view_listener_t::addMenu(new LLAdvancedCheckDebugUnicode(), "Advanced.CheckDebugUnicode");
view_listener_t::addMenu(new LLAdvancedToggleDebugUnicode(), "Advanced.ToggleDebugUnicode");
+ view_listener_t::addMenu(new LLAdvancedCheckDebugCamera(), "Advanced.CheckDebugCamera");
+ view_listener_t::addMenu(new LLAdvancedToggleDebugCamera(), "Advanced.ToggleDebugCamera");
view_listener_t::addMenu(new LLAdvancedToggleXUINameTooltips(), "Advanced.ToggleXUINameTooltips");
view_listener_t::addMenu(new LLAdvancedCheckXUINameTooltips(), "Advanced.CheckXUINameTooltips");
view_listener_t::addMenu(new LLAdvancedToggleDebugMouseEvents(), "Advanced.ToggleDebugMouseEvents");
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 888a31b17a..5681047b89 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -451,7 +451,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad
//and compare them to the extension of the file
//to be uploaded
for (token_iter = tokens.begin();
- token_iter != tokens.end() && ext_valid != true;
+ token_iter != tokens.end() && !ext_valid;
++token_iter)
{
const std::string& cur_token = *token_iter;
@@ -464,7 +464,7 @@ const bool check_file_extension(const std::string& filename, LLFilePicker::ELoad
}
}//end for (loop over all tokens)
- if (ext_valid == false)
+ if (!ext_valid)
{
//should only get here if the extension exists
//but is invalid
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index ff2ee693fd..6b9df6df28 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -145,7 +145,7 @@ public:
virtual void notify(const std::vector<std::string>& filenames);
private:
- boost::shared_ptr<LLPluginClassMedia> mPlugin;
+ std::shared_ptr<LLPluginClassMedia> mPlugin;
};
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index d417a94ab4..348206bd30 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -119,8 +119,6 @@
#include "llviewerregion.h"
#include "llfloaterregionrestarting.h"
-#include <boost/foreach.hpp>
-
#include "llnotificationmanager.h" //
#include "llexperiencecache.h"
@@ -189,7 +187,7 @@ void accept_friendship_coro(std::string url, LLSD notification)
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("Friendship") << "Server failed to process accepted friendship. " << httpResults << LL_ENDL;
}
@@ -232,7 +230,7 @@ void decline_friendship_coro(std::string url, LLSD notification, S32 option)
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("Friendship") << "Server failed to process declined friendship. " << httpResults << LL_ENDL;
}
@@ -276,7 +274,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
// This will also trigger an onlinenotification if the user is online
std::string url = gAgent.getRegionCapability("AcceptFriendship");
LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL;
- if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false)
+ if (!url.empty() && payload.has("online") && !payload["online"].asBoolean())
{
LL_DEBUGS("Friendship") << "Accepting friendship via capability" << LL_ENDL;
LLCoros::instance().launch("LLMessageSystem::acceptFriendshipOffer",
@@ -316,7 +314,7 @@ bool friendship_offer_callback(const LLSD& notification, const LLSD& response)
// the rejection to the simulator to delete the pending userop.
std::string url = gAgent.getRegionCapability("DeclineFriendship");
LL_DEBUGS("Friendship") << "Cap string: " << url << LL_ENDL;
- if (!url.empty() && payload.has("online") && payload["online"].asBoolean() == false)
+ if (!url.empty() && payload.has("online") && !payload["online"].asBoolean())
{
LL_DEBUGS("Friendship") << "Declining friendship via capability" << LL_ENDL;
LLCoros::instance().launch("LLMessageSystem::declineFriendshipOffer",
@@ -776,7 +774,7 @@ void response_group_invitation_coro(std::string url, LLUUID group_id, bool notif
}
else
{
- if (!result.has("success") || result["success"].asBoolean() == false)
+ if (!result.has("success") || !result["success"].asBoolean())
{
LL_WARNS("GroupInvite") << "Server failed to process group " << group_id << " invitation response. " << httpResults << LL_ENDL;
}
@@ -2043,25 +2041,29 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
std::string from_string; // Used in the pop-up.
std::string chatHistory_string; // Used in chat history.
- if (mFromObject == true)
+ if (mFromObject)
{
+ std::string quot = LLTrans::getString("'");
if (mFromGroup)
{
std::string group_name;
if (gCacheName->getGroupName(mFromID, group_name))
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'"
- + mFromName + LLTrans::getString("'") +" " + LLTrans::getString("InvOfferOwnedByGroup")
- + " "+ "'" + group_name + "'";
-
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByGroup")
- + " " + group_name + "'";
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByGroup") + " " +
+ quot + group_name + quot;
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByGroup") + " " +
+ quot + group_name + quot;
}
else
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+"'"
- + mFromName +"'"+ " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownGroup");
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownGroup");
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownGroup");
}
}
else
@@ -2069,15 +2071,19 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
LLAvatarName av_name;
if (LLAvatarNameCache::get(mFromID, &av_name))
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+ LLTrans::getString("'") + mFromName
- + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedBy") + av_name.getUserName();
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedBy") + " " + av_name.getUserName();
}
else
{
- from_string = LLTrans::getString("InvOfferAnObjectNamed") + " "+LLTrans::getString("'")
- + mFromName + LLTrans::getString("'")+" " + LLTrans::getString("InvOfferOwnedByUnknownUser");
- chatHistory_string = mFromName + " " + LLTrans::getString("InvOfferOwnedByUnknownUser");
+ from_string = LLTrans::getString("InvOfferAnObjectNamed") + " " +
+ quot + mFromName + quot + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownUser");
+ chatHistory_string = mFromName + " " +
+ LLTrans::getString("InvOfferOwnedByUnknownUser");
}
}
}
@@ -2085,7 +2091,7 @@ bool LLOfferInfo::inventory_task_offer_callback(const LLSD& notification, const
{
from_string = chatHistory_string = mFromName;
}
-
+
LLUUID destination;
bool accept = true;
@@ -4165,6 +4171,12 @@ void process_avatar_animation(LLMessageSystem *mesgsys, void **user_data)
LLVOAvatar::AnimSourceIterator anim_it = avatarp->mAnimationSources.find(object_id);
for (;anim_it != avatarp->mAnimationSources.end(); ++anim_it)
{
+ if (anim_it->first != object_id)
+ {
+ // elements with the same key are always contiguous, bail if we went past the
+ // end of this object's animations
+ break;
+ }
if (anim_it->second == animation_id)
{
anim_found = true;
@@ -5627,7 +5639,7 @@ void notify_cautioned_script_question(const LLSD& notification, const LLSD& resp
bool caution = false;
S32 count = 0;
std::string perms;
- BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS)
+ for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS)
{
if ((orig_questions & script_perm.permbit)
&& script_perm.caution)
@@ -5871,7 +5883,7 @@ void process_script_question(LLMessageSystem *msg, void **user_data)
S32 known_questions = 0;
bool has_not_only_debit = questions ^ SCRIPT_PERMISSIONS[SCRIPT_PERMISSION_DEBIT].permbit;
// check the received permission flags against each permission
- BOOST_FOREACH(script_perm_t script_perm, SCRIPT_PERMISSIONS)
+ for (const script_perm_t& script_perm : SCRIPT_PERMISSIONS)
{
if (questions & script_perm.permbit)
{
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index 668596b96c..8b9a59a79b 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2711,7 +2711,7 @@ void LLViewerObject::doUpdateInventory(
deleteInventoryItem(item_id);
LLPermissions perm(item->getPermissions());
LLPermissions* obj_perm = LLSelectMgr::getInstance()->findObjectPermissions(this);
- bool is_atomic = ((S32)LLAssetType::AT_OBJECT == item->getType()) ? false : true;
+ bool is_atomic = (S32)LLAssetType::AT_OBJECT != item->getType();
if(obj_perm)
{
perm.setOwnerAndGroup(LLUUID::null, obj_perm->getOwner(), obj_perm->getGroup(), is_atomic);
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index 8e22576265..729098623f 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -2043,6 +2043,7 @@ void LLViewerObjectList::findOrphans(LLViewerObject* objectp, U32 ip, U32 port)
{
LL_WARNS() << objectp->mID << " has self as parent, skipping!"
<< LL_ENDL;
+ ++iter;
continue;
}
diff --git a/indra/newview/llvieweroctree.cpp b/indra/newview/llvieweroctree.cpp
index 420f02d759..079fa82545 100644
--- a/indra/newview/llvieweroctree.cpp
+++ b/indra/newview/llvieweroctree.cpp
@@ -760,7 +760,7 @@ bool LLViewerOctreeGroup::boundObjects(bool empty, LLVector4a& minOut, LLVector4
//virtual
bool LLViewerOctreeGroup::isVisible() const
{
- return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame() ? true : false;
+ return mVisible[LLViewerCamera::sCurCameraID] >= LLViewerOctreeEntryData::getCurrentFrame();
}
//virtual
@@ -888,7 +888,7 @@ LLOcclusionCullingGroup::~LLOcclusionCullingGroup()
bool LLOcclusionCullingGroup::needsUpdate()
{
- return (LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash) ? true : false;
+ return LLDrawable::getCurrentFrame() % mSpatialPartition->mLODPeriod == mLODHash;
}
bool LLOcclusionCullingGroup::isRecentlyVisible() const
@@ -906,7 +906,7 @@ bool LLOcclusionCullingGroup::isAnyRecentlyVisible() const
//virtual
void LLOcclusionCullingGroup::handleChildAddition(const OctreeNode* parent, OctreeNode* child)
{
- if (child->getListenerCount() == 0)
+ if (!child->hasListeners())
{
new LLOcclusionCullingGroup(child, mSpatialPartition);
}
diff --git a/indra/newview/llvieweroctree.h b/indra/newview/llvieweroctree.h
index 7d9dfe7605..e655845077 100644
--- a/indra/newview/llvieweroctree.h
+++ b/indra/newview/llvieweroctree.h
@@ -299,14 +299,14 @@ public:
LLOcclusionCullingGroup(const LLOcclusionCullingGroup& rhs) : LLViewerOctreeGroup(rhs)
{
*this = rhs;
- }
+ }
void setOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
void clearOcclusionState(U32 state, S32 mode = STATE_MODE_SINGLE);
void checkOcclusion(); //read back last occlusion query (if any)
void doOcclusion(LLCamera* camera, const LLVector4a* shift = NULL); //issue occlusion query
- bool isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state ? true : false; }
- U32 getOcclusionState() const { return mOcclusionState[LLViewerCamera::sCurCameraID];}
+ bool isOcclusionState(U32 state) const { return mOcclusionState[LLViewerCamera::sCurCameraID] & state; }
+ U32 getOcclusionState() const { return mOcclusionState[LLViewerCamera::sCurCameraID];}
bool needsUpdate();
U32 getLastOcclusionIssuedTime();
@@ -325,7 +325,7 @@ public:
protected:
void releaseOcclusionQueryObjectNames();
-private:
+private:
bool earlyFail(LLCamera* camera, const LLVector4a* bounds);
protected:
@@ -338,7 +338,7 @@ protected:
U32 mOcclusionQuery[LLViewerCamera::NUM_CAMERAS];
U32 mOcclusionCheckCount[LLViewerCamera::NUM_CAMERAS];
-public:
+public:
static std::set<U32> sPendingQueries;
};//LL_ALIGN_POSTFIX(16);
@@ -356,7 +356,7 @@ protected:
// MUST call from destructor of any derived classes (SL-17276)
void cleanup();
-public:
+public:
U32 mPartitionType;
U32 mDrawableType;
OctreeNode* mOctree;
@@ -376,7 +376,7 @@ public:
protected:
virtual bool earlyFail(LLViewerOctreeGroup* group);
-
+
//agent space group cull
S32 AABBInFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
S32 AABBSphereIntersectGroupExtents(const LLViewerOctreeGroup* group);
@@ -386,7 +386,7 @@ protected:
S32 AABBInFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
S32 AABBSphereIntersectObjectExtents(const LLViewerOctreeGroup* group);
S32 AABBInFrustumObjectBounds(const LLViewerOctreeGroup* group);
-
+
//local region space group cull
S32 AABBInRegionFrustumNoFarClipGroupBounds(const LLViewerOctreeGroup* group);
S32 AABBInRegionFrustumGroupBounds(const LLViewerOctreeGroup* group);
@@ -396,7 +396,7 @@ protected:
S32 AABBInRegionFrustumNoFarClipObjectBounds(const LLViewerOctreeGroup* group);
S32 AABBInRegionFrustumObjectBounds(const LLViewerOctreeGroup* group);
S32 AABBRegionSphereIntersectObjectExtents(const LLViewerOctreeGroup* group, const LLVector3& shift);
-
+
virtual S32 frustumCheck(const LLViewerOctreeGroup* group) = 0;
virtual S32 frustumCheckObjects(const LLViewerOctreeGroup* group) = 0;
@@ -405,7 +405,7 @@ protected:
virtual void preprocess(LLViewerOctreeGroup* group);
virtual void processGroup(LLViewerOctreeGroup* group);
virtual void visit(const OctreeNode* branch);
-
+
protected:
LLCamera *mCamera;
S32 mRes;
diff --git a/indra/newview/llviewerparcelaskplay.cpp b/indra/newview/llviewerparcelaskplay.cpp
index afbe2c94de..aea06834b2 100644
--- a/indra/newview/llviewerparcelaskplay.cpp
+++ b/indra/newview/llviewerparcelaskplay.cpp
@@ -287,7 +287,7 @@ void LLViewerParcelAskPlay::saveSettings()
if ((iter_parcel->second.mDate.secondsSinceEpoch() + (F64SecondsImplicit)U32Days(30)) > LLTimer::getTotalSeconds())
{
// write unexpired parcels
- std::string parcel_id = boost::lexical_cast<std::string>(iter_parcel->first);
+ std::string parcel_id = std::to_string(iter_parcel->first);
write_llsd[key][parcel_id] = LLSD();
write_llsd[key][parcel_id]["mode"] = (LLSD::Integer)iter_parcel->second.mMode;
write_llsd[key][parcel_id]["date"] = iter_parcel->second.mDate;
diff --git a/indra/newview/llviewerparcelmgr.cpp b/indra/newview/llviewerparcelmgr.cpp
index daeb9de1e3..8ed9d24c69 100644
--- a/indra/newview/llviewerparcelmgr.cpp
+++ b/indra/newview/llviewerparcelmgr.cpp
@@ -2344,7 +2344,7 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
&& ((parcel->getSalePrice() > 0) || (authorizeBuyer.notNull()));
bool isEmpowered
- = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) == true : true;
+ = forGroup ? gAgent.hasPowerInActiveGroup(GP_LAND_DEED) : true;
bool isOwner
= parcelOwner == (forGroup ? gAgent.getGroupID() : gAgent.getID());
@@ -2361,7 +2361,7 @@ bool LLViewerParcelMgr::canAgentBuyParcel(LLParcel* parcel, bool forGroup) const
void LLViewerParcelMgr::startBuyLand(bool is_for_group)
{
- LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group == true);
+ LLFloaterBuyLand::buyLand(getSelectionRegion(), mCurrentParcelSelection, is_for_group);
}
void LLViewerParcelMgr::startSellLand()
diff --git a/indra/newview/llviewershadermgr.cpp b/indra/newview/llviewershadermgr.cpp
index 6a25f218c9..4ffe49beae 100644
--- a/indra/newview/llviewershadermgr.cpp
+++ b/indra/newview/llviewershadermgr.cpp
@@ -592,7 +592,7 @@ std::string LLViewerShaderMgr::loadBasicShaders()
std::map<std::string, std::string> attribs;
attribs["MAX_JOINTS_PER_MESH_OBJECT"] =
- boost::lexical_cast<std::string>(LLSkinningUtil::getMaxJointCount());
+ std::to_string(LLSkinningUtil::getMaxJointCount());
bool ssr = gSavedSettings.getBOOL("RenderScreenSpaceReflections");
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 9109f49945..28e637cc68 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -401,7 +401,7 @@ bool LLEmbeddedItems::insertEmbeddedItem( LLInventoryItem* item, llwchar* ext_ch
}
sEntries[wc_emb].mItemPtr = item;
- sEntries[wc_emb].mSaved = is_new ? false : true;
+ sEntries[wc_emb].mSaved = !is_new;
*ext_char = wc_emb;
mEmbeddedUsedChars.insert(wc_emb);
return true;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 4b94fe141c..eab8e95ae7 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -1,3 +1,4 @@
+
/**
* @file llviewertexture.cpp
* @brief Object which handles a received image (and associated texture(s))
@@ -471,61 +472,10 @@ void LLViewerTexture::initClass()
LLImageGL::sDefaultGLTexture = LLViewerFetchedTexture::sDefaultImagep->getGLTexture();
}
-// tuning params
-const F32 GPU_MEMORY_CHECK_WAIT_TIME = 1.0f;
// non-const (used externally
F32 texmem_lower_bound_scale = 0.85f;
F32 texmem_middle_bound_scale = 0.925f;
-//static
-bool LLViewerTexture::isMemoryForTextureLow()
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- // Note: we need to figure out a better source for 'min' values,
- // what is free for low end at minimal settings is 'nothing left'
- // for higher end gpus at high settings.
- const S32Megabytes MIN_FREE_TEXTURE_MEMORY(20);
- const S32Megabytes MIN_FREE_MAIN_MEMORY(100);
-
- S32Megabytes gpu;
- S32Megabytes physical;
- getGPUMemoryForTextures(gpu, physical);
-
- return (gpu < MIN_FREE_TEXTURE_MEMORY); // || (physical < MIN_FREE_MAIN_MEMORY);
-}
-
-//static
-void LLViewerTexture::getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &physical)
-{
- LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- static LLFrameTimer timer;
-
- static S32Megabytes gpu_res = S32Megabytes(S32_MAX);
- static S32Megabytes physical_res = S32Megabytes(S32_MAX);
-
- if (timer.getElapsedTimeF32() < GPU_MEMORY_CHECK_WAIT_TIME) //call this once per second.
- {
- gpu = gpu_res;
- physical = physical_res;
- return;
- }
- timer.reset();
-
- {
- // For purposes of texture memory need to check both, actual free
- // memory and estimated free texture memory from bias calculations
- U32 free_memory = llmin(gViewerWindow->getWindow()->getAvailableVRAMMegabytes(), (U32)sFreeVRAMMegabytes);
- gpu_res = (S32Megabytes)free_memory;
-
- //check main memory, only works for windows and macos.
- LLMemory::updateMemoryInfo();
- physical_res = LLMemory::getAvailableMemKB();
-
- gpu = gpu_res;
- physical = physical_res;
- }
-}
-
//static
void LLViewerTexture::updateClass()
{
@@ -544,10 +494,11 @@ void LLViewerTexture::updateClass()
F64 texture_bytes_alloc = LLImageGL::getTextureBytesAllocated() / 1024.0 / 512.0;
F64 vertex_bytes_alloc = LLVertexBuffer::getBytesAllocated() / 1024.0 / 512.0;
+ F64 render_bytes_alloc = LLRenderTarget::sBytesAllocated / 1024.0 / 512.0;
// get an estimate of how much video memory we're using
// NOTE: our metrics miss about half the vram we use, so this biases high but turns out to typically be within 5% of the real number
- F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc);
+ F32 used = (F32)ll_round(texture_bytes_alloc + vertex_bytes_alloc + render_bytes_alloc);
F32 budget = max_vram_budget == 0 ? gGLManager.mVRAM : max_vram_budget;
@@ -2132,7 +2083,7 @@ bool LLViewerFetchedTexture::updateFetch()
}
}
- return mIsFetching ? true : false;
+ return mIsFetching;
}
void LLViewerFetchedTexture::clearFetchedResults()
@@ -2586,7 +2537,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
{
LL_WARNS() << "Raw Image with no Aux Data for callback" << LL_ENDL;
}
- bool final = mRawDiscardLevel <= entryp->mDesiredDiscard ? true : false;
+ bool final = mRawDiscardLevel <= entryp->mDesiredDiscard;
//LL_INFOS() << "Running callback for " << getID() << LL_ENDL;
//LL_INFOS() << mRawImage->getWidth() << "x" << mRawImage->getHeight() << LL_ENDL;
entryp->mLastUsedDiscard = mRawDiscardLevel;
@@ -2617,7 +2568,7 @@ bool LLViewerFetchedTexture::doLoadedCallbacks()
if (!entryp->mNeedsImageRaw && (entryp->mLastUsedDiscard > gl_discard))
{
mLastCallBackActiveTime = sCurrentTime;
- bool final = gl_discard <= entryp->mDesiredDiscard ? true : false;
+ bool final = gl_discard <= entryp->mDesiredDiscard;
entryp->mLastUsedDiscard = gl_discard;
entryp->mCallback(true, this, NULL, NULL, gl_discard, final, entryp->mUserData);
if (final)
diff --git a/indra/newview/llviewertexture.h b/indra/newview/llviewertexture.h
index ffa072b7f6..c825e0977b 100644
--- a/indra/newview/llviewertexture.h
+++ b/indra/newview/llviewertexture.h
@@ -185,11 +185,7 @@ private:
friend class LLUIImageList;
virtual void switchToCachedImage();
-
- static void getGPUMemoryForTextures(S32Megabytes &gpu, S32Megabytes &physical);
-public:
- static bool isMemoryForTextureLow();
protected:
friend class LLViewerTextureList;
LLUUID mID;
@@ -308,7 +304,7 @@ public:
void setLoadedCallback(loaded_callback_func cb,
S32 discard_level, bool keep_imageraw, bool needs_aux,
void* userdata, LLLoadedCallbackEntry::source_callback_list_t* src_callback_list, bool pause = false);
- bool hasCallbacks() { return mLoadedCallbackList.empty() ? false : true; }
+ bool hasCallbacks() { return !mLoadedCallbackList.empty(); }
void pauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list);
void unpauseLoadedCallbacks(const LLLoadedCallbackEntry::source_callback_list_t* callback_list);
bool doLoadedCallbacks();
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index 6fb85482d1..9ed96a22d6 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -416,7 +416,7 @@ LLViewerFetchedTexture* LLViewerTextureList::getImageFromFile(const std::string&
return NULL ;
}
- std::string full_path = gDirUtilp->findSkinnedFilename(LLDir::TEXTURES, filename);
+ std::string full_path = gDirUtilp->findSkinnedFilename("textures", filename);
if (full_path.empty())
{
LL_WARNS() << "Failed to find local image file: " << filename << LL_ENDL;
@@ -678,12 +678,12 @@ void LLViewerTextureList::addImageToList(LLViewerFetchedTexture *image)
}
else
{
- if((mImageList.insert(image)).second != true)
- {
+ if (!(mImageList.insert(image)).second)
+ {
LL_WARNS() << "Error happens when insert image " << image->getID() << " into mImageList!" << LL_ENDL ;
+ }
+ image->setInImageList(true);
}
- image->setInImageList(true) ;
-}
}
void LLViewerTextureList::removeImageFromList(LLViewerFetchedTexture *image)
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 8841cf2590..44297526e3 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -3976,7 +3976,7 @@ void LLViewerWindow::updateWorldViewRect(bool use_full_window)
// start off using whole window to render world
LLRect new_world_rect = mWindowRectRaw;
- if (use_full_window == false && mWorldViewPlaceholder.get())
+ if (!use_full_window && mWorldViewPlaceholder.get())
{
new_world_rect = mWorldViewPlaceholder.get()->calcScreenRect();
// clamp to at least a 1x1 rect so we don't try to allocate zero width gl buffers
@@ -4933,7 +4933,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
setCursor(UI_CURSOR_WAIT);
// Hide all the UI widgets first and draw a frame
- bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI);
if ( prev_draw_ui != show_ui)
{
@@ -4959,7 +4959,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
// SNAPSHOT
S32 window_width = snapshot_width;
S32 window_height = snapshot_height;
-
+
// Note: Scaling of the UI is currently *not* supported so we limit the output size if UI is requested
if (show_ui)
{
@@ -5015,7 +5015,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
scale_factor = llmax(1.0f, 1.0f / ratio) ;
}
}
-
+
if (show_ui && scale_factor > 1.f)
{
// Note: we should never get there...
@@ -5043,11 +5043,12 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
}
else
{
- return false ;
+ return false;
}
+
if (raw->isBufferInvalid())
{
- return false ;
+ return false;
}
bool high_res = scale_factor >= 2.f; // Font scaling is slow, only do so if rez is much higher
@@ -5194,7 +5195,6 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei
{
ret = raw->scale( image_width, image_height, false );
}
-
setCursor(UI_CURSOR_ARROW);
@@ -5235,8 +5235,8 @@ bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
glClear(GL_DEPTH_BUFFER_BIT | GL_COLOR_BUFFER_BIT); // stencil buffer is deprecated | GL_STENCIL_BUFFER_BIT);
setCursor(UI_CURSOR_WAIT);
- bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
- if (prev_draw_ui != false)
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ if (prev_draw_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
@@ -5312,7 +5312,7 @@ bool LLViewerWindow::simpleSnapshot(LLImageRaw* raw, S32 image_width, S32 image_
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- if (prev_draw_ui != false)
+ if (prev_draw_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
@@ -5343,7 +5343,7 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
LL_PROFILE_GPU_ZONE("cubeSnapshot");
llassert(LLPipeline::sRenderDeferred);
llassert(!gCubeSnapshot); //assert a snapshot isn't already in progress
-
+
U32 res = gPipeline.mRT->deferredScreen.getWidth();
//llassert(res <= gPipeline.mRT->deferredScreen.getWidth());
@@ -5355,7 +5355,7 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
// set new parameters specific to the 360 requirements
LLPipeline::sUseOcclusion = 0;
LLViewerCamera* camera = LLViewerCamera::getInstance();
-
+
LLViewerCamera saved_camera = LLViewerCamera::instance();
glh::matrix4f saved_proj = get_current_projection();
glh::matrix4f saved_mod = get_current_modelview();
@@ -5377,7 +5377,7 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
constexpr U32 dynamic_render_type_count = sizeof(dynamic_render_types) / sizeof(U32);
bool prev_dynamic_render_type[dynamic_render_type_count];
-
+
if (!dynamic_render)
{
for (int i = 0; i < dynamic_render_type_count; ++i)
@@ -5390,12 +5390,12 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
}
}
- bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI) ? true : false;
- if (prev_draw_ui != false)
+ bool prev_draw_ui = gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI);
+ if (prev_draw_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
-
+
bool hide_hud = LLPipeline::sShowHUDAttachments;
if (hide_hud)
{
@@ -5449,7 +5449,7 @@ bool LLViewerWindow::cubeSnapshot(const LLVector3& origin, LLCubeMapArray* cubea
if (!gPipeline.hasRenderDebugFeatureMask(LLPipeline::RENDER_DEBUG_FEATURE_UI))
{
- if (prev_draw_ui != false)
+ if (prev_draw_ui)
{
LLPipeline::toggleRenderDebugFeature(LLPipeline::RENDER_DEBUG_FEATURE_UI);
}
diff --git a/indra/newview/llviewerwindow.h b/indra/newview/llviewerwindow.h
index 2097d525d3..358aaab45e 100644
--- a/indra/newview/llviewerwindow.h
+++ b/indra/newview/llviewerwindow.h
@@ -539,8 +539,8 @@ private:
bool mStatesDirty;
U32 mCurrResolutionIndex;
- boost::scoped_ptr<LLWindowListener> mWindowListener;
- boost::scoped_ptr<LLViewerWindowListener> mViewerWindowListener;
+ std::unique_ptr<LLWindowListener> mWindowListener;
+ std::unique_ptr<LLViewerWindowListener> mViewerWindowListener;
// Object temporarily hovered over while dragging
LLPointer<LLViewerObject> mDragHoveredObject;
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index fd99491eb7..e4f7e8292c 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -207,7 +207,7 @@ const U32 LLVOAvatar::VISUAL_COMPLEXITY_UNKNOWN = 0;
const F64 HUD_OVERSIZED_TEXTURE_DATA_SIZE = 1024 * 1024;
const F32 MAX_TEXTURE_WAIT_TIME_SEC = 60;
-const F32 MAX_ATTACHMENT_WAIT_TIME_SEC = 120;
+const F32 MAX_ATTACHMENT_WAIT_TIME_SEC = 60;
const S32 MIN_NONTUNED_AVS = 5;
@@ -679,7 +679,7 @@ LLVOAvatar::LLVOAvatar(const LLUUID& id,
mVisuallyMuteSetting(AV_RENDER_NORMALLY),
mMutedAVColor(LLColor4::white /* used for "uninitialize" */),
mFirstFullyVisible(true),
- mFirstUseDelaySeconds(FIRST_APPEARANCE_CLOUD_MIN_DELAY),
+ mFirstDecloudTime(-1.f),
mFullyLoaded(false),
mPreviousFullyLoaded(false),
mFullyLoadedInitialized(false),
@@ -773,7 +773,7 @@ std::string LLVOAvatar::avString() const
{
if (isControlAvatar())
{
- return getFullname();
+ return " " + getFullname() + " ";
}
else
{
@@ -924,7 +924,9 @@ S32 LLVOAvatar::getRezzedStatus() const
{
if (getIsCloud()) return 0;
bool textured = isFullyTextured();
- if (textured && allBakedTexturesCompletelyDownloaded()) return 3;
+ bool all_baked_loaded = allBakedTexturesCompletelyDownloaded();
+ if (textured && all_baked_loaded && getAttachmentCount() == mSimAttachments.size()) return 4;
+ if (textured && all_baked_loaded) return 3;
if (textured) return 2;
llassert(hasGray());
return 1; // gray
@@ -977,10 +979,13 @@ bool LLVOAvatar::areAllNearbyInstancesBaked(S32& grey_avatars)
}
// static
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars)
{
counts.clear();
- counts.resize(4);
+ counts.resize(5);
+ avg_cloud_time = 0;
+ cloud_avatars = 0;
+ S32 count_avg = 0;
for (std::vector<LLCharacter*>::iterator iter = LLCharacter::sInstances.begin();
iter != LLCharacter::sInstances.end(); ++iter)
{
@@ -989,8 +994,23 @@ void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
{
S32 rez_status = inst->getRezzedStatus();
counts[rez_status]++;
+ F32 time = inst->getFirstDecloudTime();
+ if (time >= 0)
+ {
+ avg_cloud_time+=time;
+ count_avg++;
+ }
+ if (!inst->isFullyLoaded() || time < 0)
+ {
+ // still renders as cloud
+ cloud_avatars++;
+ }
}
}
+ if (count_avg > 0)
+ {
+ avg_cloud_time /= count_avg;
+ }
}
// static
@@ -998,8 +1018,9 @@ 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";
+ if (rez_status==2) return "downloading baked";
+ if (rez_status==3) return "loading attachments";
+ if (rez_status==4) return "full";
return "unknown";
}
@@ -1139,7 +1160,7 @@ void LLVOAvatar::deleteCachedImages(bool clearAll)
// LLVOAvatar::initClass()
//------------------------------------------------------------------------
void LLVOAvatar::initClass()
-{
+{
gAnimLibrary.animStateSetString(ANIM_AGENT_BODY_NOISE,"body_noise");
gAnimLibrary.animStateSetString(ANIM_AGENT_BREATHE_ROT,"breathe_rot");
gAnimLibrary.animStateSetString(ANIM_AGENT_PHYSICS_MOTION,"physics_motion");
@@ -2115,7 +2136,7 @@ void LLVOAvatar::resetSkeleton(bool reset_animations)
LL_DEBUGS("Avatar") << avString() << " reset starts" << LL_ENDL;
if (!isControlAvatar() && !mLastProcessedAppearance)
{
- LL_WARNS() << "Can't reset avatar; no appearance message has been received yet." << LL_ENDL;
+ LL_WARNS() << "Can't reset avatar " << getID() << "; no appearance message has been received yet." << LL_ENDL;
return;
}
@@ -2455,19 +2476,20 @@ U32 LLVOAvatar::processUpdateMessage(LLMessageSystem *mesgsys,
U32 block_num, const EObjectUpdateType update_type,
LLDataPacker *dp)
{
- const bool has_name = !getNVPair("FirstName");
+ const bool had_no_name = !getNVPair("FirstName");
// Do base class updates...
U32 retval = LLViewerObject::processUpdateMessage(mesgsys, user_data, block_num, update_type, dp);
// Print out arrival information once we have name of avatar.
- if (has_name && getNVPair("FirstName"))
+ const bool has_name = getNVPair("FirstName");
+ if (had_no_name && has_name)
{
mDebugExistenceTimer.reset();
- debugAvatarRezTime("AvatarRezArrivedNotification","avatar arrived");
+ debugAvatarRezTime("AvatarRezArrivedNotification", "avatar arrived");
}
- if(retval & LLViewerObject::INVALID_UPDATE)
+ if (retval & LLViewerObject::INVALID_UPDATE)
{
if (isSelf())
{
@@ -2564,6 +2586,27 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
LL_INFOS() << "Warning! Idle on dead avatar" << LL_ENDL;
return;
}
+
+ LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);
+ if (friends_only()
+ && !isUIAvatar()
+ && !isControlAvatar()
+ && !isSelf()
+ && !isBuddy())
+ {
+ if (mNameText)
+ {
+ mNameIsSet = false;
+ mNameText->markDead();
+ mNameText = NULL;
+ sNumVisibleChatBubbles--;
+ }
+ deleteParticleSource();
+ mVoiceVisualizer->setVoiceEnabled(false);
+
+ return;
+ }
+
// record time and refresh "tooSlow" status
updateTooSlow();
@@ -3100,14 +3143,15 @@ void LLVOAvatar::idleUpdateLoadingEffect()
if (mFirstFullyVisible)
{
mFirstFullyVisible = false;
+ mFirstDecloudTime = mFirstAppearanceMessageTimer.getElapsedTimeF32();
if (isSelf())
{
- LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "self isFullyLoaded, mFirstFullyVisible after " << mFirstDecloudTime << LL_ENDL;
LLAppearanceMgr::instance().onFirstFullyVisible();
}
else
{
- LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible" << LL_ENDL;
+ LL_INFOS("Avatar") << avString() << "other isFullyLoaded, mFirstFullyVisible after " << mFirstDecloudTime << LL_ENDL;
}
}
@@ -3418,6 +3462,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
static LLUICachedControl<bool> show_display_names("NameTagShowDisplayNames", true);
static LLUICachedControl<bool> show_usernames("NameTagShowUsernames", true);
+ static LLUICachedControl<bool> show_rez_status("NameTagDebugAVRezState", false);
if (LLAvatarName::useDisplayNames())
{
@@ -3451,6 +3496,12 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
addNameTagLine(full_name, name_tag_color, LLFontGL::NORMAL, font, true);
}
+ if (show_rez_status)
+ {
+ std::string av_string = LLVOAvatar::rezStatusToString(mLastRezzedStatus);
+ addNameTagLine(av_string, name_tag_color, LLFontGL::NORMAL, LLFontGL::getFontSansSerifSmall(), true);
+ }
+
mNameAway = is_away;
mNameDoNotDisturb = is_do_not_disturb;
mNameMute = is_muted;
@@ -4294,6 +4345,15 @@ void LLVOAvatar::updateOrientation(LLAgent& agent, F32 speed, F32 delta_time)
if (mTurning)
{
pelvis_rot_threshold *= 0.4f;
+ // account for fps, assume that above value is for ~60fps
+ constexpr F32 default_frame_sec = 0.016f;
+ F32 prev_frame_sec = LLFrameTimer::getFrameDeltaTimeF32();
+ if (default_frame_sec > prev_frame_sec)
+ {
+ // reduce threshold since turn rate per second is constant,
+ // shorter frame means shorter turn.
+ pelvis_rot_threshold *= prev_frame_sec/default_frame_sec;
+ }
}
// am I done turning?
@@ -5863,7 +5923,7 @@ void LLVOAvatar::processAnimationStateChanges()
startMotion(ANIM_AGENT_BODY_NOISE);
}
}
-
+
// clear all current animations
AnimIterator anim_it;
for (anim_it = mPlayingAnimations.begin(); anim_it != mPlayingAnimations.end();)
@@ -6565,15 +6625,15 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
LL_DEBUGS("AnimatedObjects") << "adding attachment overrides for " << mesh_id
<< " to root object " << root_object->getID() << LL_ENDL;
}
- bool fullRig = (jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG) ? true : false;
+ bool fullRig = jointCnt>=JOINT_COUNT_REQUIRED_FOR_FULLRIG;
if ( fullRig && !mesh_overrides_loaded )
- {
+ {
for ( int i=0; i<jointCnt; ++i )
{
std::string lookingForJoint = pSkinData->mJointNames[i].c_str();
LLJoint* pJoint = getJoint( lookingForJoint );
if (pJoint)
- {
+ {
const LLVector3& jointPos = LLVector3(pSkinData->mAlternateBindMatrix[i].getTranslation());
if (pJoint->aboveJointPosThreshold(jointPos))
{
@@ -6584,9 +6644,9 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
{
//If joint is a pelvis then handle old/new pelvis to foot values
if ( lookingForJoint == "mPelvis" )
- {
- pelvisGotSet = true;
- }
+ {
+ pelvisGotSet = true;
+ }
}
if (pSkinData->mLockScaleIfJointPosition)
{
@@ -6595,8 +6655,9 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
pJoint->addAttachmentScaleOverride(pJoint->getDefaultScale(), mesh_id, avString());
}
}
- }
- }
+ }
+ }
+
if (pelvisZOffset != 0.0F)
{
F32 pelvis_fixup_before;
@@ -6606,25 +6667,25 @@ void LLVOAvatar::addAttachmentOverridesForObject(LLViewerObject *vo, std::set<LL
hasPelvisFixup(pelvis_fixup_after); // Don't have to check bool here because we just added it...
if (!has_fixup_before || (pelvis_fixup_before != pelvis_fixup_after))
{
- pelvisGotSet = true;
+ pelvisGotSet = true;
}
}
mActiveOverrideMeshes.insert(mesh_id);
onActiveOverrideMeshesChanged();
- }
+ }
}
}
else
{
LL_DEBUGS("AnimatedObjects") << "failed to add attachment overrides for root object " << root_object->getID() << " not mesh or no pSkinData" << LL_ENDL;
}
-
+
//Rebuild body data if we altered joints/pelvis
if ( pelvisGotSet )
{
postPelvisSetRecalc();
- }
+ }
}
//-----------------------------------------------------------------------------
@@ -6663,7 +6724,6 @@ void LLVOAvatar::getAttachmentOverrideNames(std::set<std::string>& pos_names, st
}
// Attachment points don't have scales.
}
-
}
//-----------------------------------------------------------------------------
@@ -6683,6 +6743,7 @@ void LLVOAvatar::showAttachmentOverrides(bool verbose) const
{
LL_DEBUGS("Avatar") << getFullname() << " no attachment positions defined for any joints" << "\n" << LL_ENDL;
}
+
if (scale_names.size())
{
std::stringstream ss;
@@ -6778,25 +6839,26 @@ void LLVOAvatar::removeAttachmentOverridesForObject(const LLUUID& mesh_id)
for (S32 joint_num = 0; joint_num < LL_CHARACTER_MAX_ANIMATED_JOINTS; joint_num++)
{
LLJoint *pJoint = getJoint(joint_num);
- if ( pJoint )
- {
+ if (pJoint)
+ {
bool dummy; // unused
pJoint->removeAttachmentPosOverride(mesh_id, av_string, dummy);
pJoint->removeAttachmentScaleOverride(mesh_id, av_string);
- }
- if ( pJoint && pJoint == pJointPelvis)
+ }
+ if (pJoint && pJoint == pJointPelvis)
{
- removePelvisFixup( mesh_id );
+ removePelvisFixup(mesh_id);
// SL-315
- pJoint->setPosition( LLVector3( 0.0f, 0.0f, 0.0f) );
- }
- }
-
+ pJoint->setPosition(LLVector3( 0.0f, 0.0f, 0.0f));
+ }
+ }
+
postPelvisSetRecalc();
mActiveOverrideMeshes.erase(mesh_id);
onActiveOverrideMeshesChanged();
}
+
//-----------------------------------------------------------------------------
// getCharacterPosition()
//-----------------------------------------------------------------------------
@@ -6812,7 +6874,6 @@ LLVector3 LLVOAvatar::getCharacterPosition()
}
}
-
//-----------------------------------------------------------------------------
// LLVOAvatar::getCharacterRotation()
//-----------------------------------------------------------------------------
@@ -6821,7 +6882,6 @@ LLQuaternion LLVOAvatar::getCharacterRotation()
return getRotation();
}
-
//-----------------------------------------------------------------------------
// LLVOAvatar::getCharacterVelocity()
//-----------------------------------------------------------------------------
@@ -6830,7 +6890,6 @@ LLVector3 LLVOAvatar::getCharacterVelocity()
return getVelocity() - mStepObjectVelocity;
}
-
//-----------------------------------------------------------------------------
// LLVOAvatar::getCharacterAngularVelocity()
//-----------------------------------------------------------------------------
@@ -6853,7 +6912,7 @@ void LLVOAvatar::getGround(const LLVector3 &in_pos_agent, LLVector3 &out_pos_age
out_pos_agent = in_pos_agent;
return;
}
-
+
p0_global = gAgent.getPosGlobalFromAgent(in_pos_agent) + z_vec;
p1_global = gAgent.getPosGlobalFromAgent(in_pos_agent) - z_vec;
LLViewerObject *obj;
@@ -6870,7 +6929,6 @@ F32 LLVOAvatar::getTimeDilation()
return mRegionp ? mRegionp->getTimeDilation() : 1.f;
}
-
//-----------------------------------------------------------------------------
// LLVOAvatar::getPixelArea()
//-----------------------------------------------------------------------------
@@ -6883,8 +6941,6 @@ F32 LLVOAvatar::getPixelArea() const
return mPixelArea;
}
-
-
//-----------------------------------------------------------------------------
// LLVOAvatar::getPosGlobalFromAgent()
//-----------------------------------------------------------------------------
@@ -6901,7 +6957,6 @@ LLVector3 LLVOAvatar::getPosAgentFromGlobal(const LLVector3d &position)
return gAgent.getPosAgentFromGlobal(position);
}
-
//-----------------------------------------------------------------------------
// requestStopMotion()
//-----------------------------------------------------------------------------
@@ -6921,7 +6976,7 @@ bool LLVOAvatar::loadSkeletonNode ()
{
return false;
}
-
+
bool ignore_hud_joints = false;
initAttachmentPoints(ignore_hud_joints);
@@ -7888,11 +7943,11 @@ LLVOAvatar* LLVOAvatar::findAvatarFromAttachment( LLViewerObject* obj )
return NULL;
}
-S32 LLVOAvatar::getAttachmentCount()
+S32 LLVOAvatar::getAttachmentCount() const
{
S32 count = 0;
- for (attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter)
+ for (attachment_map_t::const_iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter)
{
LLViewerJointAttachment* pAttachment = iter->second;
count += pAttachment->mAttachedObjects.size();
@@ -8060,7 +8115,7 @@ bool LLVOAvatar::getIsCloud() const
void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
{
// State machine for rezzed status. Statuses are -1 on startup, 0
- // = cloud, 1 = gray, 2 = downloading, 3 = full.
+ // = cloud, 1 = gray, 2 = downloading, 3 = waiting for attachments, 4 = full.
// Purpose is to collect time data for each it takes avatar to reach
// various loading landmarks: gray, textured (partial), textured fully.
@@ -8093,7 +8148,7 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
stopPhase("load_" + LLVOAvatar::rezStatusToString(i));
stopPhase("first_load_" + LLVOAvatar::rezStatusToString(i), false);
}
- if (rez_status == 3)
+ if (rez_status == 4)
{
// "fully loaded", mark any pending appearance change complete.
selfStopPhase("update_appearance_from_cof");
@@ -8104,6 +8159,12 @@ void LLVOAvatar::updateRezzedStatusTimers(S32 rez_status)
}
}
mLastRezzedStatus = rez_status;
+
+ static LLUICachedControl<bool> show_rez_status("NameTagDebugAVRezState", false);
+ if (show_rez_status)
+ {
+ mNameIsSet = false;
+ }
}
}
@@ -8234,7 +8295,7 @@ void LLVOAvatar::logMetricsTimerRecord(const std::string& phase_name, F32 elapse
bool LLVOAvatar::updateIsFullyLoaded()
{
S32 rez_status = getRezzedStatus();
- bool loading = getIsCloud();
+ bool loading = rez_status == 0;
if (mFirstFullyVisible && !mIsControlAvatar)
{
loading = ((rez_status < 2)
@@ -8249,7 +8310,7 @@ bool LLVOAvatar::updateIsFullyLoaded()
);
// compare amount of attachments to one reported by simulator
- if (!loading && !isSelf() && mLastCloudAttachmentCount != mSimAttachments.size())
+ if (!loading && !isSelf() && rez_status < 4 && mLastCloudAttachmentCount < mSimAttachments.size())
{
S32 attachment_count = getAttachmentCount();
if (mLastCloudAttachmentCount != attachment_count)
@@ -8317,11 +8378,12 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
if (mFirstFullyVisible)
{
+ F32 first_use_delay = FIRST_APPEARANCE_CLOUD_MIN_DELAY;
if (!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(
+ first_use_delay = llclamp(
mFirstAppearanceMessageTimer.getElapsedTimeF32(),
FIRST_APPEARANCE_CLOUD_MIN_DELAY,
FIRST_APPEARANCE_CLOUD_MAX_DELAY);
@@ -8330,10 +8392,10 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
{
// Impostors are less of a priority,
// let them stay cloud longer
- mFirstUseDelaySeconds *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER;
+ first_use_delay *= FIRST_APPEARANCE_CLOUD_IMPOSTOR_MODIFIER;
}
}
- mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > mFirstUseDelaySeconds);
+ mFullyLoaded = (mFullyLoadedTimer.getElapsedTimeF32() > first_use_delay);
}
else
{
@@ -8342,7 +8404,7 @@ bool LLVOAvatar::processFullyLoadedChange(bool loading)
if (!mPreviousFullyLoaded && !loading && mFullyLoaded)
{
- debugAvatarRezTime("AvatarRezNotification","fully loaded");
+ debugAvatarRezTime("AvatarRezNotification", "fully loaded");
}
// did our loading state "change" from last call?
@@ -9344,9 +9406,20 @@ void LLVOAvatar::parseAppearanceMessage(LLMessageSystem* mesgsys, LLAppearanceMe
<< (attachment_id.isNull() ? "pending" : attachment_id.asString())
<< " on point " << (S32)attach_point << LL_ENDL;
- mSimAttachments[attachment_id] = attach_point;
- }
+ if (attachment_id.notNull())
+ {
+ mSimAttachments[attachment_id] = attach_point;
+ }
+ else
+ {
+ // at the moment viewer is only interested in non-null attachments
+ LL_DEBUGS("AVAppearanceAttachments") << "AV " << getID()
+ << " has null attachment on point " << (S32)attach_point
+ << ", discarding" << LL_ENDL;
+ }
+ }
+ // todo? Doesn't detect if attachments were switched
if (old_size != mSimAttachments.size())
{
mLastCloudAttachmentCount = 0;
@@ -11246,7 +11319,10 @@ void LLVOAvatar::setOverallAppearanceNormal()
return;
LLVector3 pelvis_pos = getJoint("mPelvis")->getPosition();
- resetSkeleton(false);
+ if (isControlAvatar() || mLastProcessedAppearance)
+ {
+ resetSkeleton(false);
+ }
getJoint("mPelvis")->setPosition(pelvis_pos);
for (auto it = mJellyAnims.begin(); it != mJellyAnims.end(); ++it)
@@ -11528,15 +11604,16 @@ bool LLVOAvatar::isTextureDefined(LLAvatarAppearanceDefines::ETextureIndex te, U
{
return false;
}
-
- if( !getImage( te, index ) )
+
+ LLViewerTexture* tex = getImage(te, index);
+ if (!tex)
{
LL_WARNS() << "getImage( " << te << ", " << index << " ) returned 0" << LL_ENDL;
return false;
}
- return (getImage(te, index)->getID() != IMG_DEFAULT_AVATAR &&
- getImage(te, index)->getID() != IMG_DEFAULT);
+ return (tex->getID() != IMG_DEFAULT_AVATAR &&
+ tex->getID() != IMG_DEFAULT);
}
//virtual
@@ -11546,13 +11623,10 @@ bool LLVOAvatar::isTextureVisible(LLAvatarAppearanceDefines::ETextureIndex type,
{
return isTextureDefined(type, index);
}
- else
- {
- // baked textures can use TE images directly
- return ((isTextureDefined(type) || isSelf())
- && (getTEImage(type)->getID() != IMG_INVISIBLE
- || LLDrawPoolAlpha::sShowDebugAlpha));
- }
+
+ // baked textures can use TE images directly
+ return ((isTextureDefined(type) || isSelf()) &&
+ (getTEImage(type)->getID() != IMG_INVISIBLE || LLDrawPoolAlpha::sShowDebugAlpha));
}
//virtual
@@ -11669,5 +11743,8 @@ F32 LLVOAvatar::getAverageGPURenderTime()
return ret;
}
-
+bool LLVOAvatar::isBuddy() const
+{
+ return LLAvatarTracker::instance().isBuddy(getID());
+}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 2af62ca83b..e5d232b792 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -253,6 +253,7 @@ public:
virtual bool isControlAvatar() const { return mIsControlAvatar; } // True if this avatar is a control av (no associated user)
virtual bool isUIAvatar() const { return mIsUIAvatar; } // True if this avatar is a supplemental av used in some UI views (no associated user)
+ virtual bool isBuddy() const;
// If this is an attachment, return the avatar it is attached to. Otherwise NULL.
virtual const LLVOAvatar *getAttachedAvatar() const { return NULL; }
@@ -382,7 +383,8 @@ public:
// Loading state
//--------------------------------------------------------------------
public:
- bool isFullyLoaded() const;
+ bool isFullyLoaded() const;
+ F32 getFirstDecloudTime() const {return mFirstDecloudTime;}
// check and return current state relative to limits
// default will test only the geometry (combined=false).
@@ -422,7 +424,7 @@ protected:
private:
bool mFirstFullyVisible;
- F32 mFirstUseDelaySeconds;
+ F32 mFirstDecloudTime;
LLFrameTimer mFirstAppearanceMessageTimer;
bool mFullyLoaded;
@@ -715,7 +717,7 @@ public:
bool isFullyBaked();
static bool areAllNearbyInstancesBaked(S32& grey_avatars);
- static void getNearbyRezzedStats(std::vector<S32>& counts);
+ static void getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars);
static std::string rezStatusToString(S32 status);
//--------------------------------------------------------------------
@@ -939,7 +941,7 @@ protected:
// Map of attachment points, by ID
//--------------------------------------------------------------------
public:
- S32 getAttachmentCount(); // Warning: order(N) not order(1)
+ S32 getAttachmentCount() const; // Warning: order(N) not order(1)
typedef std::map<S32, LLViewerJointAttachment*> attachment_map_t;
attachment_map_t mAttachmentPoints;
std::vector<LLPointer<LLViewerObject> > mPendingAttachment;
diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp
index b1ca5f7a4b..dc07c2d711 100644
--- a/indra/newview/llvoavatarself.cpp
+++ b/indra/newview/llvoavatarself.cpp
@@ -834,7 +834,11 @@ void LLVOAvatarSelf::stopMotionFromSource(const LLUUID& source_id)
for (AnimSourceIterator motion_it = mAnimationSources.find(source_id); motion_it != mAnimationSources.end(); )
{
gAgent.sendAnimationRequest(motion_it->second, ANIM_REQUEST_STOP);
- mAnimationSources.erase(motion_it++);
+ mAnimationSources.erase(motion_it);
+ // Must find() after each erase() to deal with potential iterator invalidation
+ // This also ensures that we don't go past the end of this source's animations
+ // into those of another source.
+ motion_it = mAnimationSources.find(source_id);
}
@@ -2226,16 +2230,21 @@ void LLVOAvatarSelf::appearanceChangeMetricsCoro(std::string url)
// Status of our own rezzing.
msg["rez_status"] = LLVOAvatar::rezStatusToString(getRezzedStatus());
+ msg["first_decloud_time"] = getFirstDecloudTime();
// Status of all nearby avs including ourself.
msg["nearby"] = LLSD::emptyArray();
std::vector<S32> rez_counts;
- LLVOAvatar::getNearbyRezzedStats(rez_counts);
+ F32 avg_time;
+ S32 total_cloud_avatars;
+ LLVOAvatar::getNearbyRezzedStats(rez_counts, avg_time, total_cloud_avatars);
for (S32 rez_stat = 0; rez_stat < rez_counts.size(); ++rez_stat)
{
std::string rez_status_name = LLVOAvatar::rezStatusToString(rez_stat);
msg["nearby"][rez_status_name] = rez_counts[rez_stat];
}
+ msg["nearby"]["avg_decloud_time"] = avg_time;
+ msg["nearby"]["cloud_total"] = total_cloud_avatars;
// std::vector<std::string> bucket_fields("timer_name","is_self","grid_x","grid_y","is_using_server_bake");
std::vector<std::string> by_fields;
diff --git a/indra/newview/llvoavatarself.h b/indra/newview/llvoavatarself.h
index c7b61edd1c..46bac63d93 100644
--- a/indra/newview/llvoavatarself.h
+++ b/indra/newview/llvoavatarself.h
@@ -110,6 +110,7 @@ private:
public:
/*virtual*/ bool isSelf() const { return true; }
+ virtual bool isBuddy() const { return false; }
/*virtual*/ bool isValid() const;
//--------------------------------------------------------------------
diff --git a/indra/newview/llvoicevisualizer.cpp b/indra/newview/llvoicevisualizer.cpp
index 3d7cedb823..304b7adfb7 100644
--- a/indra/newview/llvoicevisualizer.cpp
+++ b/indra/newview/llvoicevisualizer.cpp
@@ -284,7 +284,7 @@ void LLVoiceVisualizer::lipStringToF32s ( std::string& in_string, F32*& out_F32s
//--------------------------------------------------------------------------
void LLVoiceVisualizer::lipSyncOohAah( F32& ooh, F32& aah )
{
- if( ( sLipSyncEnabled == true ) && mCurrentlySpeaking )
+ if (sLipSyncEnabled && mCurrentlySpeaking)
{
U32 transfer_index = (U32) (sOohPowerTransfersf * mSpeakingAmplitude);
if (transfer_index >= sOohPowerTransfers)
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 4caac36858..429310b5e8 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -5971,7 +5971,7 @@ void LLVivoxVoiceClient::filePlaybackSetMode(bool vox, float speed)
}
//------------------------------------------------------------------------
-std::set<LLVivoxVoiceClient::sessionState::wptr_t> LLVivoxVoiceClient::sessionState::mSession;
+std::set<LLVivoxVoiceClient::sessionState::wptr_t, std::owner_less<LLVivoxVoiceClient::sessionState::wptr_t>> LLVivoxVoiceClient::sessionState::mSession;
LLVivoxVoiceClient::sessionState::sessionState() :
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index bf1cec7d89..aaff93495a 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -294,8 +294,8 @@ protected:
bool mAvatarIDValid;
bool mIsSelf;
};
- typedef boost::shared_ptr<participantState> participantStatePtr_t;
- typedef boost::weak_ptr<participantState> participantStateWptr_t;
+ typedef std::shared_ptr<participantState> participantStatePtr_t;
+ typedef std::weak_ptr<participantState> participantStateWptr_t;
typedef std::map<const std::string, participantStatePtr_t> participantMap;
typedef std::map<const LLUUID, participantStatePtr_t> participantUUIDMap;
@@ -303,10 +303,10 @@ protected:
struct sessionState
{
public:
- typedef boost::shared_ptr<sessionState> ptr_t;
- typedef boost::weak_ptr<sessionState> wptr_t;
+ typedef std::shared_ptr<sessionState> ptr_t;
+ typedef std::weak_ptr<sessionState> wptr_t;
- typedef boost::function<void(const ptr_t &)> sessionFunc_t;
+ typedef std::function<void(const ptr_t &)> sessionFunc_t;
static ptr_t createSession();
~sessionState();
@@ -370,7 +370,7 @@ protected:
private:
sessionState();
- static std::set<wptr_t> mSession; // canonical list of outstanding sessions.
+ static std::set<wptr_t, std::owner_less<wptr_t>> mSession; // canonical list of outstanding sessions.
std::set<wptr_t>::iterator mMyIterator; // used for delete
static void for_eachPredicate(const wptr_t &a, sessionFunc_t func);
@@ -381,7 +381,7 @@ protected:
static bool testByCallerId(const LLVivoxVoiceClient::sessionState::wptr_t &a, LLUUID participantId);
};
- typedef boost::shared_ptr<sessionState> sessionStatePtr_t;
+ typedef std::shared_ptr<sessionState> sessionStatePtr_t;
typedef std::map<std::string, sessionStatePtr_t> sessionMap;
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index f2fb7b7396..0392ea864e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3553,9 +3553,10 @@ bool LLVOVolume::isVolumeGlobal() const
{
if (mVolumeImpl)
{
- return mVolumeImpl->isVolumeGlobal() ? true : false;
+ return mVolumeImpl->isVolumeGlobal();
}
- else if (mRiggedVolume.notNull())
+
+ if (mRiggedVolume.notNull())
{
return true;
}
@@ -4577,6 +4578,11 @@ bool LLVOVolume::lineSegmentIntersect(const LLVector4a& start, const LLVector4a&
}
}
+ if (getClickAction() == CLICK_ACTION_IGNORE && !LLFloater::isVisible(gFloaterTools))
+ {
+ return false;
+ }
+
bool ret = false;
LLVolume* volume = getVolume();
@@ -5277,7 +5283,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
if (mat)
{
- bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? true : false;
+ bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f);
if (type == LLRenderPass::PASS_ALPHA)
{
shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
@@ -6439,7 +6445,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
tex = facep->getTexture();
- bool is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) ? true : false;
+ bool is_alpha = facep->getPoolType() == LLDrawPool::POOL_ALPHA;
LLMaterial* mat = nullptr;
bool can_be_shiny = false;
@@ -6465,7 +6471,7 @@ U32 LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, LLFace
if (!gltf_mat)
{
- is_alpha = (is_alpha || blinn_phong_transparent) ? true : false;
+ is_alpha |= blinn_phong_transparent;
}
if (gltf_mat || (mat && !hud_group))
diff --git a/indra/newview/llwindowlistener.cpp b/indra/newview/llwindowlistener.cpp
index 9515ace10e..26799d60be 100644
--- a/indra/newview/llwindowlistener.cpp
+++ b/indra/newview/llwindowlistener.cpp
@@ -388,7 +388,7 @@ static void mouseEvent(const MouseFunc& func, const LLSD& request)
LLCoordGL pos(request["x"].asInteger(), request["y"].asInteger());
bool has_pos(request.has("x") && request.has("y"));
- boost::scoped_ptr<LLView::TemporaryDrilldownFunc> tempfunc;
+ std::unique_ptr<LLView::TemporaryDrilldownFunc> tempfunc;
// Documentation for mouseDown(), mouseUp() and mouseMove() claims you
// must either specify ["path"], or both of ["x"] and ["y"]. You MAY
diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp
index a90839ae7e..129bbef185 100755
--- a/indra/newview/llworldmapview.cpp
+++ b/indra/newview/llworldmapview.cpp
@@ -345,7 +345,7 @@ void LLWorldMapView::setPanWithInterpTime(S32 x, S32 y, bool snap, F32 interp_ti
mMapIterpTime = interp_time;
}
-bool LLWorldMapView::showRegionInfo() { return (LLWorldMipmap::scaleToLevel(mMapScale) <= DRAW_SIMINFO_THRESHOLD ? true : false); }
+bool LLWorldMapView::showRegionInfo() { return LLWorldMipmap::scaleToLevel(mMapScale) <= DRAW_SIMINFO_THRESHOLD; }
///////////////////////////////////////////////////////////////////////////////////
// HELPERS
diff --git a/indra/newview/llxmlrpclistener.cpp b/indra/newview/llxmlrpclistener.cpp
index b816f9a3b5..3c2c6d15c4 100644
--- a/indra/newview/llxmlrpclistener.cpp
+++ b/indra/newview/llxmlrpclistener.cpp
@@ -544,7 +544,7 @@ private:
const std::string mMethod;
const std::string mReplyPump;
LLTempBoundListener mBoundListener;
- boost::scoped_ptr<LLXMLRPCTransaction> mTransaction;
+ std::unique_ptr<LLXMLRPCTransaction> mTransaction;
LLXMLRPCTransaction::EStatus mPreviousStatus; // To detect state changes.
};
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index ba7e8d7298..a77c31eee3 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -188,7 +188,7 @@ public:
virtual void onCompleted(LLCore::HttpHandle handle, LLCore::HttpResponse * response);
- typedef boost::shared_ptr<LLXMLRPCTransaction::Handler> ptr_t;
+ typedef std::shared_ptr<LLXMLRPCTransaction::Handler> ptr_t;
private:
diff --git a/indra/newview/skins/default/xui/en/floater_camera.xml b/indra/newview/skins/default/xui/en/floater_camera.xml
index 4655a4d394..93b306d7d7 100644
--- a/indra/newview/skins/default/xui/en/floater_camera.xml
+++ b/indra/newview/skins/default/xui/en/floater_camera.xml
@@ -138,13 +138,13 @@
</panel>
</panel>
<panel
- follows="all"
+ follows="left|top"
height="102"
layout="topleft"
left_pad="2"
+ right="-2"
name="buttons_panel"
- top="22"
- width="212">
+ top="22">
<panel_camera_item
name="front_view"
tool_tip="Front View"
@@ -253,4 +253,22 @@
function="CameraPresets.Save"/>
</button>
</panel>
+ <panel
+ name="viewer_camera_info"
+ left="0"
+ top="135"
+ width="400"
+ height="150"
+ border="true"
+ visible="false"
+ background_visible="true"/>
+ <panel
+ name="agent_camera_info"
+ left="0"
+ top="285"
+ width="400"
+ height="150"
+ border="true"
+ visible="false"
+ background_visible="true"/>
</floater>
diff --git a/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml
new file mode 100644
index 0000000000..aa3500bac2
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_inventory_thumbnails_helper.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
+<floater
+ legacy_header_height="18"
+ can_resize="false"
+ height="600"
+ layout="topleft"
+ min_height="175"
+ min_width="500"
+ name="contents"
+ help_topic="contents"
+ title="Inventory Thumbnails Helper"
+ width="800">
+ <scroll_list
+ top="20"
+ height="350"
+ draw_stripes="true"
+ draw_heading="true"
+ follows="all"
+ layout="topleft"
+ left="8"
+ multi_select="true"
+ name="inventory_thumbnails_list"
+ right="-8"
+ tool_tip="Paste items from your inventory">
+ <scroll_list.columns
+ dynamic_width="true"
+ label="Inventory Item"
+ name="item_name"
+ relative_width="0.4" />
+ <scroll_list.columns
+ dynamic_width="true"
+ label="Existing Texture"
+ name="existing_texture"
+ relative_width="0.3" />
+ <scroll_list.columns
+ dynamic_width="true"
+ label="New Texture"
+ name="new_texture"
+ relative_width="0.3" />
+ </scroll_list>
+ <text_editor
+ top="375"
+ height="140"
+ follows="all"
+ left="8"
+ right="-8"
+ name="output_log"
+ font="Monospace"
+ text_color="0.1 0.5 0.1 1.0"
+ width="480">
+ </text_editor>
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Paste items from Inventory"
+ layout="topleft"
+ left="10"
+ name="paste_items_btn"
+ bottom="-60"
+ width="235" />
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Paste textures from Inventory"
+ layout="topleft"
+ left_delta="0"
+ name="paste_textures_btn"
+ top_delta="26 "
+ width="235" />
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Write Thumbnails"
+ layout="topleft"
+ left_delta="0"
+ name="write_thumbnails_btn"
+ top_delta="26 "
+ width="235" />
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Log items with no thumbnail"
+ layout="bottomleft"
+ right="-10"
+ name="log_missing_thumbnails_btn"
+ bottom="60"
+ width="235" />
+ <button
+ follows="left|bottom"
+ height="20"
+ label="Clear thumbnails from pasted items"
+ layout="bottomleft"
+ right="-10"
+ name="clear_thumbnails_btn"
+ top_delta="26"
+ width="235" />
+
+
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_publish_classified.xml b/indra/newview/skins/default/xui/en/floater_publish_classified.xml
index 2d7d03f7a0..04840e1c64 100644
--- a/indra/newview/skins/default/xui/en/floater_publish_classified.xml
+++ b/indra/newview/skins/default/xui/en/floater_publish_classified.xml
@@ -25,6 +25,7 @@ Remember, Classified fees are non-refundable.
</text>
<spinner
decimal_digits="0"
+ allow_digits_only="true"
follows="left|top"
font="SansSerif"
halign="left"
@@ -36,7 +37,6 @@ Remember, Classified fees are non-refundable.
layout="topleft"
left="15"
value="50"
- min_val="50"
max_val="999999"
name="price_for_listing"
top_pad="10"
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
index d9f847a4fa..16907d3577 100644
--- a/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_inventory.xml
@@ -35,7 +35,7 @@
layout="topleft"
name="Folder Wearables Separator" />
<menu_item_call
- label="Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="Replace Outfit">
<menu_item_call.on_click
@@ -43,7 +43,7 @@
parameter="replaceoutfit" />
</menu_item_call>
<menu_item_call
- label="Add To Current Outfit"
+ label="Add folder items"
layout="topleft"
name="Add To Outfit">
<menu_item_call.on_click
@@ -51,7 +51,7 @@
parameter="addtooutfit" />
</menu_item_call>
<menu_item_call
- label="Remove From Current Outfit"
+ label="Take off folder items"
layout="topleft"
name="Remove From Outfit">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
index 25d64ba74d..99cee83f4e 100755
--- a/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_gallery_outfit_tab.xml
@@ -3,7 +3,7 @@
layout="topleft"
name="Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear_replace">
<on_click
@@ -16,7 +16,7 @@
parameter="wear_replace" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -29,7 +29,7 @@
parameter="wear_add" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -41,17 +41,60 @@
function="Outfit.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator/>
<menu_item_call
- label="Image..."
- layout="topleft"
- name="thumbnail">
+ label="Image..."
+ layout="topleft"
+ name="thumbnail">
+ <on_click
+ function="Outfit.Thumbnail" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit outfit"
+ layout="topleft"
+ name="edit">
+ <on_click
+ function="Outfit.Edit" />
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="edit" />
+ </menu_item_call>
+ <menu_item_call
+ label="Rename outfit"
+ layout="topleft"
+ name="rename">
+ <on_click
+ function="Outfit.Rename" />
+ <on_enable
+ function="Outfit.OnEnable"
+ parameter="rename" />
+ </menu_item_call>
+ <menu_item_call
+ label="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Outfit.Save" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
+ layout="topleft"
+ name="delete">
<on_click
- function="Outfit.Thumbnail" />
+ function="Outfit.Delete" />
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
</menu_item_call>
- <menu_item_separator name="sepatator1" />
+ <menu_item_separator/>
<menu
height="175"
- label="New Clothes"
+ label="New clothes"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -157,7 +200,7 @@
</menu>
<menu
height="85"
- label="New Body Parts"
+ label="New body parts"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -197,35 +240,4 @@
parameter="eyes" />
</menu_item_call>
</menu>
- <menu_item_separator name="sepatator2" />
- <menu_item_call
- label="Edit Outfit"
- layout="topleft"
- name="edit">
- <on_click
- function="Outfit.Edit" />
- <on_visible
- function="Outfit.OnVisible"
- parameter="edit" />
- </menu_item_call>
- <menu_item_call
- label="Rename Outfit"
- layout="topleft"
- name="rename">
- <on_click
- function="Outfit.Rename" />
- <on_enable
- function="Outfit.OnEnable"
- parameter="rename" />
- </menu_item_call>
- <menu_item_call
- label="Delete Outfit"
- layout="topleft"
- name="delete">
- <on_click
- function="Outfit.Delete" />
- <on_visible
- function="Outfit.OnVisible"
- parameter="delete" />
- </menu_item_call>
</context_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_inventory.xml b/indra/newview/skins/default/xui/en/menu_inventory.xml
index 488b39de06..35ec0bf9e1 100644
--- a/indra/newview/skins/default/xui/en/menu_inventory.xml
+++ b/indra/newview/skins/default/xui/en/menu_inventory.xml
@@ -264,7 +264,7 @@
layout="topleft"
name="Folder Wearables Separator" />
<menu_item_call
- label="Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="Replace Outfit">
<menu_item_call.on_click
@@ -272,7 +272,7 @@
parameter="replaceoutfit" />
</menu_item_call>
<menu_item_call
- label="Add To Current Outfit"
+ label="Add folder items"
layout="topleft"
name="Add To Outfit">
<menu_item_call.on_click
@@ -280,7 +280,7 @@
parameter="addtooutfit" />
</menu_item_call>
<menu_item_call
- label="Remove From Current Outfit"
+ label="Take off folder items"
layout="topleft"
name="Remove From Outfit">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
index 85eb941e31..8f36c7a00a 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_gear.xml
@@ -4,7 +4,7 @@
visible="false"
name="Gear Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear">
<on_click
@@ -17,7 +17,7 @@
parameter="wear" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -25,9 +25,11 @@
<on_enable
function="Gear.OnEnable"
parameter="wear_add" />
+ <on_visible
+ function="Gear.OnVisible"/>
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -39,19 +41,88 @@
function="Gear.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator name="wear_separator" />
<menu_item_call
label="Image..."
layout="topleft"
name="thumbnail">
+ <on_click
+ function="Gear.Thumbnail" />
+ </menu_item_call>
+ <menu_item_call
+ label="Rename outfit"
+ layout="topleft"
+ name="rename">
+ <on_click
+ function="Gear.Rename" />
+ <on_enable
+ function="Gear.OnEnable"
+ parameter="rename" />
+ <on_visible
+ function="Gear.OnVisible"
+ parameter="rename" />
+ </menu_item_call>
+ <menu_item_call
+ label="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Gear.Save" />
+ <on_visible
+ function="Gear.OnVisible"/>
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Gear.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
+ layout="topleft"
+ name="delete_outfit">
+ <on_click
+ function="Gear.Delete" />
+ <on_enable
+ function="Gear.OnEnable"
+ parameter="delete" />
+ <on_visible
+ function="Gear.OnVisible"
+ parameter="delete" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Gear.OnVisible"/>
+ </menu_item_separator>
+ <menu_item_check
+ label="Sort folders always by name"
+ layout="topleft"
+ name="sort_folders_by_name">
+ <on_click
+ function="Gear.SortByName" />
+ <on_check
+ function="CheckControl"
+ parameter="OutfitGallerySortByName" />
+ </menu_item_check>
+ <menu_item_call
+ label="Expand all folders"
+ layout="topleft"
+ name="expand">
+ <on_click
+ function="Gear.Expand" />
+ </menu_item_call>
+ <menu_item_call
+ label="Collapse all folders"
+ layout="topleft"
+ name="collapse">
<on_click
- function="Gear.Thumbnail" />
+ function="Gear.Collapse" />
</menu_item_call>
- <menu_item_separator name="sepatator1" />
+ <menu_item_separator/>
<!-- copied (with minor modifications) from menu_inventory_add.xml -->
<!-- *TODO: generate dynamically? -->
<menu
height="175"
- label="New Clothes"
+ label="New clothes"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -165,7 +236,7 @@
</menu>
<menu
height="85"
- label="New Body Parts"
+ label="New body parts"
layout="topleft"
left_delta="0"
mouse_opaque="false"
@@ -206,57 +277,4 @@
</menu_item_call>
</menu>
<!-- copied from menu_inventory_add.xml -->
-
- <menu_item_separator name="sepatator2" />
- <menu_item_call
- label="Expand all folders"
- layout="topleft"
- name="expand">
- <on_click
- function="Gear.Expand" />
- </menu_item_call>
- <menu_item_call
- label="Collapse all folders"
- layout="topleft"
- name="collapse">
- <on_click
- function="Gear.Collapse" />
- </menu_item_call>
- <menu_item_call
- label="Rename Outfit"
- layout="topleft"
- name="rename">
- <on_click
- function="Gear.Rename" />
- <on_enable
- function="Gear.OnEnable"
- parameter="rename" />
- <on_visible
- function="Gear.OnVisible"
- parameter="rename" />
- </menu_item_call>
- <menu_item_call
- label="Delete Outfit"
- layout="topleft"
- name="delete_outfit">
- <on_click
- function="Gear.Delete" />
- <on_enable
- function="Gear.OnEnable"
- parameter="delete" />
- <on_visible
- function="Gear.OnVisible"
- parameter="delete" />
- </menu_item_call>
- <menu_item_separator name="sepatator3" />
- <menu_item_check
- label="Sort Folders Always by Name"
- layout="topleft"
- name="sort_folders_by_name">
- <on_click
- function="Gear.SortByName" />
- <on_check
- function="CheckControl"
- parameter="OutfitGallerySortByName" />
- </menu_item_check>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
index ae5fae864d..c6805edd63 100644
--- a/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
+++ b/indra/newview/skins/default/xui/en/menu_outfit_tab.xml
@@ -3,7 +3,7 @@
layout="topleft"
name="Outfit">
<menu_item_call
- label="Wear - Replace Current Outfit"
+ label="Replace current outfit"
layout="topleft"
name="wear_replace">
<on_click
@@ -16,7 +16,7 @@
parameter="wear_replace" />
</menu_item_call>
<menu_item_call
- label="Wear - Add to Current Outfit"
+ label="Add outfit items"
layout="topleft"
name="wear_add">
<on_click
@@ -29,7 +29,7 @@
parameter="wear_add" />
</menu_item_call>
<menu_item_call
- label="Take Off - Remove from Current Outfit"
+ label="Take off outfit items"
layout="topleft"
name="take_off">
<on_click
@@ -41,19 +41,26 @@
function="Outfit.OnVisible"
parameter="take_off" />
</menu_item_call>
+ <menu_item_separator />
<menu_item_call
- label="Edit Outfit"
- layout="topleft"
- name="edit">
+ label="Image..."
+ layout="topleft"
+ name="thumbnail">
+ <on_click
+ function="Outfit.Thumbnail" />
+ </menu_item_call>
+ <menu_item_call
+ label="Edit outfit"
+ layout="topleft"
+ name="edit">
<on_click
function="Outfit.Edit" />
<on_visible
function="Outfit.OnVisible"
parameter="edit" />
</menu_item_call>
- <menu_item_separator />
<menu_item_call
- label="Rename Outfit"
+ label="Rename outfit"
layout="topleft"
name="rename">
<on_click
@@ -63,7 +70,19 @@
parameter="rename" />
</menu_item_call>
<menu_item_call
- label="Delete Outfit"
+ label="Save to this outfit"
+ layout="topleft"
+ name="save">
+ <on_click
+ function="Outfit.Save" />
+ </menu_item_call>
+ <menu_item_separator>
+ <on_visible
+ function="Outfit.OnVisible"
+ parameter="delete" />
+ </menu_item_separator>
+ <menu_item_call
+ label="Delete outfit"
layout="topleft"
name="delete">
<on_click
diff --git a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
index 910a0adc28..e4e86bb911 100644
--- a/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
+++ b/indra/newview/skins/default/xui/en/menu_teleport_history_item.xml
@@ -49,4 +49,17 @@
function="TeleportHistory.GearMenu.Enable"
parameter="copy_slurl" />
</menu_item_call>
+ <menu_item_separator
+ layout="topleft" />
+ <menu_item_call
+ label="Remove from history"
+ layout="topleft"
+ name="remove_from_history">
+ <on_click
+ function="TeleportHistory.GearMenu.Action"
+ parameter="remove" />
+ <on_enable
+ function="TeleportHistory.GearMenu.Enable"
+ parameter="remove" />
+ </menu_item_call>
</toggleable_menu>
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index d580369ab2..49f5dfec04 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3552,6 +3552,21 @@ function="World.EnvPreset"
function="Advanced.WebContentTest"
parameter="http://duckduckgo.com"/>
</menu_item_call>
+ <menu_item_call
+ label="Inventory Thumbnails Helper"
+ name="Inventory Thumbnails Helper"
+ shortcut="control|alt|shift|X">
+ <menu_item_call.on_click
+ function="Floater.Show"
+ parameter="inventory_thumbnails_helper" />
+ </menu_item_call>
+ <menu_item_call
+ label="FB Connect Test"
+ name="FB Connect Test">
+ <menu_item_call.on_click
+ function="Advanced.WebContentTest"
+ parameter="https://cryptic-ridge-1632.herokuapp.com/"/>
+ </menu_item_call>
<menu_item_call
label="Dump Fonts"
name="Dump Fonts">
@@ -3641,6 +3656,14 @@ function="World.EnvPreset"
function="Advanced.ToggleDebugUnicode" />
</menu_item_check>
<menu_item_check
+ label="Debug Camera Controls"
+ name="Debug Camera Controls">
+ <menu_item_check.on_check
+ function="Advanced.CheckDebugCamera" />
+ <menu_item_check.on_click
+ function="Advanced.ToggleDebugCamera" />
+ </menu_item_check>
+ <menu_item_check
label="Debug Name Tooltips"
name="Debug Name Tooltips">
<menu_item_check.on_check
@@ -3820,6 +3843,16 @@ function="World.EnvPreset"
function="ToggleControl"
parameter="AllowSelectAvatar" />
</menu_item_check>
+ <menu_item_check
+ label="Render Only Friends"
+ name="Render Only Friends">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="RenderAvatarFriendsOnly" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="RenderAvatarFriendsOnly" />
+ </menu_item_check>
</menu>
<menu
create_jump_keys="true"
@@ -3917,6 +3950,16 @@ function="World.EnvPreset"
function="Advanced.ToggleDebugCharacterVis" />
</menu_item_check>
<menu_item_check
+ label="Debug Character Rez State"
+ name="Debug Character Rez State">
+ <menu_item_check.on_check
+ function="CheckControl"
+ parameter="NameTagDebugAVRezState" />
+ <menu_item_check.on_click
+ function="ToggleControl"
+ parameter="NameTagDebugAVRezState" />
+ </menu_item_check>
+ <menu_item_check
label="Show Collision Skeleton"
name="Show Collision Skeleton">
<menu_item_check.on_check
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 6964ce3a4c..b58fdcc99a 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -12265,6 +12265,50 @@ Would you like to save them first?
notext="No"
yestext="Yes"/>
</notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ConfirmOverwriteOutfit"
+ type="alertmodal">
+ <unique/>
+This will replace the items in the
+selected outfit with the items you
+are wearing now.
+ <tag>confirm</tag>
+ <usetemplate
+ ignoretext="Confirm before overwriting outfit"
+ name="okcancelignore"
+ notext="Cancel"
+ yestext="Save"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="ClearInventoryThumbnailsWarning"
+ type="alertmodal">
+ You are about to remove thumbnail images from the inventory items in the list. This change cannot be undone.
+
+ Would you like to proceed?
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
+
+ <notification
+ icon="alertmodal.tga"
+ name="WriteInventoryThumbnailsWarning"
+ type="alertmodal">
+ You are about to overwrite thumbnail images for some or all of the inventory items in the list. This change cannot be undone.
+
+ Would you like to proceed?
+ <tag>confirm</tag>
+ <usetemplate
+ name="okcancelbuttons"
+ notext="No"
+ yestext="Yes"/>
+ </notification>
<notification
icon="notifytip.tga"
diff --git a/indra/newview/skins/default/xui/en/panel_settings_water.xml b/indra/newview/skins/default/xui/en/panel_settings_water.xml
index bec4f7852f..5e65b0e8a2 100644
--- a/indra/newview/skins/default/xui/en/panel_settings_water.xml
+++ b/indra/newview/skins/default/xui/en/panel_settings_water.xml
@@ -65,7 +65,7 @@
Density Exponent:
</text>
<slider
- decimal_digits="1"
+ decimal_digits="2"
follows="left|top"
height="16"
increment="0.01"
diff --git a/indra/newview/tests/llremoteparcelrequest_test.cpp b/indra/newview/tests/llremoteparcelrequest_test.cpp
index 4f7f87b6b0..4eddfb46e1 100644
--- a/indra/newview/tests/llremoteparcelrequest_test.cpp
+++ b/indra/newview/tests/llremoteparcelrequest_test.cpp
@@ -49,7 +49,7 @@ void LLCurl::Responder::failureResult(S32 status, const std::string& reason, con
void LLCurl::Responder::successResult(const LLSD& content) { }
void LLCurl::Responder::completeResult(S32 status, const std::string& reason, const LLSD& content) { }
std::string LLCurl::Responder::dumpResponse() const { return "(failure)"; }
-void LLCurl::Responder::completedRaw(LLChannelDescriptors const &,boost::shared_ptr<LLBufferArray> const &) { }
+void LLCurl::Responder::completedRaw(LLChannelDescriptors const &,std::shared_ptr<LLBufferArray> const &) { }
void LLMessageSystem::getF32(char const *,char const *,F32 &,S32) { }
void LLMessageSystem::getU8(char const *,char const *,U8 &,S32) { }
void LLMessageSystem::getS32(char const *,char const *,S32 &,S32) { }
@@ -110,7 +110,7 @@ namespace tut
{
set_test_name("observer pointer");
- boost::scoped_ptr<TestObserver> observer(new TestObserver());
+ std::unique_ptr<TestObserver> observer(new TestObserver());
LLRemoteParcelInfoProcessor & processor = LLRemoteParcelInfoProcessor::instance();
processor.addObserver(LLUUID(TEST_PARCEL_ID), observer.get());
diff --git a/indra/newview/tests/llviewerassetstats_test.cpp b/indra/newview/tests/llviewerassetstats_test.cpp
index e2e7f09c3b..bdf91d0f07 100644
--- a/indra/newview/tests/llviewerassetstats_test.cpp
+++ b/indra/newview/tests/llviewerassetstats_test.cpp
@@ -43,7 +43,7 @@ namespace LLStatViewer
LLTrace::SampleStatHandle<> FPS_SAMPLE("fpssample");
}
-void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts)
+void LLVOAvatar::getNearbyRezzedStats(std::vector<S32>& counts, F32& avg_cloud_time, S32& cloud_avatars)
{
counts.resize(3);
counts[0] = 0;
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index 3fb0a02c23..63383e52bb 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -525,7 +525,7 @@ class Windows_x86_64_Manifest(ViewerManifest):
'secondlife-bin.*',
'*_Setup.exe',
'*.bat',
- '*.tar.bz2')))
+ '*.tar.xz')))
with self.prefix(src=os.path.join(pkgdir, "VMP")):
# include the compiled launcher scripts so that it gets included in the file_list
@@ -1172,9 +1172,9 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# causes problems, especially with frameworks: a framework's top
# level must contain symlinks into its Versions/Current, which
# must itself be a symlink to some specific Versions subdir.
- tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.bz2")
+ tarpath = os.path.join(RUNNER_TEMP, "viewer.tar.xz")
print(f'Creating {tarpath} from {self.get_dst_prefix()}')
- with tarfile.open(tarpath, mode="w:bz2") as tarball:
+ with tarfile.open(tarpath, mode="w:xz") as tarball:
# Store in the tarball as just 'Second Life Mumble.app'
# instead of 'Users/someone/.../newview/Release/Second...'
# It's at this point that we rename 'Second Life Release.app'
@@ -1261,7 +1261,7 @@ class LinuxManifest(ViewerManifest):
self.run_command(['find', self.get_dst_prefix(),
'-type', 'f', '-perm', old,
'-exec', 'chmod', new, '{}', ';'])
- self.package_file = installer_name + '.tar.bz2'
+ self.package_file = installer_name + '.tar.xz'
# temporarily move directory tree so that it has the right
# name in the tarfile
@@ -1274,10 +1274,10 @@ class LinuxManifest(ViewerManifest):
# --numeric-owner hides the username of the builder for
# security etc.
self.run_command(['tar', '-C', self.get_build_prefix(),
- '--numeric-owner', '-cjf',
- tempname + '.tar.bz2', installer_name])
+ '--numeric-owner', '-cJf',
+ tempname + '.tar.xz', installer_name])
else:
- print("Skipping %s.tar.bz2 for non-Release build (%s)" % \
+ print("Skipping %s.tar.xz for non-Release build (%s)" % \
(installer_name, self.args['buildtype']))
finally:
self.run_command(["mv", tempname, realname])