summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yaml37
-rw-r--r--autobuild.xml482
-rwxr-xr-xbuild.sh26
-rwxr-xr-xdoc/contributions.txt24
-rw-r--r--indra/cmake/00-Common.cmake2
-rw-r--r--indra/cmake/APR.cmake14
-rw-r--r--indra/cmake/Audio.cmake19
-rw-r--r--indra/cmake/CURL.cmake19
-rw-r--r--indra/cmake/Copy3rdPartyLibs.cmake46
-rw-r--r--indra/cmake/EXPAT.cmake19
-rw-r--r--indra/cmake/FreeType.cmake8
-rw-r--r--indra/cmake/Hunspell.cmake13
-rw-r--r--indra/cmake/JPEG.cmake10
-rw-r--r--indra/cmake/LLPrimitive.cmake19
-rw-r--r--indra/cmake/Linking.cmake1
-rw-r--r--indra/cmake/NGHTTP2.cmake8
-rw-r--r--indra/cmake/OpenSSL.cmake5
-rw-r--r--indra/cmake/PNG.cmake4
-rw-r--r--indra/cmake/ZLIBNG.cmake4
-rw-r--r--indra/llcharacter/llcharacter.h18
-rw-r--r--indra/llcommon/llerrorcontrol.h2
-rw-r--r--indra/llcommon/llthread.cpp2
-rw-r--r--indra/llcorehttp/CMakeLists.txt39
-rw-r--r--indra/llinventory/llsettingsdaycycle.cpp1
-rw-r--r--indra/llinventory/llsettingswater.cpp1
-rw-r--r--indra/llprimitive/CMakeLists.txt1
-rw-r--r--indra/llrender/llrender.h19
-rw-r--r--indra/llrender/llrender2dutils.cpp2
-rw-r--r--indra/llrender/llrender2dutils.h7
-rw-r--r--indra/llrender/lluiimage.cpp6
-rw-r--r--indra/llrender/llvertexbuffer.cpp12
-rw-r--r--indra/llrender/llvertexbuffer.h9
-rw-r--r--indra/llui/llbutton.cpp4
-rw-r--r--indra/llui/llbutton.h14
-rw-r--r--indra/llui/llcheckboxctrl.cpp4
-rw-r--r--indra/llui/llcheckboxctrl.h4
-rw-r--r--indra/llui/llconsole.cpp3
-rw-r--r--indra/llui/llemojihelper.cpp4
-rw-r--r--indra/llui/llfocusmgr.cpp4
-rw-r--r--indra/llui/llfolderviewitem.cpp4
-rw-r--r--indra/llui/lliconctrl.h2
-rw-r--r--indra/llui/llkeywords.cpp18
-rw-r--r--indra/llui/llkeywords.h16
-rw-r--r--indra/llui/lllineeditor.h10
-rw-r--r--indra/llui/llmultisliderctrl.cpp4
-rw-r--r--indra/llui/llmultisliderctrl.h4
-rw-r--r--indra/llui/llpanel.cpp6
-rw-r--r--indra/llui/llpanel.h10
-rw-r--r--indra/llui/llscrolllistcell.cpp2
-rw-r--r--indra/llui/llsearchablecontrol.h2
-rw-r--r--indra/llui/llsliderctrl.cpp4
-rw-r--r--indra/llui/llsliderctrl.h4
-rw-r--r--indra/llui/llspellcheck.cpp26
-rw-r--r--indra/llui/llspinctrl.cpp2
-rw-r--r--indra/llui/llspinctrl.h4
-rw-r--r--indra/llui/llstatgraph.cpp4
-rw-r--r--indra/llui/llstyle.cpp6
-rw-r--r--indra/llui/llstyle.h18
-rw-r--r--indra/llui/lltextbase.cpp37
-rw-r--r--indra/llui/lltextbase.h16
-rw-r--r--indra/llui/lltextparser.cpp78
-rw-r--r--indra/llui/lltextparser.h5
-rw-r--r--indra/llui/lltoolbar.cpp2
-rw-r--r--indra/llui/llui.cpp7
-rw-r--r--indra/llui/llui.h10
-rw-r--r--indra/llui/lluicolortable.cpp68
-rw-r--r--indra/llui/lluicolortable.h7
-rw-r--r--indra/llui/lluictrl.cpp2
-rw-r--r--indra/llui/lluictrl.h2
-rw-r--r--indra/llui/llviewborder.cpp6
-rw-r--r--indra/llui/llviewborder.h6
-rw-r--r--indra/llwebrtc/CMakeLists.txt13
-rw-r--r--indra/llwebrtc/llwebrtc.cpp9
-rw-r--r--indra/llwebrtc/llwebrtc.h18
-rw-r--r--indra/llwebrtc/llwebrtc_impl.h57
-rw-r--r--indra/llxml/llxmltree.cpp10
-rw-r--r--indra/media_plugins/cef/CMakeLists.txt2
-rw-r--r--indra/media_plugins/example/CMakeLists.txt2
-rw-r--r--indra/media_plugins/libvlc/CMakeLists.txt2
-rw-r--r--indra/newview/CMakeLists.txt83
-rw-r--r--indra/newview/app_settings/settings.xml33
-rw-r--r--indra/newview/installers/windows/installer_template.nsi1
-rw-r--r--indra/newview/llappearancemgr.cpp6
-rw-r--r--indra/newview/llappviewer.cpp3
-rw-r--r--indra/newview/llchathistory.cpp18
-rw-r--r--indra/newview/llchatitemscontainerctrl.cpp21
-rw-r--r--indra/newview/llconversationview.cpp11
-rw-r--r--indra/newview/lldrawable.cpp12
-rw-r--r--indra/newview/lldrawpoolwater.cpp5
-rw-r--r--indra/newview/llenvironment.cpp2
-rw-r--r--indra/newview/lleventpoll.cpp2
-rw-r--r--indra/newview/llface.cpp116
-rw-r--r--indra/newview/llface.h4
-rw-r--r--indra/newview/llfloatercolorpicker.cpp12
-rw-r--r--indra/newview/llfloatereditenvironmentbase.cpp2
-rw-r--r--indra/newview/llfloateremojipicker.cpp36
-rw-r--r--indra/newview/llfloaterfixedenvironment.cpp2
-rw-r--r--indra/newview/llfloaterimnearbychathandler.cpp9
-rw-r--r--indra/newview/llfloaterjoystick.cpp33
-rw-r--r--indra/newview/llfloaterjoystick.h2
-rw-r--r--indra/newview/llfloaterscriptedprefs.cpp2
-rw-r--r--indra/newview/llfloatersettingscolor.cpp334
-rw-r--r--indra/newview/llfloatersettingscolor.h81
-rwxr-xr-xindra/newview/llfloaterworldmap.cpp135
-rw-r--r--indra/newview/llfloaterworldmap.h29
-rw-r--r--indra/newview/llhudnametag.cpp9
-rw-r--r--indra/newview/llhudtext.cpp6
-rw-r--r--indra/newview/llinventorygallery.cpp110
-rw-r--r--indra/newview/llinventorygallery.h1
-rw-r--r--indra/newview/lllocalbitmaps.cpp9
-rw-r--r--indra/newview/llmanip.cpp6
-rw-r--r--indra/newview/llmeshrepository.cpp3
-rw-r--r--indra/newview/lloutfitgallery.cpp48
-rw-r--r--indra/newview/lloutfitgallery.h3
-rw-r--r--indra/newview/lloutputmonitorctrl.cpp12
-rw-r--r--indra/newview/llpanelface.cpp1850
-rw-r--r--indra/newview/llpanelface.h412
-rw-r--r--indra/newview/llpanelpermissions.cpp2
-rw-r--r--indra/newview/llreflectionmap.cpp4
-rw-r--r--indra/newview/llscripteditor.cpp2
-rw-r--r--indra/newview/llsculptidsize.cpp2
-rw-r--r--indra/newview/llselectmgr.cpp25
-rw-r--r--indra/newview/llselectmgr.h14
-rw-r--r--indra/newview/llsettingsvo.cpp1
-rw-r--r--indra/newview/llsidepaneliteminfo.cpp2
-rw-r--r--indra/newview/llspatialpartition.cpp3
-rw-r--r--indra/newview/llspeakers.cpp26
-rw-r--r--indra/newview/lltexturefetch.cpp77
-rw-r--r--indra/newview/lltexturefetch.h2
-rw-r--r--indra/newview/lltextureview.cpp10
-rw-r--r--indra/newview/lltoolbarview.cpp2
-rw-r--r--indra/newview/llviewerchat.cpp10
-rw-r--r--indra/newview/llviewerchat.h5
-rw-r--r--indra/newview/llviewerfloaterreg.cpp2
-rw-r--r--indra/newview/llviewermenu.cpp6
-rw-r--r--indra/newview/llviewermenufile.cpp21
-rw-r--r--indra/newview/llviewerobject.cpp3
-rw-r--r--indra/newview/llviewerobject.h4
-rw-r--r--indra/newview/llviewerobjectlist.cpp29
-rw-r--r--indra/newview/llviewerobjectlist.h2
-rwxr-xr-xindra/newview/llviewerparceloverlay.cpp43
-rw-r--r--indra/newview/llviewerparceloverlay.h9
-rw-r--r--indra/newview/llviewertexteditor.cpp12
-rw-r--r--indra/newview/llviewertexture.cpp4
-rw-r--r--indra/newview/llviewertexturelist.cpp10
-rw-r--r--indra/newview/llviewertexturelist.h2
-rw-r--r--indra/newview/llviewerwindow.cpp6
-rw-r--r--indra/newview/llvoavatar.cpp151
-rw-r--r--indra/newview/llvoavatar.h4
-rw-r--r--indra/newview/llvoicechannel.cpp7
-rw-r--r--indra/newview/llvoicechannel.h6
-rw-r--r--indra/newview/llvoiceclient.cpp32
-rw-r--r--indra/newview/llvoiceclient.h16
-rw-r--r--indra/newview/llvoicevivox.cpp35
-rw-r--r--indra/newview/llvoicevivox.h9
-rw-r--r--indra/newview/llvoicewebrtc.cpp107
-rw-r--r--indra/newview/llvoicewebrtc.h37
-rw-r--r--indra/newview/llvosurfacepatch.cpp6
-rw-r--r--indra/newview/llvovolume.cpp2
-rw-r--r--indra/newview/llvovolume.h8
-rw-r--r--indra/newview/llworldmap.h8
-rw-r--r--indra/newview/pipeline.cpp159
-rw-r--r--indra/newview/pipeline.h1
-rw-r--r--indra/newview/skins/default/xui/en/floater_settings_color.xml117
-rw-r--r--indra/newview/skins/default/xui/en/floater_world_map.xml3
-rw-r--r--indra/newview/skins/default/xui/en/menu_login.xml7
-rw-r--r--indra/newview/skins/default/xui/en/menu_viewer.xml7
-rw-r--r--indra/newview/skins/default/xui/en/notifications.xml1
-rw-r--r--indra/newview/skins/default/xui/en/panel_region_debug.xml2
-rwxr-xr-xindra/newview/viewer_manifest.py30
170 files changed, 3398 insertions, 2581 deletions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
index b385e3ba12..53bfbc2c0a 100644
--- a/.github/workflows/build.yaml
+++ b/.github/workflows/build.yaml
@@ -22,6 +22,7 @@ jobs:
# important to ensure it's the empty string when false. If you omit || '',
# its value when false is "false", which is interpreted as true.
RELEASE_RUN: ${{ (github.event.inputs.release_run || github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life')) && 'Y' || '' }}
+ FROM_FORK: ${{ github.event.pull_request.head.repo.fork }}
steps:
- name: Set Variables
id: setvar
@@ -119,10 +120,6 @@ jobs:
${{ runner.os }}-64-${{ matrix.configuration }}-
${{ runner.os }}-64-
- - name: Install windows dependencies
- if: runner.os == 'Windows'
- run: choco install nsis-unicode
-
- name: Determine source branch
id: which-branch
uses: secondlife/viewer-build-util/which-branch@v2
@@ -359,15 +356,32 @@ jobs:
needs: build
runs-on: ubuntu-latest
steps:
+ - name: Download viewer exe
+ uses: actions/download-artifact@v4
+ with:
+ name: Windows-app
+ path: _artifacts
+ - name: Download Windows Symbols
+ if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ uses: actions/download-artifact@v4
+ with:
+ name: Windows-symbols
+ - name: Extract viewer pdb
+ if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ shell: bash
+ run: |
+ tar -xJf "${{ needs.build.outputs.viewer_channel }}.sym.tar.xz" -C _artifacts
- name: Post Windows symbols
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
- uses: secondlife/viewer-build-util/post-bugsplat-windows@v2
+ uses: secondlife-3p/symbol-upload@v10
with:
username: ${{ env.BUGSPLAT_USER }}
password: ${{ env.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018"
- channel: ${{ needs.build.outputs.viewer_channel }}
+ application: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }}
+ directory: _artifacts
+ files: "**/{SecondLifeViewer.exe,llwebrtc.dll,*.pdb}"
post-mac-symbols:
env:
@@ -377,15 +391,22 @@ jobs:
if: needs.build.outputs.configuration == 'Release'
runs-on: ubuntu-latest
steps:
+ - name: Download Mac Symbols
+ if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
+ uses: actions/download-artifact@v4
+ with:
+ name: macOS-symbols
- name: Post Mac symbols
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
- uses: secondlife/viewer-build-util/post-bugsplat-mac@v2
+ uses: secondlife-3p/symbol-upload@v10
with:
username: ${{ env.BUGSPLAT_USER }}
password: ${{ env.BUGSPLAT_PASS }}
database: "SecondLife_Viewer_2018"
- channel: ${{ needs.build.outputs.viewer_channel }}
+ application: ${{ needs.build.outputs.viewer_channel }}
version: ${{ needs.build.outputs.viewer_version }} (${{ needs.build.outputs.viewer_version }})
+ directory: .
+ files: "**/*.xcarchive.zip"
release:
needs: [setup, build, sign-and-package-windows, sign-and-package-mac]
diff --git a/autobuild.xml b/autobuild.xml
index 957ee6c867..b90d94865a 100644
--- a/autobuild.xml
+++ b/autobuild.xml
@@ -46,11 +46,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>dc4a38439f90325b406ec3f7cc4fa66edf0eeec8</string>
+ <string>579a46d77802e301856c93792d39d43bbf939987</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-e935465/apr_suite-1.7.2-e935465-darwin64-e935465.tar.zst</string>
+ <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r2/apr_suite-1.7.4-10338381102-darwin64-10338381102.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -60,9 +60,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>84a1a140f20b25d714949185e854d14b</string>
+ <string>2e5cf11f8774023408402df860d3d1f4a6668500</string>
+ <key>hash_algorithm</key>
+ <string>sha1</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/4811/15302/apr_suite-1.4.5.504800-linux64-504800.tar.bz2</string>
+ <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r2/apr_suite-1.7.4-10338381102-linux64-10338381102.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -72,11 +74,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>8233de9a11f323a03d569db1043ba5198176457b</string>
+ <string>7eb6b8f294c4563a07fec3578be2d04af17a60cb</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.2-e935465/apr_suite-1.7.2-e935465-windows64-e935465.tar.zst</string>
+ <string>https://github.com/secondlife/3p-apr_suite/releases/download/v1.7.4-r2/apr_suite-1.7.4-10338381102-windows64-10338381102.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -89,7 +91,7 @@
<key>copyright</key>
<string>Copyright © 2012 The Apache Software Foundation, Licensed under the Apache License, Version 2.0.</string>
<key>version</key>
- <string>1.7.2-e935465</string>
+ <string>1.7.4-10338381102</string>
<key>name</key>
<string>apr_suite</string>
<key>description</key>
@@ -104,11 +106,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d600779da508fbb64eb85957f2866fd2b039b674</string>
+ <string>e86c0dba9fe7ede25fe00a1435421bce62077dc1</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r1/boost-1.85-darwin64-10124675220.tar.zst</string>
+ <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r3/boost-1.85-darwin64-10333387089.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -118,11 +120,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>ce39890fe263358d99c45f1b697107b72e3b6870</string>
+ <string>30e1096fede786e5553a7c65b9d55dea9555bef3</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r1/boost-1.85-linux64-10124675220.tar.zst</string>
+ <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r3/boost-1.85-linux64-10333387089.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -132,11 +134,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>2b0b0b0aaf3bdb1d36809db7d08bd60ae7e8fed1</string>
+ <string>e640611a7e4b245c8900048b995e243fb68b90c9</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r1/boost-1.85-windows64-10124675220.tar.zst</string>
+ <string>https://github.com/secondlife/3p-boost/releases/download/v1.85.0-r3/boost-1.85-windows64-10333387089.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -210,11 +212,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>a29852f41b77a26a2c10af1d179bf7c4b6a1b12b</string>
+ <string>ebe9defd8911b1e6d8783aebd692674845095630</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r6/colladadom-2.3.10129939866-darwin64-10129939866.tar.zst</string>
+ <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r7/colladadom-2.3.0-r7-darwin64-10342904699.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -224,11 +226,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>933c31aa8da53731c75c272b90a64dde08dc1f4d</string>
+ <string>083f93911f6b6501fdc5a5985b2e379f3b9803cd</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r6/colladadom-2.3.10129939866-linux64-10129939866.tar.zst</string>
+ <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r7/colladadom-2.3.0-r7-linux64-10342904699.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -238,11 +240,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c01f1692a48d26436297bd5ac4b54fd3c71f7651</string>
+ <string>6ba23076b439a62bb346ebaeb1656a645bf71177</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r6/colladadom-2.3.10129939866-windows64-10129939866.tar.zst</string>
+ <string>https://github.com/secondlife/3p-colladadom/releases/download/v2.3-r7/colladadom-2.3.0-r7-windows64-10342904699.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -255,7 +257,7 @@
<key>copyright</key>
<string>Copyright 2006 Sony Computer Entertainment Inc.</string>
<key>version</key>
- <string>2.3.10129939866</string>
+ <string>2.3.0-r7</string>
<key>name</key>
<string>colladadom</string>
</map>
@@ -324,11 +326,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d4d5f27008de1ff7e86ae852841c68849b02eaea</string>
+ <string>9c74adfd217fcc04869ef574078bc56a4a1380f3</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-5a4a82d/curl-7.54.1-5a4a82d-darwin64-5a4a82d.tar.zst</string>
+ <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r1/curl-7.54.1-10342910827-darwin64-10342910827.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -338,9 +340,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>630a2ddf43bba6e5b6e171dc68921dcb</string>
+ <string>325ad581a1ba99fbc1e74d48481e07546eaf1e0e</string>
+ <key>hash_algorithm</key>
+ <string>sha1</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/8663/36142/curl-7.54.1.508652-linux64-508652.tar.bz2</string>
+ <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r1/curl-7.54.1-10342910827-linux64-10342910827.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -350,11 +354,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>07423f41d1320ea405f493869f6460cf8c45def5</string>
+ <string>794480208e72a928552760cd048438b90aa1c80d</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-5a4a82d/curl-7.54.1-5a4a82d-windows64-5a4a82d.tar.zst</string>
+ <string>https://github.com/secondlife/3p-curl/releases/download/v7.54.1-r1/curl-7.54.1-10342910827-windows64-10342910827.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -367,7 +371,7 @@
<key>copyright</key>
<string>Copyright (c) 1996 - 2014, Daniel Stenberg, (daniel@haxx.se).</string>
<key>version</key>
- <string>7.54.1-5a4a82d</string>
+ <string>7.54.1-10342910827</string>
<key>name</key>
<string>curl</string>
<key>description</key>
@@ -437,6 +441,16 @@
</map>
<key>dullahan</key>
<map>
+ <key>copyright</key>
+ <string>Copyright (c) 2017, Linden Research, Inc.</string>
+ <key>description</key>
+ <string>A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies.</string>
+ <key>license</key>
+ <string>MPL</string>
+ <key>license_file</key>
+ <string>LICENSES/LICENSE.txt</string>
+ <key>name</key>
+ <string>dullahan</string>
<key>platforms</key>
<map>
<key>darwin64</key>
@@ -444,74 +458,64 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>e4d568c166049ce61b39d69887b56d2382781a1a</string>
+ <string>7fde76e3f0e62d0e0593b6157f4d740ecef2429d</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/dullahan/releases/download/v118.0.5993.54/dullahan-1.14.0.202310131309_118.4.1_g3dd6078_chromium-118.0.5993.54-darwin64-6b02a60.tar.zst</string>
+ <string>https://github.com/secondlife/dullahan/releases/download/v1.14.0-r3/dullahan-1.14.0.202408091638_118.4.1_g3dd6078_chromium-118.0.5993.54-darwin64-10322607516.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
</map>
- <key>windows64</key>
+ <key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>a00eae7f5dc430ae48389ab723ced39739b0a144</string>
+ <string>209d031ae67bc66d8e8f8509c71d259014c65ceb</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/dullahan/releases/download/v118.0.5993.54/dullahan-1.14.0.202310131404_118.4.1_g3dd6078_chromium-118.0.5993.54-windows64-6b02a60.tar.zst</string>
+ <string>https://github.com/secondlife/dullahan/releases/download/v1.14.0-r3/dullahan-1.14.0.202408091637_118.4.1_g3dd6078_chromium-118.0.5993.54-linux64-10322607516.tar.zst</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>linux64</string>
</map>
- </map>
- <key>license</key>
- <string>MPL</string>
- <key>license_file</key>
- <string>LICENSES/LICENSE.txt</string>
- <key>copyright</key>
- <string>Copyright (c) 2017, Linden Research, Inc.</string>
- <key>version</key>
- <string>1.14.0.202310131404_118.4.1_g3dd6078_chromium-118.0.5993.54</string>
- <key>name</key>
- <string>dullahan</string>
- <key>description</key>
- <string>A headless browser SDK that uses the Chromium Embedded Framework (CEF). It is designed to make it easier to write applications that render modern web content directly to a memory buffer, inject synthesized mouse and keyboard events as well as interact with web based features like JavaScript or cookies.</string>
- </map>
- <key>emoji_shortcodes</key>
- <map>
- <key>platforms</key>
- <map>
- <key>darwin64</key>
+ <key>windows64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>52c41a4547d2d9aceb4a9a1e9e1680c71e5ffa79</string>
+ <string>4124c79d8b0e319877ffa4c12581d5c1318b4d93</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v6.1.0.5413f58/emoji_shortcodes-6.1.0.5413f58-darwin64-5413f58.tar.zst</string>
+ <string>https://github.com/secondlife/dullahan/releases/download/v1.14.0-r3/dullahan-1.14.0.202408091639_118.4.1_g3dd6078_chromium-118.0.5993.54-windows64-10322607516.tar.zst</string>
</map>
<key>name</key>
- <string>darwin64</string>
+ <string>windows64</string>
</map>
- <key>windows64</key>
+ </map>
+ <key>version</key>
+ <string>1.14.0.202408091639_118.4.1_g3dd6078_chromium-118.0.5993.54</string>
+ </map>
+ <key>emoji_shortcodes</key>
+ <map>
+ <key>platforms</key>
+ <map>
+ <key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>3137e06d376767a631bc9626832d558c4d5e5aa9</string>
+ <string>9c58108270fbad15a321f75501cdfb9c6b78a6f2</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v6.1.0.5413f58/emoji_shortcodes-6.1.0.5413f58-windows64-5413f58.tar.zst</string>
+ <string>https://github.com/secondlife/3p-emoji-shortcodes/releases/download/v15.3.2-r1/emoji_shortcodes-15.3.2.10207138275-common-10207138275.tar.zst</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>common</string>
</map>
</map>
<key>license</key>
@@ -521,7 +525,7 @@
<key>copyright</key>
<string>Copyright 2017-2019 Miles Johnson.</string>
<key>version</key>
- <string>6.1.0.5413f58</string>
+ <string>15.3.2.10207138275</string>
<key>name</key>
<string>emoji_shortcodes</string>
<key>canonical_repo</key>
@@ -538,11 +542,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>b85526ca80b6a7e73c7870285cf68d568f742095</string>
+ <string>8cc4f38fd809d9ff5d8ca617d7e068eb236f4162</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-darwin64-1f36d02.tar.zst</string>
+ <string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r5/expat-2.6.2-r5-darwin64-10337781902.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -552,11 +556,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>4cd82e2dec06ddff19e9b3dc0254f2593ec80452</string>
+ <string>d7f3bbfd65fce365c3cd5be9ab72072580408dec</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-linux64-1f36d02.tar.zst</string>
+ <string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r5/expat-2.6.2-r5-linux64-10337781902.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -566,11 +570,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>47c01a89bc32c5740efe51be43e459ffd9b7cd34</string>
+ <string>f11d91205bb753d7389a73e629627b200219c62f</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-expat/releases/download/v2.1.1.1f36d02/expat-2.1.1.1f36d02-windows64-1f36d02.tar.zst</string>
+ <string>https://github.com/secondlife/3p-expat/releases/download/v2.6.2-r5/expat-2.6.2-r5-windows64-10337781902.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -581,9 +585,9 @@
<key>license_file</key>
<string>LICENSES/expat.txt</string>
<key>copyright</key>
- <string>Copyright (c) 1998, 1999, 2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006 Expat maintainers.</string>
+ <string>Copyright (c) 1998-2000 Thai Open Source Software Center Ltd and Clark Cooper - Copyright (c) 2001-2022 Expat maintainers.</string>
<key>version</key>
- <string>2.1.1.1f36d02</string>
+ <string>2.6.2-r5</string>
<key>name</key>
<string>expat</string>
<key>description</key>
@@ -628,11 +632,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d90a5c2fb4a729eeff3965ea6dd0a35cf146d379</string>
+ <string>df465ce3048add93f76d1f13e0f04d21b3875b74</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-freetype/releases/download/v.2.12.1.557becd/freetype-2.12.1.557becd-darwin64-557becd.tar.zst</string>
+ <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.2-r1/freetype-2.13.2-r1-darwin64-10342925957.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -642,11 +646,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>4a999279562e8f3e4ba02d3e78a844ddf6fe18f1</string>
+ <string>7cdc4f27dfa6424400863c746b487199b765794e</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-freetype/releases/download/v.2.12.1.557becd/freetype-2.12.1.557becd-linux64-557becd.tar.zst</string>
+ <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.2-r1/freetype-2.13.2-r1-linux64-10342925957.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -656,11 +660,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>1837fdfd44204c78e79134944f824b0211817883</string>
+ <string>44788d645b3bcf9a7aaf7c3a92d609fbb2b36413</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-freetype/releases/download/v.2.12.1.557becd/freetype-2.12.1.557becd-windows64-557becd.tar.zst</string>
+ <string>https://github.com/secondlife/3p-freetype/releases/download/v2.13.2-r1/freetype-2.13.2-r1-windows64-10342925957.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -673,7 +677,7 @@
<key>copyright</key>
<string>Copyright 2006, 2007, 2008, 2009, 2010 by David Turner, Robert Wilhelm, and Werner Lemberg.</string>
<key>version</key>
- <string>2.12.1.557becd</string>
+ <string>2.13.2-r1</string>
<key>name</key>
<string>freetype</string>
<key>description</key>
@@ -959,63 +963,65 @@
<key>name</key>
<string>jpegencoderbasic</string>
</map>
- <key>jpeglib</key>
+ <key>libjpeg-turbo</key>
<map>
<key>platforms</key>
<map>
- <key>darwin64</key>
+ <key>windows64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>776d114aa1e3455bb13deaacd756deb07b53ecbe</string>
+ <string>34cf4fdbbc999e67b0528f7ca3c7f31f35267ecf</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-jpeglib/releases/download/v8c.7846234/jpeglib-8c.7846234-darwin64-7846234.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libjpeg-turbo/releases/download/v3.0.3-r2/libjpeg_turbo-3.0.3-r2-windows64-10341191820.tar.zst</string>
</map>
<key>name</key>
- <string>darwin64</string>
+ <string>windows64</string>
</map>
<key>linux64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>b4b2278bd2fcae85619e2145a243cca388d760d7</string>
+ <string>5ff05a0e5ed0aba1514b84d3c2edaf70c18738b5</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-jpeglib/releases/download/v8c.7846234/jpeglib-8c.7846234-linux64-7846234.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libjpeg-turbo/releases/download/v3.0.3-r2/libjpeg_turbo-3.0.3-r2-linux64-10341191820.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
</map>
- <key>windows64</key>
+ <key>darwin64</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>d50fcac69eeb9404638da07db96ee3e1191ecf93</string>
+ <string>7c38eabc050b4a6bdb183a1d7a38da885341049c</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-jpeglib/releases/download/v8c.7846234/jpeglib-8c.7846234-windows64-7846234.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libjpeg-turbo/releases/download/v3.0.3-r2/libjpeg_turbo-3.0.3-r2-darwin64-10341191820.tar.zst</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>darwin64</string>
</map>
</map>
<key>license</key>
- <string>jpeglib</string>
+ <string>libjpeg-turbo</string>
<key>license_file</key>
- <string>LICENSES/jpeglib.txt</string>
+ <string>LICENSES/libjpeg-turbo.txt</string>
<key>copyright</key>
- <string>Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.</string>
+ <string>Copyright (C)2009-2024 D. R. Commander. All Rights Reserved. Copyright (C)2015 Viktor Szathmáry. All Rights Reserved.</string>
<key>version</key>
- <string>8c.7846234</string>
+ <string>3.0.3-r2</string>
<key>name</key>
- <string>jpeglib</string>
+ <string>libjpeg-turbo</string>
+ <key>canonical_repo</key>
+ <string>https://github.com/secondlife/3p-libjpeg-turbo</string>
<key>description</key>
<string>JPEG encoding, decoding library</string>
</map>
@@ -1110,11 +1116,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d5757ab84d934fa358f299ab91e2e297beaa3dac</string>
+ <string>e71ae7a645603fe967a69aa5beb5b3009185e177</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-darwin64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-darwin64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1124,11 +1130,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>6413d3bd4cd50c2a6b7f949eb4bd6f0c94feb984</string>
+ <string>275ffb7f60064d8008aed8406f80f34229f651fc</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-linux64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-linux64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1138,11 +1144,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>c1be4a79b20435030b2e0e01b582c61b462c8376</string>
+ <string>89ff24e93eaeca7949ccdb5cc368f938f5b1f307</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.3.2.650fb94/libhunspell-1.3.2.650fb94-windows64-650fb94.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libhunspell/releases/download/v1.7.2-r1/libhunspell-1.7.2.10207243663-windows64-10207243663.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1153,9 +1159,9 @@
<key>license_file</key>
<string>LICENSES/hunspell.txt</string>
<key>copyright</key>
- <string>See hunspell.txt</string>
+ <string>LGPL 2.1</string>
<key>version</key>
- <string>1.3.2.650fb94</string>
+ <string>1.7.2.10207243663</string>
<key>name</key>
<string>libhunspell</string>
<key>description</key>
@@ -1216,11 +1222,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>fea8f0684a4ed0a73343651948b13049a135a92a</string>
+ <string>6fe46ed1e2e40616abdacf7115e510645d5f62e7</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.38-ca06e99/libpng-1.6.38-ca06e99-darwin64-ca06e99.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.43-r2/libpng-1.6.43-r2-darwin64-10329429325.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1230,9 +1236,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>13de93ea11544051b69f238eeb644fd3</string>
+ <string>b54a4710d9c3ddfa044e1d29f9c38974e9fc645d</string>
+ <key>hash_algorithm</key>
+ <string>sha1</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/882/1946/libpng-1.6.8.500873-linux64-500873.tar.bz2</string>
+ <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.43-r2/libpng-1.6.43-r2-linux64-10329429325.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1242,11 +1250,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>b91c116a1fda2377954355e56517634db0137699</string>
+ <string>eddb96c73c8916bf71eaa5d0edb812d20e72c255</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.38-ca06e99/libpng-1.6.38-ca06e99-windows64-ca06e99.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libpng/releases/download/v1.6.43-r2/libpng-1.6.43-r2-windows64-10329429325.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1259,7 +1267,7 @@
<key>copyright</key>
<string>Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson</string>
<key>version</key>
- <string>1.6.38-ca06e99</string>
+ <string>1.6.43-r2</string>
<key>name</key>
<string>libpng</string>
<key>description</key>
@@ -1304,11 +1312,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>2c46547d9dc83c47f41eacc7e5092affa72f3eee</string>
+ <string>b2bf9adc84841b6fcf48d4c00787b221607cdea3</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.9.4.7476681/libxml2-2.9.4.7476681-darwin64-7476681.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.3-r1/libxml2-2.13.3-r1-darwin64-10329675166.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1318,11 +1326,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>4cda464277bfa6756ce4663a91cd724f3f45b8d8</string>
+ <string>6ab8108ea0a42e0bd462568c495e5ce5c4cdc0ff</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.9.4.7476681/libxml2-2.9.4.7476681-linux64-7476681.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.3-r1/libxml2-2.13.3-r1-linux64-10329675166.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1332,11 +1340,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>7e506d26f8cb6f205146e41d74095e7e27087e84</string>
+ <string>5181bd267de3ad4466227f91c7e2cbed7e8b85d9</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.9.4.7476681/libxml2-2.9.4.7476681-windows64-7476681.tar.zst</string>
+ <string>https://github.com/secondlife/3p-libxml2/releases/download/v2.13.3-r1/libxml2-2.13.3-r1-windows64-10329675166.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1349,7 +1357,7 @@
<key>copyright</key>
<string>Copyright (C) 1998-2012 Daniel Veillard. All Rights Reserved.</string>
<key>version</key>
- <string>2.9.4.7476681</string>
+ <string>2.13.3-r1</string>
<key>name</key>
<string>libxml2</string>
<key>description</key>
@@ -1619,11 +1627,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>3d173e176e9777f1b10f54fe0bd1c735a65b56e5</string>
+ <string>d79631d845e2b5e4a9e6f6b660310795fd49023e</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r1/meshoptimizer-210-darwin64-9846246058.tar.zst</string>
+ <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r2/meshoptimizer-210.0.0-r2-darwin64-10341021290.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1633,11 +1641,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>6777467d1d06064351c27f70d556fdcba8420c52</string>
+ <string>024ce689a6f13e66d0c7e431ac34071434e2365a</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r1/meshoptimizer-210-windows64-9846246058.tar.zst</string>
+ <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r2/meshoptimizer-210.0.0-r2-windows64-10341021290.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1647,11 +1655,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>17eb4a03f94d363e9ad8b096ac590e0649cf91fa</string>
+ <string>c947107c0aca46e94e22f66328a3cbbd01d99b36</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r1/meshoptimizer-210-linux64-9846246058.tar.zst</string>
+ <string>https://github.com/secondlife/3p-meshoptimizer/releases/download/v210-r2/meshoptimizer-210.0.0-r2-linux64-10341021290.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1664,7 +1672,7 @@
<key>copyright</key>
<string>Copyright (c) 2016-2021 Arseny Kapoulkine</string>
<key>version</key>
- <string>210</string>
+ <string>210.0.0-r2</string>
<key>name</key>
<string>meshoptimizer</string>
<key>canonical_repo</key>
@@ -1674,18 +1682,6 @@
</map>
<key>mikktspace</key>
<map>
- <key>canonical_repo</key>
- <string>https://bitbucket.org/lindenlab/3p-mikktspace</string>
- <key>copyright</key>
- <string>Copyright (C) 2011 by Morten S. Mikkelsen, Copyright (C) 2022 Blender Authors</string>
- <key>description</key>
- <string>Mikktspace Tangent Generator</string>
- <key>license</key>
- <string>Apache 2.0</string>
- <key>license_file</key>
- <string>mikktspace.txt</string>
- <key>name</key>
- <string>mikktspace</string>
<key>platforms</key>
<map>
<key>darwin64</key>
@@ -1731,8 +1727,20 @@
<string>windows64</string>
</map>
</map>
+ <key>license</key>
+ <string>Apache 2.0</string>
+ <key>license_file</key>
+ <string>mikktspace.txt</string>
+ <key>copyright</key>
+ <string>Copyright (C) 2011 by Morten S. Mikkelsen, Copyright (C) 2022 Blender Authors</string>
<key>version</key>
<string>1</string>
+ <key>name</key>
+ <string>mikktspace</string>
+ <key>canonical_repo</key>
+ <string>https://bitbucket.org/lindenlab/3p-mikktspace</string>
+ <key>description</key>
+ <string>Mikktspace Tangent Generator</string>
</map>
<key>minizip-ng</key>
<map>
@@ -1743,11 +1751,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>303fa93a0fd6c636a65fd9d5d53beceb84752b0e</string>
+ <string>6bedaa9d770ef0ae6147f49a26fc3209fde9cb80</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v3.0.2.3e9876e/minizip_ng-3.0.2.3e9876e-darwin64-3e9876e.tar.zst</string>
+ <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r1/minizip_ng-4.0.7-r1-darwin64-10324657515.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1757,11 +1765,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>d4f35ebcea53ab6e9f2e6cbc0d680b10d10b9c53</string>
+ <string>ce2c91b8c4f89af252ce1b6a96af6985fe54f509</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v3.0.2.3e9876e/minizip_ng-3.0.2.3e9876e-linux64-3e9876e.tar.zst</string>
+ <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r1/minizip_ng-4.0.7-r1-linux64-10324657515.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1771,11 +1779,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>5dc469172ba4c6015d5b771e516bc88a65d769eb</string>
+ <string>9cee9d85f9a7c6fb051125775f0122a926da5cc9</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v3.0.2.3e9876e/minizip_ng-3.0.2.3e9876e-windows64-3e9876e.tar.zst</string>
+ <string>https://github.com/secondlife/3p-minizip-ng/releases/download/v4.0.7-r1/minizip_ng-4.0.7-r1-windows64-10324657515.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1788,7 +1796,7 @@
<key>copyright</key>
<string>This project uses the zlib license. Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
<key>version</key>
- <string>3.0.2.3e9876e</string>
+ <string>4.0.7-r1</string>
<key>name</key>
<string>minizip-ng</string>
<key>canonical_repo</key>
@@ -1861,11 +1869,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>fff611030a34e78b3a88168f64e4e33aef117bc3</string>
+ <string>3f3374a5d97803bf78acf20847c2900c7d68ce2b</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.40.0.b1526c6/nghttp2-1.40.0.b1526c6-darwin64-b1526c6.tar.zst</string>
+ <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.62.1/nghttp2-1.62.1-darwin64-10329456052.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1875,11 +1883,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>5798b5f6c8579ad44f211a873c072ee8d3fd8c93</string>
+ <string>bd9c211f9f53c04821f0ab0e1268a691926331b6</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.40.0.b1526c6/nghttp2-1.40.0.b1526c6-linux64-b1526c6.tar.zst</string>
+ <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.62.1/nghttp2-1.62.1-linux64-10329456052.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1889,11 +1897,11 @@
<key>archive</key>
<map>
<key>hash</key>
- <string>05aad7759519719a54a6100fddd35b69e57f2386</string>
+ <string>c23e25a7c47f5233f543a90f1a9ccf4da9282379</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.40.0.b1526c6/nghttp2-1.40.0.b1526c6-windows64-b1526c6.tar.zst</string>
+ <string>https://github.com/secondlife/3p-nghttp2/releases/download/v1.62.1/nghttp2-1.62.1-windows64-10329456052.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1907,7 +1915,7 @@
<string>Copyright (c) 2012, 2014, 2015, 2016 Tatsuhiro Tsujikawa
Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>version</key>
- <string>1.40.0.b1526c6</string>
+ <string>1.62.1</string>
<key>name</key>
<string>nghttp2</string>
<key>description</key>
@@ -1956,11 +1964,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>ad0dd0f608b868cc44c225ee48e114239fca2807</string>
+ <string>3abb5d21655aeca9d6a4de37704e8475821c28d9</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6.e4101b6/ogg_vorbis-1.3.3-1.3.6.e4101b6-darwin64-e4101b6.tar.zst</string>
+ <string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7-r1/ogg_vorbis-1.3.5-1.3.7.10341271136-darwin64-10341271136.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -1970,9 +1978,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>45ebd074053dc9cae8c5c74b52085d4b</string>
+ <string>d89dff615c51b46ebdb3d42ac6bd9e0faae5ddf1</string>
+ <key>hash_algorithm</key>
+ <string>sha1</string>
<key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/465/990/ogg_vorbis-1.2.2-1.3.2.500397-linux64-500397.tar.bz2</string>
+ <string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7-r1/ogg_vorbis-1.3.5-1.3.7.10341271136-linux64-10341271136.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -1982,11 +1992,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>2e73a0a5659c9a09eba2f94619aa5c23c7cc3937</string>
+ <string>0dc0f5334d1c882d5d7bce6d2cfaecf2f7ab1ae6</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.3-1.3.6.e4101b6/ogg_vorbis-1.3.3-1.3.6.e4101b6-windows64-e4101b6.tar.zst</string>
+ <string>https://github.com/secondlife/3p-ogg_vorbis/releases/download/v1.3.5-1.3.7-r1/ogg_vorbis-1.3.5-1.3.7.10341271136-windows64-10341271136.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -1999,7 +2009,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright (c) 2002, Xiph.org Foundation</string>
<key>version</key>
- <string>1.3.3-1.3.6.e4101b6</string>
+ <string>1.3.5-1.3.7.10341271136</string>
<key>name</key>
<string>ogg_vorbis</string>
<key>description</key>
@@ -2149,11 +2159,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>b286e4a10cf6b1b2710b85ff96ffc0e41fd5fde8</string>
+ <string>a20277991043a4a00fb8280a27a41fbd87c4b840</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-darwin64-de53f55.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r1/openssl-1.1.1w-darwin64-10329796904.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -2163,11 +2173,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>5f6953db991ef6badb0525ecc98daf28d368e9e7</string>
+ <string>0f2cd519431b11cacf85971c66c49e5b4d26c56f</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-linux64-de53f55.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r1/openssl-1.1.1w-linux64-10329796904.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -2177,11 +2187,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>8bd3dea6d81de5e469b241a1b79e61efce6ecc05</string>
+ <string>5e396eedf1492d18126b7281367123c1d64b89aa</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1q.de53f55/openssl-1.1.1q.de53f55-windows64-de53f55.tar.zst</string>
+ <string>https://github.com/secondlife/3p-openssl/releases/download/v1.1.1w-r1/openssl-1.1.1w-windows64-10329796904.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -2194,70 +2204,12 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved; Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)</string>
<key>version</key>
- <string>1.1.1q.de53f55</string>
+ <string>1.1.1w</string>
<key>name</key>
<string>openssl</string>
<key>description</key>
<string>Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) Library</string>
</map>
- <key>pcre</key>
- <map>
- <key>platforms</key>
- <map>
- <key>darwin64</key>
- <map>
- <key>archive</key>
- <map>
- <key>hash</key>
- <string>b372d37596474043a62568e569b0ce155192f484</string>
- <key>hash_algorithm</key>
- <string>sha1</string>
- <key>url</key>
- <string>https://github.com/secondlife/3p-pcre/releases/download/v8.35.979fd86/pcre-8.35.979fd86-darwin64-979fd86.tar.zst</string>
- </map>
- <key>name</key>
- <string>darwin64</string>
- </map>
- <key>linux64</key>
- <map>
- <key>archive</key>
- <map>
- <key>hash</key>
- <string>0f058ca2176e7d02d51e54c66a96f336</string>
- <key>url</key>
- <string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/908/2010/pcre-8.35.500898-linux64-500898.tar.bz2</string>
- </map>
- <key>name</key>
- <string>linux64</string>
- </map>
- <key>windows64</key>
- <map>
- <key>archive</key>
- <map>
- <key>hash</key>
- <string>166564afb60a7536a038fae80e2fc9a41d6dbccb</string>
- <key>hash_algorithm</key>
- <string>sha1</string>
- <key>url</key>
- <string>https://github.com/secondlife/3p-pcre/releases/download/v8.35.979fd86/pcre-8.35.979fd86-windows64-979fd86.tar.zst</string>
- </map>
- <key>name</key>
- <string>windows64</string>
- </map>
- </map>
- <key>license</key>
- <string>bsd</string>
- <key>license_file</key>
- <string>LICENSES/pcre-license.txt</string>
- <key>copyright</key>
- <string>Copyright (c) 1997-2014 University of Cambridge; Copyright(c) 2009-2014 Zoltan Herczeg; Copyright (c) 2007-2012, Google Inc.</string>
- <key>version</key>
- <string>8.35.979fd86</string>
- <key>name</key>
- <string>pcre</string>
- <key>description</key>
- <string>PCRE Perl-compatible regular expression library</string>
- </map>
<key>slvoice</key>
<map>
<key>platforms</key>
@@ -2381,11 +2333,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>2c47ae2d0c38c86b8c2db8d9317f0ab15edfc74f</string>
+ <string>005d23bb2606ae2cc9e844adc1a0edf112c69812</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-tinygltf/releases/download/v2.5.0-1ae57fd/tinygltf-v2.5.0-common-1ae57fd.tar.zst</string>
+ <string>https://github.com/secondlife/3p-tinygltf/releases/download/v2.9.3-r1/tinygltf-2.9.3-r1-common-10341018043.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
@@ -2398,7 +2350,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>// Copyright (c) 2015 - Present Syoyo Fujita, Aurélien Chatelain and many contributors.</string>
<key>version</key>
- <string>v2.5.0</string>
+ <string>2.9.3-r1</string>
<key>name</key>
<string>tinygltf</string>
<key>canonical_repo</key>
@@ -2512,29 +2464,19 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<map>
<key>platforms</key>
<map>
- <key>darwin64</key>
- <map>
- <key>archive</key>
- <map>
- <key>hash</key>
- <string>6041bbd4001e3951f96ac3456c7906da</string>
- <key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113314/980656/viewer_fonts-1.579464-darwin64-579464.tar.bz2</string>
- </map>
- <key>name</key>
- <string>darwin64</string>
- </map>
- <key>windows64</key>
+ <key>common</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
- <string>1745ba6eec0108250446fe01d4aa065c</string>
+ <string>e88a7c97a6843d43e0093388f211299ec2892790</string>
+ <key>hash_algorithm</key>
+ <string>sha1</string>
<key>url</key>
- <string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/113307/980631/viewer_fonts-1.579464-windows64-579464.tar.bz2</string>
+ <string>https://github.com/secondlife/3p-viewer-fonts/releases/download/v1.1.0-r1/viewer_fonts-1.0.0.10204976553-common-10204976553.tar.zst</string>
</map>
<key>name</key>
- <string>windows64</string>
+ <string>common</string>
</map>
</map>
<key>license</key>
@@ -2544,7 +2486,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright 2016-2022 Brad Erickson CC-BY-4.0/MIT, Copyright 2016-2022 Twitter, Inc. CC-BY-4.0, Copyright 2013 Joe Loughry and Terence Eden MIT</string>
<key>version</key>
- <string>1.579464</string>
+ <string>1.0.0.10204976553</string>
<key>name</key>
<string>viewer-fonts</string>
<key>description</key>
@@ -2603,6 +2545,8 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>LICENSE</string>
<key>copyright</key>
<string>Copyright (c) 2000-2012, Linden Research, Inc.</string>
+ <key>version</key>
+ <string>3.0-f14b5ec</string>
<key>name</key>
<string>viewer-manager</string>
<key>description</key>
@@ -2611,11 +2555,17 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<string>https://bitbucket.org/lindenlab/vmp-standalone</string>
<key>source_type</key>
<string>hg</string>
- <key>version</key>
- <string>3.0-f14b5ec</string>
</map>
<key>vlc-bin</key>
<map>
+ <key>copyright</key>
+ <string>Copyright (C) 1998-2016 VLC authors and VideoLAN</string>
+ <key>license</key>
+ <string>GPL2</string>
+ <key>license_file</key>
+ <string>LICENSES/vlc.txt</string>
+ <key>name</key>
+ <string>vlc-bin</string>
<key>platforms</key>
<map>
<key>darwin64</key>
@@ -2623,11 +2573,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>a26b47ab01a7e2c0add4c236886162c1135b3b79</string>
+ <string>f13c82042ef8311e57dd75a3b2bda02d70f711b5</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-vlc-bin/releases/download/v3.0.16.c219a5d/vlc_bin-3.0.16.c219a5d-darwin64-c219a5d.tar.zst</string>
+ <string>https://github.com/secondlife/3p-vlc-bin/releases/download/v3.0.21.e60ee26/vlc_bin-3.0.21.10218721728-darwin64-10218721728.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -2637,26 +2587,18 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>d56002da7435bab166c88d59eeaf69fd87cd897d</string>
+ <string>bd995441c1a229ed1432ddd837d7d1663b8c5548</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-vlc-bin/releases/download/v3.0.16.c219a5d/vlc_bin-3.0.16.c219a5d-windows64-c219a5d.tar.zst</string>
+ <string>https://github.com/secondlife/3p-vlc-bin/releases/download/v3.0.21.e60ee26/vlc_bin-3.0.21.10218721728-windows64-10218721728.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
</map>
</map>
- <key>license</key>
- <string>GPL2</string>
- <key>license_file</key>
- <string>LICENSES/vlc.txt</string>
- <key>copyright</key>
- <string>Copyright (C) 1998-2016 VLC authors and VideoLAN</string>
<key>version</key>
- <string>3.0.16.c219a5d</string>
- <key>name</key>
- <string>vlc-bin</string>
+ <string>3.0.21.10218721728</string>
</map>
<key>vulkan_gltf</key>
<map>
@@ -2701,11 +2643,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>0a0a972036f2b2c9c97dead40c91f7443b8ab339</string>
+ <string>baabb11f324be350253b1fb58cf262c1aa19fa70</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-darwin64-9571929057.tar.zst</string>
+ <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-darwin64-10190042668.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -2715,11 +2657,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>8725ad23f33d946bd5a4e5f28e8c8324925c71a7</string>
+ <string>a13776c8f99f8975665be66ff8b51a80ba46c718</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-linux64-9571929057.tar.zst</string>
+ <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-linux64-10190042668.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -2729,11 +2671,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>db560661807db276a3c7d1e7d9531198c9268f68</string>
+ <string>965ef5d65a14191a52ee9ec6a9a8a1d2ce3f2ffb</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.61-debug/webrtc-m114.5735.08.61-debug.9571929057-windows64-9571929057.tar.zst</string>
+ <string>https://github.com/secondlife/3p-webrtc-build/releases/download/m114.5735.08.67-debug/webrtc-m114.5735.08.67-debug.10190042668-windows64-10190042668.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -2746,7 +2688,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright (c) 2011, The WebRTC project authors. All rights reserved.</string>
<key>version</key>
- <string>m114.5735.08.61-debug.9571929057</string>
+ <string>m114.5735.08.67-debug.10190042668</string>
<key>name</key>
<string>webrtc</string>
<key>vcs_branch</key>
@@ -2767,11 +2709,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>1a73c476b371b62066d1c3eced249660e9467e53</string>
+ <string>fc9362865e33391d55c64d6101726da0a25d924e</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1-69ff69a/xxhash-0.8.1-69ff69a-common-69ff69a.tar.zst</string>
+ <string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.2-r1/xxhash-0.8.2-10285735820-common-10285735820.tar.zst</string>
</map>
<key>name</key>
<string>common</string>
@@ -2784,7 +2726,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright (c) 2012-2021 Yann Collet</string>
<key>version</key>
- <string>0.8.1-69ff69a</string>
+ <string>0.8.2-10285735820</string>
<key>name</key>
<string>xxhash</string>
<key>description</key>
@@ -2799,11 +2741,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>dacc5f3fb307c4d1292ed1ffb1d595d83599062d</string>
+ <string>3a6593c71c59ace76d1349483759fcde4b719a76</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-darwin64-32fd361.tar.zst</string>
+ <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.1-r2/zlib_ng-2.2.1-r2-darwin64-10324415171.tar.zst</string>
</map>
<key>name</key>
<string>darwin64</string>
@@ -2813,11 +2755,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>fba88375e12454ae19f4528e11ffc7ddf7d879ec</string>
+ <string>fbadeb0b8c771cb06c0055c9fab6d40c6764dacd</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-linux64-32fd361.tar.zst</string>
+ <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.1-r2/zlib_ng-2.2.1-r2-linux64-10324415171.tar.zst</string>
</map>
<key>name</key>
<string>linux64</string>
@@ -2827,11 +2769,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>archive</key>
<map>
<key>hash</key>
- <string>ccfca9451063e2d0e95baa73b1ad2054d3e38907</string>
+ <string>0094031715662be626f5106ff6c814f4fc3dacfa</string>
<key>hash_algorithm</key>
<string>sha1</string>
<key>url</key>
- <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v1.2.11.zlib-ng.32fd361/zlib_ng-1.2.11.zlib-ng.32fd361-windows64-32fd361.tar.zst</string>
+ <string>https://github.com/secondlife/3p-zlib-ng/releases/download/v2.2.1-r2/zlib_ng-2.2.1-r2-windows64-10324415171.tar.zst</string>
</map>
<key>name</key>
<string>windows64</string>
@@ -2844,7 +2786,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
<key>copyright</key>
<string>Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler</string>
<key>version</key>
- <string>1.2.11.zlib-ng.32fd361</string>
+ <string>2.2.1-r2</string>
<key>name</key>
<string>zlib-ng</string>
<key>canonical_repo</key>
diff --git a/build.sh b/build.sh
index 74148f455c..dd85fde7d6 100755
--- a/build.sh
+++ b/build.sh
@@ -146,12 +146,21 @@ pre_build()
&& [ -r "$master_message_template_checkout/message_template.msg" ] \
&& template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg"
- RELEASE_CRASH_REPORTING=ON
- HAVOK=ON
+ RELEASE_CRASH_REPORTING=OFF
+ HAVOK=OFF
SIGNING=()
- if [[ "$arch" == "Darwin" && "$variant" == "Release" ]]
- then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \
- "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.")
+ if [[ "$variant" != *OS ]]
+ then
+ # Proprietary builds
+
+ RELEASE_CRASH_REPORTING=ON
+ HAVOK=ON
+
+ if [[ "$arch" == "Darwin" ]]
+ then
+ SIGNING=("-DENABLE_SIGNING:BOOL=YES" \
+ "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.")
+ fi
fi
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
@@ -170,7 +179,7 @@ pre_build()
# This name is consumed by indra/newview/CMakeLists.txt. Make it
# absolute because we've had troubles with relative pathnames.
abs_build_dir="$(cd "$build_dir"; pwd)"
- VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.xz")"
+ VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/symbols/$variant/${viewer_channel}.sym.tar.xz")"
fi
# honor autobuild_configure_parameters same as sling-buildscripts
@@ -526,9 +535,8 @@ then
# nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file.
if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ]
then
- # BugSplat wants to see xcarchive.zip
- # e.g. build-darwin-x86_64/newview/Release/Second Life Test.xcarchive.zip
- symbol_file="${build_dir}/newview/${variant}/${viewer_channel}.xcarchive.zip"
+ # e.g. build-darwin-x86_64/symbols/Release/Second Life Test.xarchive.zip
+ symbol_file="${build_dir}/symbols/${variant}/${viewer_channel}.xcarchive.zip"
if [[ ! -f "$symbol_file" ]]
then
# symbol tarball we prep for (e.g.) Breakpad
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 5a4d276a20..54817ca52d 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -1436,6 +1436,30 @@ Sovereign Engineer
SL-18534
SL-19690
SL-19336
+ secondlife/viewer/pull/1283
+ secondlife/viewer/pull/1287
+ secondlife/viewer/pull/1906
+ secondlife/viewer/pull/1930
+ secondlife/viewer/pull/1941
+ secondlife/viewer/pull/1946
+ secondlife/viewer/pull/1948
+ secondlife/viewer/pull/1950
+ secondlife/viewer/pull/1951
+ secondlife/viewer/pull/2066
+ secondlife/viewer/pull/2077
+ secondlife/viewer/pull/2078
+ secondlife/viewer/pull/2080
+ secondlife/viewer/pull/2085
+ secondlife/viewer/pull/2098
+ secondlife/viewer/pull/2099
+ secondlife/viewer/pull/2105
+ secondlife/viewer/pull/2115
+ secondlife/viewer/pull/2116
+ secondlife/viewer/pull/2124
+ secondlife/viewer/pull/2125
+ secondlife/viewer/pull/2135
+ secondlife/viewer/pull/2136
+ secondlife/viewer/pull/2149
SpacedOut Frye
VWR-34
VWR-45
diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index f1fa7761c3..4b3fa00fcf 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -64,9 +64,7 @@ if (WINDOWS)
# http://www.cmake.org/pipermail/cmake/2009-September/032143.html
string(REPLACE "/Zm1000" " " CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS})
- # zlib has assembly-language object files incompatible with SAFESEH
add_link_options(/LARGEADDRESSAWARE
- /SAFESEH:NO
/NODEFAULTLIB:LIBCMT
/IGNORE:4099)
diff --git a/indra/cmake/APR.cmake b/indra/cmake/APR.cmake
index 21139319c3..97b316c4c7 100644
--- a/indra/cmake/APR.cmake
+++ b/indra/cmake/APR.cmake
@@ -18,6 +18,7 @@ if (WINDOWS)
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}apr-1.lib
${ARCH_PREBUILT_DIRS_RELEASE}/${APR_selector}aprutil-1.lib
)
+ target_compile_definitions( ll::apr INTERFACE APR_DECLARE_STATIC=1 APU_DECLARE_STATIC=1 API_DECLARE_STATIC=1)
elseif (DARWIN)
if (LLCOMMON_LINK_SHARED)
set(APR_selector "0.dylib")
@@ -28,16 +29,15 @@ elseif (DARWIN)
endif (LLCOMMON_LINK_SHARED)
target_link_libraries( ll::apr INTERFACE
- libapr-1.${APR_selector}
- libaprutil-1.${APRUTIL_selector}
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.${APR_selector}
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.${APR_selector}
iconv
)
-else (WINDOWS)
+else()
target_link_libraries( ll::apr INTERFACE
- apr-1
- aprutil-1
- uuid
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libapr-1.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libaprutil-1.a
rt
)
-endif (WINDOWS)
+endif ()
target_include_directories( ll::apr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/apr-1 )
diff --git a/indra/cmake/Audio.cmake b/indra/cmake/Audio.cmake
index 38547bb017..8c82749cab 100644
--- a/indra/cmake/Audio.cmake
+++ b/indra/cmake/Audio.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -9,8 +10,22 @@ use_prebuilt_binary(ogg_vorbis)
target_include_directories( ll::vorbis SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
if (WINDOWS)
- target_link_libraries(ll::vorbis INTERFACE ogg_static vorbis_static vorbisenc_static vorbisfile_static )
+ target_link_libraries(ll::vorbis INTERFACE
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libogg.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisenc.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbisfile.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.lib
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libvorbis.lib
+ )
else (WINDOWS)
- target_link_libraries(ll::vorbis INTERFACE ogg vorbis vorbisenc vorbisfile )
+ target_link_libraries(ll::vorbis INTERFACE
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libogg.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisenc.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbisfile.a
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libvorbis.a
+ )
endif (WINDOWS)
diff --git a/indra/cmake/CURL.cmake b/indra/cmake/CURL.cmake
index b9f685f37b..eea0a2da62 100644
--- a/indra/cmake/CURL.cmake
+++ b/indra/cmake/CURL.cmake
@@ -1,5 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
+include(Linking)
include_guard()
add_library( ll::libcurl INTERFACE IMPORTED )
@@ -7,8 +8,18 @@ add_library( ll::libcurl INTERFACE IMPORTED )
use_system_binary(libcurl)
use_prebuilt_binary(curl)
if (WINDOWS)
- target_link_libraries(ll::libcurl INTERFACE libcurl.lib)
-else (WINDOWS)
- target_link_libraries(ll::libcurl INTERFACE libcurl.a)
-endif (WINDOWS)
+ target_link_libraries(ll::libcurl INTERFACE
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.lib
+ ll::openssl
+ ll::nghttp2
+ ll::zlib-ng
+ )
+else ()
+ target_link_libraries(ll::libcurl INTERFACE
+ ${ARCH_PREBUILT_DIRS_RELEASE}/libcurl.a
+ ll::openssl
+ ll::nghttp2
+ ll::zlib-ng
+ )
+endif ()
target_include_directories( ll::libcurl SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake
index c2ba9231cc..c6b89e1de3 100644
--- a/indra/cmake/Copy3rdPartyLibs.cmake
+++ b/indra/cmake/Copy3rdPartyLibs.cmake
@@ -54,20 +54,12 @@ if(WINDOWS)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files
openjp2.dll
- libapr-1.dll
- libaprutil-1.dll
- nghttp2.dll
- libhunspell.dll
)
- # OpenSSL
- if(ADDRESS_SIZE EQUAL 64)
- set(release_files ${release_files} libcrypto-1_1-x64.dll)
- set(release_files ${release_files} libssl-1_1-x64.dll)
- else(ADDRESS_SIZE EQUAL 64)
- set(release_files ${release_files} libcrypto-1_1.dll)
- set(release_files ${release_files} libssl-1_1.dll)
- endif(ADDRESS_SIZE EQUAL 64)
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files} libapr-1.dll)
+ set(release_files ${release_files} libaprutil-1.dll)
+ endif()
# Filenames are different for 32/64 bit BugSplat file and we don't
# have any control over them so need to branch.
@@ -180,17 +172,18 @@ elseif(DARWIN)
)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
set(release_files
- libapr-1.0.dylib
- libapr-1.dylib
- libaprutil-1.0.dylib
- libaprutil-1.dylib
- ${EXPAT_COPY}
- libhunspell-1.3.0.dylib
libndofdev.dylib
- libnghttp2.dylib
- libnghttp2.14.dylib
)
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files}
+ libapr-1.0.dylib
+ libapr-1.dylib
+ libaprutil-1.0.dylib
+ libaprutil-1.dylib
+ )
+ endif()
+
if (TARGET ll::openal)
list(APPEND release_files libalut.dylib libopenal.dylib)
endif ()
@@ -221,17 +214,13 @@ elseif(LINUX)
set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}")
# *FIX - figure out what to do with duplicate libalut.so here -brad
set(release_files
- ${EXPAT_COPY}
- )
+ )
if( USE_AUTOBUILD_3P )
list( APPEND release_files
- libapr-1.so.0
- libaprutil-1.so.0
libatk-1.0.so
libfreetype.so.6.6.2
libfreetype.so.6
- libhunspell-1.3.so.0.0.0
libopenjp2.so
libuuid.so.16
libuuid.so.16.0.22
@@ -240,6 +229,13 @@ elseif(LINUX)
libgmodule-2.0.so
libgobject-2.0.so
)
+
+ if(LLCOMMON_LINK_SHARED)
+ set(release_files ${release_files}
+ libapr-1.so.0
+ libaprutil-1.so.0
+ )
+ endif()
endif()
else(WINDOWS)
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake
index 327fe8aa72..1a0b8789dc 100644
--- a/indra/cmake/EXPAT.cmake
+++ b/indra/cmake/EXPAT.cmake
@@ -7,14 +7,13 @@ add_library( ll::expat INTERFACE IMPORTED )
use_system_binary(expat)
use_prebuilt_binary(expat)
if (WINDOWS)
- target_link_libraries( ll::expat INTERFACE libexpatMT )
- set(EXPAT_COPY libexpatMT.dll)
-else (WINDOWS)
- target_link_libraries( ll::expat INTERFACE expat )
- if (DARWIN)
- set(EXPAT_COPY libexpat.1.dylib libexpat.dylib)
- else ()
- set(EXPAT_COPY libexpat.so.1 libexpat.so)
- endif ()
-endif (WINDOWS)
+ target_compile_definitions( ll::expat INTERFACE XML_STATIC=1)
+ target_link_libraries( ll::expat INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpatd.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.lib)
+else ()
+ target_link_libraries( ll::expat INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libexpat.a
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libexpat.a)
+endif ()
target_include_directories( ll::expat SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include )
diff --git a/indra/cmake/FreeType.cmake b/indra/cmake/FreeType.cmake
index 77140af641..563491556d 100644
--- a/indra/cmake/FreeType.cmake
+++ b/indra/cmake/FreeType.cmake
@@ -1,5 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
+include(Linking)
include_guard()
add_library( ll::freetype INTERFACE IMPORTED )
@@ -7,5 +8,10 @@ add_library( ll::freetype INTERFACE IMPORTED )
use_system_binary(freetype)
use_prebuilt_binary(freetype)
target_include_directories( ll::freetype SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/freetype2/)
-target_link_libraries( ll::freetype INTERFACE freetype )
+
+if (WINDOWS)
+ target_link_libraries( ll::freetype INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/freetype.lib)
+else()
+ target_link_libraries( ll::freetype INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libfreetype.a)
+endif()
diff --git a/indra/cmake/Hunspell.cmake b/indra/cmake/Hunspell.cmake
index bb037c0237..129679febd 100644
--- a/indra/cmake/Hunspell.cmake
+++ b/indra/cmake/Hunspell.cmake
@@ -1,4 +1,5 @@
# -*- cmake -*-
+include(Linking)
include(Prebuilt)
include_guard()
@@ -8,10 +9,16 @@ add_library( ll::hunspell INTERFACE IMPORTED )
use_system_binary(hunspell)
use_prebuilt_binary(libhunspell)
if (WINDOWS)
- target_link_libraries( ll::hunspell INTERFACE libhunspell)
+ target_compile_definitions( ll::hunspell INTERFACE HUNSPELL_STATIC=1)
+ target_link_libraries( ll::hunspell INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/libhunspell.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell.lib
+ )
elseif(DARWIN)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
elseif(LINUX)
- target_link_libraries( ll::hunspell INTERFACE hunspell-1.3)
+ target_link_libraries( ll::hunspell INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libhunspell-1.7.a
+ )
endif()
target_include_directories( ll::hunspell SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/hunspell)
diff --git a/indra/cmake/JPEG.cmake b/indra/cmake/JPEG.cmake
index 252d7852d4..ade5a070cc 100644
--- a/indra/cmake/JPEG.cmake
+++ b/indra/cmake/JPEG.cmake
@@ -7,12 +7,14 @@ include_guard()
add_library( ll::libjpeg INTERFACE IMPORTED )
use_system_binary(libjpeg)
-use_prebuilt_binary(jpeglib)
+use_prebuilt_binary(libjpeg-turbo)
if (LINUX)
- target_link_libraries( ll::libjpeg INTERFACE jpeg)
+ target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
elseif (DARWIN)
- target_link_libraries( ll::libjpeg INTERFACE jpeg)
+ target_link_libraries( ll::libjpeg INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libjpeg.a)
elseif (WINDOWS)
- target_link_libraries( ll::libjpeg INTERFACE jpeglib)
+ target_link_libraries( ll::libjpeg INTERFACE
+ debug ${ARCH_PREBUILT_DIRS_DEBUG}/jpeg.lib
+ optimized ${ARCH_PREBUILT_DIRS_RELEASE}/jpeg.lib)
endif (LINUX)
target_include_directories( ll::libjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 735f5e8052..d0a52ffb63 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -2,11 +2,11 @@
# these should be moved to their own cmake file
include(Prebuilt)
+include(Linking)
include(Boost)
include_guard()
-add_library( ll::pcre INTERFACE IMPORTED )
add_library( ll::minizip-ng INTERFACE IMPORTED )
add_library( ll::libxml INTERFACE IMPORTED )
add_library( ll::colladadom INTERFACE IMPORTED )
@@ -22,21 +22,18 @@ use_system_binary( colladadom )
use_prebuilt_binary(colladadom)
use_prebuilt_binary(minizip-ng) # needed for colladadom
-use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml2)
-target_link_libraries( ll::pcre INTERFACE pcrecpp pcre )
-
if (WINDOWS)
- target_link_libraries( ll::minizip-ng INTERFACE libminizip )
+ target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/minizip.lib )
else()
- target_link_libraries( ll::minizip-ng INTERFACE minizip )
+ target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libminizip.a )
endif()
if (WINDOWS)
- target_link_libraries( ll::libxml INTERFACE libxml2_a)
+ target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.lib Bcrypt.lib)
else()
- target_link_libraries( ll::libxml INTERFACE xml2)
+ target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.a)
endif()
target_include_directories( ll::colladadom SYSTEM INTERFACE
@@ -44,9 +41,9 @@ target_include_directories( ll::colladadom SYSTEM INTERFACE
${LIBS_PREBUILT_DIR}/include/collada/1.4
)
if (WINDOWS)
- target_link_libraries(ll::colladadom INTERFACE libcollada14dom23-s ll::libxml ll::minizip-ng )
+ target_link_libraries(ll::colladadom INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ll::libxml ll::minizip-ng )
elseif (DARWIN)
- target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+ target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng)
elseif (LINUX)
- target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+ target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng)
endif()
diff --git a/indra/cmake/Linking.cmake b/indra/cmake/Linking.cmake
index 0ab30d0800..1d757abeff 100644
--- a/indra/cmake/Linking.cmake
+++ b/indra/cmake/Linking.cmake
@@ -19,6 +19,7 @@ if (WINDOWS OR DARWIN )
endif()
else()
set(SHARED_LIB_STAGING_DIR ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>)
+ set(SYMBOLS_STAGING_DIR ${CMAKE_BINARY_DIR}/symbols/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/${VIEWER_CHANNEL})
endif()
if( DARWIN )
diff --git a/indra/cmake/NGHTTP2.cmake b/indra/cmake/NGHTTP2.cmake
index 6396a5bd01..7b2aa5971f 100644
--- a/indra/cmake/NGHTTP2.cmake
+++ b/indra/cmake/NGHTTP2.cmake
@@ -8,9 +8,7 @@ use_system_binary(nghttp2)
use_prebuilt_binary(nghttp2)
if (WINDOWS)
target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/nghttp2.lib)
-elseif (DARWIN)
- target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.dylib)
-else (WINDOWS)
- target_link_libraries( ll::nghttp2 INTERFACE libnghttp2.a )
-endif (WINDOWS)
+else ()
+ target_link_libraries( ll::nghttp2 INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libnghttp2.a)
+endif ()
target_include_directories( ll::nghttp2 SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/nghttp2)
diff --git a/indra/cmake/OpenSSL.cmake b/indra/cmake/OpenSSL.cmake
index 3387c74f45..67a84e14af 100644
--- a/indra/cmake/OpenSSL.cmake
+++ b/indra/cmake/OpenSSL.cmake
@@ -1,5 +1,6 @@
# -*- cmake -*-
include(Prebuilt)
+include(Linking)
include_guard()
add_library( ll::openssl INTERFACE IMPORTED )
@@ -7,9 +8,9 @@ add_library( ll::openssl INTERFACE IMPORTED )
use_system_binary(openssl)
use_prebuilt_binary(openssl)
if (WINDOWS)
- target_link_libraries(ll::openssl INTERFACE libssl libcrypto)
+ target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.lib ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.lib Crypt32.lib)
elseif (LINUX)
- target_link_libraries(ll::openssl INTERFACE ssl crypto dl)
+ target_link_libraries(ll::openssl INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libssl.a ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto.a dl)
else()
target_link_libraries(ll::openssl INTERFACE ssl crypto)
endif (WINDOWS)
diff --git a/indra/cmake/PNG.cmake b/indra/cmake/PNG.cmake
index 044262bc8d..e5893e9a20 100644
--- a/indra/cmake/PNG.cmake
+++ b/indra/cmake/PNG.cmake
@@ -7,8 +7,8 @@ add_library( ll::libpng INTERFACE IMPORTED )
use_system_binary(libpng)
use_prebuilt_binary(libpng)
if (WINDOWS)
- target_link_libraries(ll::libpng INTERFACE libpng16)
+ target_link_libraries(ll::libpng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libpng16.lib)
else()
- target_link_libraries(ll::libpng INTERFACE png16 )
+ target_link_libraries(ll::libpng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libpng16.a)
endif()
target_include_directories( ll::libpng SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/libpng16)
diff --git a/indra/cmake/ZLIBNG.cmake b/indra/cmake/ZLIBNG.cmake
index 5d99cd9709..d7b920da26 100644
--- a/indra/cmake/ZLIBNG.cmake
+++ b/indra/cmake/ZLIBNG.cmake
@@ -12,9 +12,9 @@ endif()
use_prebuilt_binary(zlib-ng)
if (WINDOWS)
- target_link_libraries( ll::zlib-ng INTERFACE zlib )
+ target_link_libraries( ll::zlib-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/zlib.lib )
else()
- target_link_libraries( ll::zlib-ng INTERFACE z )
+ target_link_libraries( ll::zlib-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libz.a )
endif (WINDOWS)
if( NOT LINUX )
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h
index 6da28f0692..6143ec8cd1 100644
--- a/indra/llcharacter/llcharacter.h
+++ b/indra/llcharacter/llcharacter.h
@@ -245,6 +245,24 @@ public:
S32 getVisualParamCount() const { return (S32)mVisualParamIndexMap.size(); }
LLVisualParam* getVisualParam(const char *name);
+ void animateTweakableVisualParams(F32 delta)
+ {
+ for (auto& it : mVisualParamIndexMap)
+ {
+ if (it.second->isTweakable())
+ {
+ it.second->animate(delta);
+ }
+ }
+ }
+
+ void applyAllVisualParams(ESex avatar_sex)
+ {
+ for (auto& it : mVisualParamIndexMap)
+ {
+ it.second->apply(avatar_sex);
+ }
+ }
ESex getSex() const { return mSex; }
void setSex( ESex sex ) { mSex = sex; }
diff --git a/indra/llcommon/llerrorcontrol.h b/indra/llcommon/llerrorcontrol.h
index 2be443ca37..1845fc42db 100644
--- a/indra/llcommon/llerrorcontrol.h
+++ b/indra/llcommon/llerrorcontrol.h
@@ -198,7 +198,7 @@ namespace LLError
};
/**
- * @NOTE: addRecorder() and removeRecorder() uses the boost::shared_ptr to allow for shared ownership
+ * @NOTE: addRecorder() and removeRecorder() uses the std::shared_ptr to allow for shared ownership
* while still ensuring that the allocated memory is eventually freed
*/
LL_COMMON_API void addRecorder(RecorderPtr);
diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp
index 9eb92ca6a1..e5d25b52f0 100644
--- a/indra/llcommon/llthread.cpp
+++ b/indra/llcommon/llthread.cpp
@@ -269,6 +269,7 @@ void LLThread::shutdown()
mStatus = STOPPED;
return;
}
+ delete mThreadp;
mThreadp = NULL;
}
@@ -299,6 +300,7 @@ void LLThread::start()
{
mThreadp = new std::thread(std::bind(&LLThread::threadRun, this));
mNativeHandle = mThreadp->native_handle();
+ mThreadp->detach();
}
catch (std::system_error& ex)
{
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index f7a6669825..05b788a433 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -132,45 +132,6 @@ if (LL_TESTS AND LLCOREHTTP_TESTS)
"${CMAKE_CURRENT_SOURCE_DIR}/tests/test_llcorehttp_peer.py"
)
-if (DARWIN)
- # Path inside the app bundle where we'll need to copy libraries
- set(LL_TEST_DESTINATION_DIR
- ${CMAKE_BINARY_DIR}/sharedlibs/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,,../>Resources
- )
-
- # Create the Contents/Resources directory
- add_custom_command(
- TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
- COMMAND ${CMAKE_COMMAND}
- ARGS
- -E
- make_directory
- ${LL_TEST_DESTINATION_DIR}
- COMMENT "Creating Resources directory in app bundle."
- )
-
- # Copy the required libraries to the package app. We used to use a sequence
- # of '${CMAKE_COMMAND} -E copy' commands, but 'cmake -E copy' does only a
- # single file at a time: it doesn't understand wildcards. 'cmake -E copy' is
- # for portability. This operation is Darwin-specific. We can count on the
- # 'cp' command.
- set(copy_dylibs
- libapr-1.0.dylib
- libaprutil-1.0.dylib
- libnghttp2*.dylib
- ${EXPAT_COPY}
- )
-
- add_custom_command(TARGET INTEGRATION_TEST_llcorehttp PRE_BUILD
- WORKING_DIRECTORY "${AUTOBUILD_INSTALL_DIR}/lib/release"
- COMMAND cp -v
- ${copy_dylibs}
- ${LL_TEST_DESTINATION_DIR}
- DEPENDS ${copy_dylibs}
- )
-
-endif (DARWIN)
-
#
# Example Programs
#
diff --git a/indra/llinventory/llsettingsdaycycle.cpp b/indra/llinventory/llsettingsdaycycle.cpp
index abf746ef2c..1e7de94414 100644
--- a/indra/llinventory/llsettingsdaycycle.cpp
+++ b/indra/llinventory/llsettingsdaycycle.cpp
@@ -28,7 +28,6 @@
#include "llsettingsdaycycle.h"
#include "llerror.h"
#include <algorithm>
-#include <boost/make_shared.hpp>
#include "lltrace.h"
#include "llfasttimer.h"
#include "v3colorutil.h"
diff --git a/indra/llinventory/llsettingswater.cpp b/indra/llinventory/llsettingswater.cpp
index 4cd84970ff..161b8cda25 100644
--- a/indra/llinventory/llsettingswater.cpp
+++ b/indra/llinventory/llsettingswater.cpp
@@ -27,7 +27,6 @@
#include "llsettingswater.h"
#include <algorithm>
-#include <boost/make_shared.hpp>
#include "lltrace.h"
#include "llfasttimer.h"
#include "v3colorutil.h"
diff --git a/indra/llprimitive/CMakeLists.txt b/indra/llprimitive/CMakeLists.txt
index 972f502aa9..19a43839af 100644
--- a/indra/llprimitive/CMakeLists.txt
+++ b/indra/llprimitive/CMakeLists.txt
@@ -70,7 +70,6 @@ target_link_libraries(llprimitive
llrender
llphysicsextensions_impl
ll::colladadom
- ll::pcre
ll::glh_linear
)
diff --git a/indra/llrender/llrender.h b/indra/llrender/llrender.h
index e6b4118beb..010ab122b6 100644
--- a/indra/llrender/llrender.h
+++ b/indra/llrender/llrender.h
@@ -293,15 +293,18 @@ public:
enum eTexIndex : U8
{
- DIFFUSE_MAP = 0,
- ALTERNATE_DIFFUSE_MAP = 1,
- NORMAL_MAP = 1,
- SPECULAR_MAP = 2,
- BASECOLOR_MAP = 3,
+ // Channels for material textures
+ DIFFUSE_MAP = 0,
+ ALTERNATE_DIFFUSE_MAP = 1,
+ NORMAL_MAP = 1,
+ SPECULAR_MAP = 2,
+ // Channels for PBR textures
+ BASECOLOR_MAP = 3,
METALLIC_ROUGHNESS_MAP = 4,
- GLTF_NORMAL_MAP = 5,
- EMISSIVE_MAP = 6,
- NUM_TEXTURE_CHANNELS = 7,
+ GLTF_NORMAL_MAP = 5,
+ EMISSIVE_MAP = 6,
+ // Total number of channels
+ NUM_TEXTURE_CHANNELS = 7,
};
enum eVolumeTexIndex : U8
diff --git a/indra/llrender/llrender2dutils.cpp b/indra/llrender/llrender2dutils.cpp
index 176c7a5d2c..428370057e 100644
--- a/indra/llrender/llrender2dutils.cpp
+++ b/indra/llrender/llrender2dutils.cpp
@@ -726,7 +726,7 @@ void gl_line_3d( const LLVector3& start, const LLVector3& end, const LLColor4& c
}
gGL.end();
- LLRender2D::getInstance()->setLineWidth(1.f);
+ LLRender2D::setLineWidth(1.f);
}
void gl_arc_2d(F32 center_x, F32 center_y, F32 radius, S32 steps, bool filled, F32 start_angle, F32 end_angle)
diff --git a/indra/llrender/llrender2dutils.h b/indra/llrender/llrender2dutils.h
index 0d3efc38d6..096e7584f1 100644
--- a/indra/llrender/llrender2dutils.h
+++ b/indra/llrender/llrender2dutils.h
@@ -122,12 +122,13 @@ inline void gl_rect_2d_offset_local( const LLRect& rect, S32 pixel_offset, bool
class LLImageProviderInterface;
-class LLRender2D : public LLParamSingleton<LLRender2D>
+class LLRender2D : public LLSimpleton<LLRender2D>
{
- LLSINGLETON(LLRender2D, LLImageProviderInterface* image_provider);
LOG_CLASS(LLRender2D);
- ~LLRender2D();
public:
+ LLRender2D(LLImageProviderInterface* image_provider);
+ ~LLRender2D();
+
static void pushMatrix();
static void popMatrix();
static void loadIdentity();
diff --git a/indra/llrender/lluiimage.cpp b/indra/llrender/lluiimage.cpp
index d31a91e2af..dc18bf16bf 100644
--- a/indra/llrender/lluiimage.cpp
+++ b/indra/llrender/lluiimage.cpp
@@ -81,10 +81,10 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
}
}
- LLRender2D::getInstance()->pushMatrix();
+ LLRender2D::pushMatrix();
{
LLVector3 rect_origin = origin_agent + ((F32)rect.mLeft * x_axis) + ((F32)rect.mBottom * y_axis);
- LLRender2D::getInstance()->translate(rect_origin.mV[VX],
+ LLRender2D::translate(rect_origin.mV[VX],
rect_origin.mV[VY],
rect_origin.mV[VZ]);
gGL.getTexUnit(0)->bind(getImage());
@@ -103,7 +103,7 @@ void LLUIImage::draw3D(const LLVector3& origin_agent, const LLVector3& x_axis, c
(F32)rect.getWidth() * x_axis,
(F32)rect.getHeight() * y_axis);
- } LLRender2D::getInstance()->popMatrix();
+ } LLRender2D::popMatrix();
}
//#include "lluiimage.inl"
diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp
index 2eb7c21f77..02afcf12c6 100644
--- a/indra/llrender/llvertexbuffer.cpp
+++ b/indra/llrender/llvertexbuffer.cpp
@@ -794,6 +794,18 @@ void LLVertexBuffer::setLabel(const char* label) {
}
#endif
+void LLVertexBuffer::clone(LLVertexBuffer& target) const
+{
+ target.mTypeMask = mTypeMask;
+ target.mIndicesType = mIndicesType;
+ target.mIndicesStride = mIndicesStride;
+ if (target.getNumVerts() != getNumVerts() ||
+ target.getNumIndices() != getNumIndices())
+ {
+ target.allocateBuffer(getNumVerts(), getNumIndices());
+ }
+}
+
void LLVertexBuffer::drawRange(U32 mode, U32 start, U32 end, U32 count, U32 indices_offset) const
{
llassert(validateRange(start, end, count, indices_offset));
diff --git a/indra/llrender/llvertexbuffer.h b/indra/llrender/llvertexbuffer.h
index 49500e28ce..4ada0c335b 100644
--- a/indra/llrender/llvertexbuffer.h
+++ b/indra/llrender/llvertexbuffer.h
@@ -163,13 +163,13 @@ public:
// set for rendering
// assumes (and will assert on) the following:
- // - this buffer has no pending unampBuffer call
+ // - this buffer has no pending unmapBuffer call
// - a shader is currently bound
// - This buffer has sufficient attributes within it to satisfy the needs of the currently bound shader
void setBuffer();
// Only call each getVertexPointer, etc, once before calling unmapBuffer()
- // call unmapBuffer() after calls to getXXXStrider() before any cals to setBuffer()
+ // call unmapBuffer() after calls to getXXXStrider() before any calls to setBuffer()
// example:
// vb->getVertexBuffer(verts);
// vb->getNormalStrider(norms);
@@ -218,12 +218,12 @@ public:
U32 getNumIndices() const { return mNumIndices; }
U32 getTypeMask() const { return mTypeMask; }
- bool hasDataType(AttributeType type) const { return ((1 << type) & getTypeMask()); }
+ bool hasDataType(AttributeType type) const { return ((1 << type) & getTypeMask()); }
U32 getSize() const { return mSize; }
U32 getIndicesSize() const { return mIndicesSize; }
U8* getMappedData() const { return mMappedData; }
U8* getMappedIndices() const { return mMappedIndexData; }
- U32 getOffset(AttributeType type) const { return mOffsets[type]; }
+ U32 getOffset(AttributeType type) const { return mOffsets[type]; }
// these functions assume (and assert on) the current VBO being bound
// Detailed error checking can be enabled by setting gDebugGL to true
@@ -242,6 +242,7 @@ public:
void setLabel(const char* label);
#endif
+ void clone(LLVertexBuffer& target) const;
protected:
U32 mGLBuffer = 0; // GL VBO handle
diff --git a/indra/llui/llbutton.cpp b/indra/llui/llbutton.cpp
index 7b612e445b..30968225a8 100644
--- a/indra/llui/llbutton.cpp
+++ b/indra/llui/llbutton.cpp
@@ -1127,12 +1127,12 @@ void LLButton::setImageSelected(LLPointer<LLUIImage> image)
mImageSelected = image;
}
-void LLButton::setImageColor(const LLColor4& c)
+void LLButton::setImageColor(const LLUIColor& c)
{
mImageColor = c;
}
-void LLButton::setColor(const LLColor4& color)
+void LLButton::setColor(const LLUIColor& color)
{
setImageColor(color);
}
diff --git a/indra/llui/llbutton.h b/indra/llui/llbutton.h
index a54a5b1a43..4ecea6d473 100644
--- a/indra/llui/llbutton.h
+++ b/indra/llui/llbutton.h
@@ -172,8 +172,8 @@ public:
virtual void onCommit();
- void setUnselectedLabelColor( const LLColor4& c ) { mUnselectedLabelColor = c; }
- void setSelectedLabelColor( const LLColor4& c ) { mSelectedLabelColor = c; }
+ void setUnselectedLabelColor( const LLUIColor& c ) { mUnselectedLabelColor = c; }
+ void setSelectedLabelColor( const LLUIColor& c ) { mSelectedLabelColor = c; }
void setUseEllipses( bool use_ellipses ) { mUseEllipses = use_ellipses; }
void setUseFontColor( bool use_font_color) { mUseFontColor = use_font_color; }
@@ -224,14 +224,14 @@ public:
const std::string getLabelSelected() const { return wstring_to_utf8str(mSelectedLabel); }
void setImageColor(const std::string& color_control);
- void setImageColor(const LLColor4& c);
- /*virtual*/ void setColor(const LLColor4& c);
+ void setImageColor(const LLUIColor& c);
+ /*virtual*/ void setColor(const LLUIColor& c);
void setImages(const std::string &image_name, const std::string &selected_name);
- void setDisabledImageColor(const LLColor4& c) { mDisabledImageColor = c; }
+ void setDisabledImageColor(const LLUIColor& c) { mDisabledImageColor = c; }
- void setDisabledSelectedLabelColor( const LLColor4& c ) { mDisabledSelectedLabelColor = c; }
+ void setDisabledSelectedLabelColor( const LLUIColor& c ) { mDisabledSelectedLabelColor = c; }
void setImageOverlay(const std::string& image_name, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
void setImageOverlay(const LLUUID& image_id, LLFontGL::HAlign alignment = LLFontGL::HCENTER, const LLColor4& color = LLColor4::white);
@@ -246,7 +246,7 @@ public:
virtual bool setLabelArg( const std::string& key, const LLStringExplicit& text );
void setLabelUnselected(const LLStringExplicit& label);
void setLabelSelected(const LLStringExplicit& label);
- void setDisabledLabelColor( const LLColor4& c ) { mDisabledLabelColor = c; }
+ void setDisabledLabelColor( const LLUIColor& c ) { mDisabledLabelColor = c; }
void setFont(const LLFontGL *font)
{ mGLFont = ( font ? font : LLFontGL::getFontSansSerif()); }
diff --git a/indra/llui/llcheckboxctrl.cpp b/indra/llui/llcheckboxctrl.cpp
index dea262942b..fc751cfc7f 100644
--- a/indra/llui/llcheckboxctrl.cpp
+++ b/indra/llui/llcheckboxctrl.cpp
@@ -172,11 +172,11 @@ void LLCheckBoxCtrl::setEnabled(bool b)
if (b)
{
- mLabel->setColor( mTextEnabledColor.get() );
+ mLabel->setColor( mTextEnabledColor );
}
else
{
- mLabel->setColor( mTextDisabledColor.get() );
+ mLabel->setColor( mTextDisabledColor );
}
}
diff --git a/indra/llui/llcheckboxctrl.h b/indra/llui/llcheckboxctrl.h
index fc04a8a781..135f128692 100644
--- a/indra/llui/llcheckboxctrl.h
+++ b/indra/llui/llcheckboxctrl.h
@@ -110,8 +110,8 @@ public:
void setBtnFocus() { mButton->setFocus(true); }
- void setEnabledColor( const LLColor4 &color ) { mTextEnabledColor = color; }
- void setDisabledColor( const LLColor4 &color ) { mTextDisabledColor = color; }
+ void setEnabledColor( const LLUIColor&color ) { mTextEnabledColor = color; }
+ void setDisabledColor( const LLUIColor&color ) { mTextDisabledColor = color; }
void setLabel( const LLStringExplicit& label );
std::string getLabel() const;
diff --git a/indra/llui/llconsole.cpp b/indra/llui/llconsole.cpp
index 4f52f5936d..91e6f281da 100644
--- a/indra/llui/llconsole.cpp
+++ b/indra/llui/llconsole.cpp
@@ -183,7 +183,8 @@ void LLConsole::draw()
static LLCachedControl<F32> console_bg_opacity(*LLUI::getInstance()->mSettingGroups["config"], "ConsoleBackgroundOpacity", 0.7f);
F32 console_opacity = llclamp(console_bg_opacity(), 0.f, 1.f);
- static LLColor4 color = LLUIColorTable::instance().getColor("ConsoleBackground");
+ static LLUIColor console_color = LLUIColorTable::instance().getColor("ConsoleBackground");
+ LLColor4 color = console_color;
color.mV[VALPHA] *= console_opacity;
F32 line_height = (F32)mFont->getLineHeight();
diff --git a/indra/llui/llemojihelper.cpp b/indra/llui/llemojihelper.cpp
index fbe313924c..b9441a9c91 100644
--- a/indra/llui/llemojihelper.cpp
+++ b/indra/llui/llemojihelper.cpp
@@ -76,7 +76,9 @@ bool LLEmojiHelper::isCursorInEmojiCode(const LLWString& wtext, S32 cursorPos, S
shortCodePos--;
}
- bool isShortCode = (L':' == wtext[shortCodePos - 1]) && (cursorPos - shortCodePos >= 2);
+ bool isShortCode = (cursorPos - shortCodePos >= 2) && (L':' == wtext[shortCodePos - 1]);
+ if(isShortCode && (shortCodePos >= 2) && isdigit(wtext[shortCodePos - 2])) // <TS:3T> Add qualifier to avoid emoji pop-up when typing times.
+ isShortCode = false;
if (pShortCodePos)
*pShortCodePos = (isShortCode) ? shortCodePos - 1 : -1;
return isShortCode;
diff --git a/indra/llui/llfocusmgr.cpp b/indra/llui/llfocusmgr.cpp
index 937dde4def..c635d24f51 100644
--- a/indra/llui/llfocusmgr.cpp
+++ b/indra/llui/llfocusmgr.cpp
@@ -183,7 +183,7 @@ void LLFocusMgr::releaseFocusIfNeeded( LLView* view )
}
}
- LLUI::getInstance()->removePopup(view);
+ if(LLUI::instanceExists()) LLUI::getInstance()->removePopup(view);
}
void LLFocusMgr::setKeyboardFocus(LLFocusableElement* new_focus, bool lock, bool keystrokes_only)
@@ -481,7 +481,7 @@ void LLFocusMgr::setAppHasFocus(bool focus)
// release focus from "top ctrl"s, which generally hides them
if (!focus)
{
- LLUI::getInstance()->clearPopups();
+ if(LLUI::instanceExists()) LLUI::getInstance()->clearPopups();
}
mAppHasFocus = focus;
}
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp
index 63a600b15f..e4f5664908 100644
--- a/indra/llui/llfolderviewitem.cpp
+++ b/indra/llui/llfolderviewitem.cpp
@@ -784,7 +784,7 @@ void LLFolderViewItem::drawHighlight(const bool showContent, const bool hasKeybo
const S32 FOCUS_LEFT = 1;
// Determine which background color to use for highlighting
- LLUIColor bgColor = (isFlashing() ? flashColor : selectColor);
+ const LLUIColor& bgColor = (isFlashing() ? flashColor : selectColor);
//--------------------------------------------------------------------------------//
// Draw highlight for selected items
@@ -999,7 +999,7 @@ void LLFolderViewItem::draw()
//
if (!mLabelSuffix.empty())
{
- suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : (LLColor4)sSuffixColor,
+ suffix_font->render( mLabelSuffix, 0, right_x, y, isFadeItem() ? color : sSuffixColor.get(),
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW,
S32_MAX, S32_MAX, &right_x);
}
diff --git a/indra/llui/lliconctrl.h b/indra/llui/lliconctrl.h
index aae1d1d572..29d3f0c3d4 100644
--- a/indra/llui/lliconctrl.h
+++ b/indra/llui/lliconctrl.h
@@ -79,7 +79,7 @@ public:
std::string getImageName() const;
- void setColor(const LLColor4& color) { mColor = color; }
+ void setColor(const LLUIColor& color) { mColor = color; }
void setImage(LLPointer<LLUIImage> image) { mImagep = image; }
const LLPointer<LLUIImage> getImage() { return mImagep; }
diff --git a/indra/llui/llkeywords.cpp b/indra/llui/llkeywords.cpp
index cc567adb75..7bf43c22c1 100644
--- a/indra/llui/llkeywords.cpp
+++ b/indra/llui/llkeywords.cpp
@@ -85,7 +85,7 @@ LLKeywords::~LLKeywords()
// Add the token as described
void LLKeywords::addToken(LLKeywordToken::ETokenType type,
const std::string& key_in,
- const LLColor4& color,
+ const LLUIColor& color,
const std::string& tool_tip_in,
const std::string& delimiter_in)
{
@@ -170,7 +170,7 @@ std::string LLKeywords::getAttribute(std::string_view key)
return (it != mAttributes.end()) ? it->second : "";
}
-LLColor4 LLKeywords::getColorGroup(std::string_view key_in)
+LLUIColor LLKeywords::getColorGroup(std::string_view key_in)
{
std::string color_group = "ScriptText";
if (key_in == "functions")
@@ -263,10 +263,10 @@ void LLKeywords::processTokens()
void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
{
- LLColor4 color;
- LLColor4 color_group;
- LLColor4 color_deprecated = getColorGroup("deprecated");
- LLColor4 color_god_mode = getColorGroup("god-mode");
+ LLUIColor color;
+ LLUIColor color_group;
+ LLUIColor color_deprecated = getColorGroup("deprecated");
+ LLUIColor color_god_mode = getColorGroup("god-mode");
LLKeywordToken::ETokenType token_type = LLKeywordToken::TT_UNKNOWN;
// If a new token type is added here, it must also be added to the 'addToken' method
@@ -296,7 +296,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
}
color_group = getColorGroup(group);
- LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group << "'" << LL_ENDL;
+ LL_DEBUGS("SyntaxLSL") << "Group: '" << group << "', using color: '" << color_group.get() << "'" << LL_ENDL;
if (tokens.isMap())
{
@@ -378,7 +378,7 @@ void LLKeywords::processTokensGroup(const LLSD& tokens, std::string_view group)
}
else if (tokens.isArray()) // Currently nothing should need this, but it's here for completeness
{
- LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color << LL_ENDL;
+ LL_INFOS("SyntaxLSL") << "Curious, shouldn't be an array here; adding all using color " << color.get() << LL_ENDL;
for (S32 count = 0; count < tokens.size(); ++count)
{
addToken(token_type, tokens[count], color, "");
@@ -725,7 +725,7 @@ void LLKeywords::insertSegments(const LLWString& wtext, std::vector<LLTextSegmen
insertSegment( seg_list, text_segment, text_len, style, editor);
}
-void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLColor4 &defaultColor, LLTextEditor& editor )
+void LLKeywords::insertSegment(std::vector<LLTextSegmentPtr>& seg_list, LLTextSegmentPtr new_segment, S32 text_len, const LLUIColor& defaultColor, LLTextEditor& editor )
{
LLTextSegmentPtr last = seg_list.back();
S32 new_seg_end = new_segment->getEnd();
diff --git a/indra/llui/llkeywords.h b/indra/llui/llkeywords.h
index 6df2da7cd3..328561c92a 100644
--- a/indra/llui/llkeywords.h
+++ b/indra/llui/llkeywords.h
@@ -72,7 +72,7 @@ public:
TT_TYPE // WORD
} ETokenType;
- LLKeywordToken( ETokenType type, const LLColor4& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
+ LLKeywordToken( ETokenType type, const LLUIColor& color, const LLWString& token, const LLWString& tool_tip, const LLWString& delimiter )
:
mType( type ),
mToken( token ),
@@ -87,7 +87,7 @@ public:
bool isHead(const llwchar* s) const;
bool isTail(const llwchar* s) const;
const LLWString& getToken() const { return mToken; }
- const LLColor4& getColor() const { return mColor; }
+ const LLUIColor& getColor() const { return mColor; }
ETokenType getType() const { return mType; }
const LLWString& getToolTip() const { return mToolTip; }
const LLWString& getDelimiter() const { return mDelimiter; }
@@ -99,7 +99,7 @@ public:
private:
ETokenType mType;
LLWString mToken;
- LLColor4 mColor;
+ LLUIColor mColor;
LLWString mToolTip;
LLWString mDelimiter;
};
@@ -111,7 +111,7 @@ public:
~LLKeywords();
void clearLoaded() { mLoaded = false; }
- LLColor4 getColorGroup(std::string_view key_in);
+ LLUIColor getColorGroup(std::string_view key_in);
bool isLoaded() const { return mLoaded; }
void findSegments(std::vector<LLTextSegmentPtr> *seg_list,
@@ -124,7 +124,7 @@ public:
// Add the token as described
void addToken(LLKeywordToken::ETokenType type,
const std::string& key,
- const LLColor4& color,
+ const LLUIColor& color,
const std::string& tool_tip = LLStringUtil::null,
const std::string& delimiter = LLStringUtil::null);
@@ -153,7 +153,7 @@ public:
bool mOwner;
- LLColor4 mColor;
+ LLUIColor mColor;
};
typedef std::map<WStringMapIndex, LLKeywordToken*> word_token_map_t;
@@ -161,7 +161,7 @@ public:
keyword_iterator_t begin() const { return mWordTokenMap.begin(); }
keyword_iterator_t end() const { return mWordTokenMap.end(); }
- typedef std::map<WStringMapIndex, LLColor4> group_color_map_t;
+ typedef std::map<WStringMapIndex, LLUIColor> group_color_map_t;
typedef group_color_map_t::const_iterator color_iterator_t;
group_color_map_t mColorGroupMap;
@@ -174,7 +174,7 @@ protected:
void insertSegment(std::vector<LLTextSegmentPtr>& seg_list,
LLTextSegmentPtr new_segment,
S32 text_len,
- const LLColor4 &defaultColor,
+ const LLUIColor &defaultColor,
class LLTextEditor& editor);
void insertSegments(const LLWString& wtext,
std::vector<LLTextSegmentPtr>& seg_list,
diff --git a/indra/llui/lllineeditor.h b/indra/llui/lllineeditor.h
index 1cb7cac854..cdd22413e7 100644
--- a/indra/llui/lllineeditor.h
+++ b/indra/llui/lllineeditor.h
@@ -204,7 +204,7 @@ public:
void setText(const LLStringExplicit &new_text);
const std::string& getText() const override { return mText.getString(); }
- LLWString getWText() const { return mText.getWString(); }
+ const LLWString& getWText() const { return mText.getWString(); }
LLWString getConvertedText() const; // trimmed text with paragraphs converted to newlines
S32 getLength() const { return mText.length(); }
@@ -224,12 +224,12 @@ public:
void setRevertOnEsc( bool b ) { mRevertOnEsc = b; }
void setKeystrokeOnEsc(bool b) { mKeystrokeOnEsc = b; }
- void setCursorColor(const LLColor4& c) { mCursorColor = c; }
+ void setCursorColor(const LLUIColor& c) { mCursorColor = c; }
const LLColor4& getCursorColor() const { return mCursorColor.get(); }
- void setFgColor( const LLColor4& c ) { mFgColor = c; }
- void setReadOnlyFgColor( const LLColor4& c ) { mReadOnlyFgColor = c; }
- void setTentativeFgColor(const LLColor4& c) { mTentativeFgColor = c; }
+ void setFgColor( const LLUIColor& c ) { mFgColor = c; }
+ void setReadOnlyFgColor( const LLUIColor& c ) { mReadOnlyFgColor = c; }
+ void setTentativeFgColor(const LLUIColor& c) { mTentativeFgColor = c; }
const LLColor4& getFgColor() const { return mFgColor.get(); }
const LLColor4& getReadOnlyFgColor() const { return mReadOnlyFgColor.get(); }
diff --git a/indra/llui/llmultisliderctrl.cpp b/indra/llui/llmultisliderctrl.cpp
index 6b9a1b1c13..3235110662 100644
--- a/indra/llui/llmultisliderctrl.cpp
+++ b/indra/llui/llmultisliderctrl.cpp
@@ -440,7 +440,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
if( mLabelBox )
{
- mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
}
mMultiSlider->setEnabled( b );
@@ -452,7 +452,7 @@ void LLMultiSliderCtrl::setEnabled(bool b)
if( mTextBox )
{
- mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
}
}
diff --git a/indra/llui/llmultisliderctrl.h b/indra/llui/llmultisliderctrl.h
index fee05c92fd..dec6cb48b9 100644
--- a/indra/llui/llmultisliderctrl.h
+++ b/indra/llui/llmultisliderctrl.h
@@ -130,8 +130,8 @@ public:
bool canAddSliders() { return mMultiSlider->canAddSliders(); }
void setLabel(const std::string& label) { if (mLabelBox) mLabelBox->setText(label); }
- void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
- void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
+ void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; }
+ void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; }
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
diff --git a/indra/llui/llpanel.cpp b/indra/llui/llpanel.cpp
index ab3433af98..8e96bdde80 100644
--- a/indra/llui/llpanel.cpp
+++ b/indra/llui/llpanel.cpp
@@ -490,8 +490,8 @@ void LLPanel::initFromParams(const LLPanel::Params& p)
setBackgroundVisible(p.background_visible);
setBackgroundOpaque(p.background_opaque);
- setBackgroundColor(p.bg_opaque_color().get());
- setTransparentColor(p.bg_alpha_color().get());
+ setBackgroundColor(p.bg_opaque_color);
+ setTransparentColor(p.bg_alpha_color);
mBgOpaqueImage = p.bg_opaque_image();
mBgAlphaImage = p.bg_alpha_image();
mBgOpaqueImageOverlay = p.bg_opaque_image_overlay;
@@ -693,7 +693,7 @@ void LLPanel::childSetCommitCallback(std::string_view id, boost::function<void (
}
}
-void LLPanel::childSetColor(std::string_view id, const LLColor4& color)
+void LLPanel::childSetColor(std::string_view id, const LLUIColor& color)
{
LLUICtrl* child = findChild<LLUICtrl>(id);
if (child)
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index f6aa91fb30..f085c123c1 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -134,16 +134,16 @@ public:
bool hasBorder() const { return mBorder != NULL; }
void setBorderVisible( bool b );
- void setBackgroundColor( const LLColor4& color ) { mBgOpaqueColor = color; }
+ void setBackgroundColor( const LLUIColor& color ) { mBgOpaqueColor = color; }
const LLColor4& getBackgroundColor() const { return mBgOpaqueColor; }
- void setTransparentColor(const LLColor4& color) { mBgAlphaColor = color; }
+ void setTransparentColor(const LLUIColor& color) { mBgAlphaColor = color; }
const LLColor4& getTransparentColor() const { return mBgAlphaColor; }
void setBackgroundImage(LLUIImage* image) { mBgOpaqueImage = image; }
void setTransparentImage(LLUIImage* image) { mBgAlphaImage = image; }
LLPointer<LLUIImage> getBackgroundImage() const { return mBgOpaqueImage; }
LLPointer<LLUIImage> getTransparentImage() const { return mBgAlphaImage; }
- LLColor4 getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
- LLColor4 getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
+ const LLColor4& getBackgroundImageOverlay() { return mBgOpaqueImageOverlay; }
+ const LLColor4& getTransparentImageOverlay() { return mBgAlphaImageOverlay; }
void setBackgroundVisible( bool b ) { mBgVisible = b; }
bool isBackgroundVisible() const { return mBgVisible; }
void setBackgroundOpaque(bool b) { mBgOpaque = b; }
@@ -192,7 +192,7 @@ public:
// which takes a generic slot. Or use mCommitCallbackRegistrar.add() with
// a named callback and reference it in XML.
void childSetCommitCallback(std::string_view id, boost::function<void (LLUICtrl*,void*)> cb, void* data);
- void childSetColor(std::string_view id, const LLColor4& color);
+ void childSetColor(std::string_view id, const LLUIColor& color);
LLCtrlSelectionInterface* childGetSelectionInterface(std::string_view id) const;
LLCtrlListInterface* childGetListInterface(std::string_view id) const;
diff --git a/indra/llui/llscrolllistcell.cpp b/indra/llui/llscrolllistcell.cpp
index 88ef4eb0c1..7ef2e54429 100644
--- a/indra/llui/llscrolllistcell.cpp
+++ b/indra/llui/llscrolllistcell.cpp
@@ -465,7 +465,7 @@ LLScrollListCheck::LLScrollListCheck(const LLScrollListCell::Params& p)
setWidth(rect.getWidth()); //check_box->getWidth();
}
- mCheckBox->setColor(p.color);
+ mCheckBox->setColor(p.color());
}
diff --git a/indra/llui/llsearchablecontrol.h b/indra/llui/llsearchablecontrol.h
index bccb4858e1..119852b763 100644
--- a/indra/llui/llsearchablecontrol.h
+++ b/indra/llui/llsearchablecontrol.h
@@ -43,7 +43,7 @@ namespace ll
virtual ~SearchableControl()
{ }
- LLColor4 getHighlightColor( ) const
+ const LLColor4& getHighlightColor( ) const
{
static LLUIColor highlight_color = LLUIColorTable::instance().getColor("SearchableControlHighlightColor", LLColor4::red);
return highlight_color.get();
diff --git a/indra/llui/llsliderctrl.cpp b/indra/llui/llsliderctrl.cpp
index 0c3ab6bda0..66e97f093f 100644
--- a/indra/llui/llsliderctrl.cpp
+++ b/indra/llui/llsliderctrl.cpp
@@ -393,7 +393,7 @@ void LLSliderCtrl::setEnabled(bool b)
if( mLabelBox )
{
- mLabelBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mLabelBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
}
mSlider->setEnabled( b );
@@ -405,7 +405,7 @@ void LLSliderCtrl::setEnabled(bool b)
if( mTextBox )
{
- mTextBox->setColor( b ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mTextBox->setColor( b ? mTextEnabledColor : mTextDisabledColor );
}
}
diff --git a/indra/llui/llsliderctrl.h b/indra/llui/llsliderctrl.h
index a55e3bf6e9..311377a61f 100644
--- a/indra/llui/llsliderctrl.h
+++ b/indra/llui/llsliderctrl.h
@@ -107,8 +107,8 @@ public:
F32 getMaxValue() const { return mSlider->getMaxValue(); }
void setLabel(const LLStringExplicit& label) { if (mLabelBox) mLabelBox->setText(label); }
- void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; }
- void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; }
+ void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; }
+ void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; }
boost::signals2::connection setSliderMouseDownCallback( const commit_signal_t::slot_type& cb );
boost::signals2::connection setSliderMouseUpCallback( const commit_signal_t::slot_type& cb );
diff --git a/indra/llui/llspellcheck.cpp b/indra/llui/llspellcheck.cpp
index 9d8eadfd3f..16ffd352cf 100644
--- a/indra/llui/llspellcheck.cpp
+++ b/indra/llui/llspellcheck.cpp
@@ -30,12 +30,7 @@
#include "llsdserialize.h"
#include "llspellcheck.h"
-#if LL_WINDOWS
- #include <hunspell/hunspelldll.h>
- #pragma comment(lib, "libhunspell.lib")
-#else
- #include <hunspell/hunspell.hxx>
-#endif
+#include <hunspell/hunspell.hxx>
static const std::string DICT_DIR = "dictionaries";
static const std::string DICT_FILE_CUSTOM = "user_custom.dic";
@@ -64,11 +59,11 @@ void LLSpellChecker::initSingleton()
bool LLSpellChecker::checkSpelling(const std::string& word) const
{
- if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word.c_str())) )
+ if ( (!mHunspell) || (word.length() < 3) || (0 != mHunspell->spell(word)) )
{
return true;
}
- if (mIgnoreList.size() > 0)
+ if (!mIgnoreList.empty())
{
std::string word_lower(word);
LLStringUtil::toLower(word_lower);
@@ -85,15 +80,8 @@ S32 LLSpellChecker::getSuggestions(const std::string& word, std::vector<std::str
return 0;
}
- char** suggestion_list; int suggestion_cnt = 0;
- if ( (suggestion_cnt = mHunspell->suggest(&suggestion_list, word.c_str())) != 0 )
- {
- for (int suggestion_index = 0; suggestion_index < suggestion_cnt; suggestion_index++)
- {
- suggestions.push_back(suggestion_list[suggestion_index]);
- }
- mHunspell->free_list(&suggestion_list, suggestion_cnt);
- }
+ suggestions = mHunspell->suggest(word);
+
return static_cast<S32>(suggestions.size());
}
@@ -194,7 +182,7 @@ void LLSpellChecker::addToCustomDictionary(const std::string& word)
{
if (mHunspell)
{
- mHunspell->add(word.c_str());
+ mHunspell->add(word);
}
addToDictFile(getDictionaryUserPath() + DICT_FILE_CUSTOM, word);
sSettingsChangeSignal();
@@ -422,7 +410,7 @@ bool LLSpellChecker::canRemoveDictionary(const std::string& dict_language)
const LLSD dict_info = getDictionaryData(dict_language);
return
(dict_info["user_installed"].asBoolean()) &&
- ( (!getUseSpellCheck()) || (!LLSpellChecker::instance().isActiveDictionary(dict_language)) );
+ ( (!getUseSpellCheck()) || (!isActiveDictionary(dict_language)) );
}
void LLSpellChecker::removeDictionary(const std::string& dict_language)
diff --git a/indra/llui/llspinctrl.cpp b/indra/llui/llspinctrl.cpp
index 7d41d80334..8cd3e6419a 100644
--- a/indra/llui/llspinctrl.cpp
+++ b/indra/llui/llspinctrl.cpp
@@ -310,7 +310,7 @@ void LLSpinCtrl::updateLabelColor()
{
if( mLabelBox )
{
- mLabelBox->setColor( getEnabled() ? mTextEnabledColor.get() : mTextDisabledColor.get() );
+ mLabelBox->setColor( getEnabled() ? mTextEnabledColor : mTextDisabledColor );
}
}
diff --git a/indra/llui/llspinctrl.h b/indra/llui/llspinctrl.h
index 75f1830d80..58b38dc630 100644
--- a/indra/llui/llspinctrl.h
+++ b/indra/llui/llspinctrl.h
@@ -77,8 +77,8 @@ public:
virtual void setPrecision(S32 precision);
void setLabel(const LLStringExplicit& label);
- void setLabelColor(const LLColor4& c) { mTextEnabledColor = c; updateLabelColor(); }
- void setDisabledLabelColor(const LLColor4& c) { mTextDisabledColor = c; updateLabelColor();}
+ void setLabelColor(const LLUIColor& c) { mTextEnabledColor = c; updateLabelColor(); }
+ void setDisabledLabelColor(const LLUIColor& c) { mTextDisabledColor = c; updateLabelColor();}
void setAllowEdit(bool allow_edit);
virtual void onTabInto();
diff --git a/indra/llui/llstatgraph.cpp b/indra/llui/llstatgraph.cpp
index 28b4d387f1..d97051247e 100644
--- a/indra/llui/llstatgraph.cpp
+++ b/indra/llui/llstatgraph.cpp
@@ -100,8 +100,8 @@ void LLStatGraph::draw()
it--;
}
- static LLColor4 default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
- gGL.color4fv(default_color.mV);
+ static LLUIColor default_color = LLUIColorTable::instance().getColor( "MenuDefaultBgColor" );
+ gGL.color4fv(default_color.get().mV);
gl_rect_2d(0, getRect().getHeight(), getRect().getWidth(), 0, true);
gGL.color4fv(LLColor4::black.mV);
diff --git a/indra/llui/llstyle.cpp b/indra/llui/llstyle.cpp
index abf6e1284b..df4b0ef6a0 100644
--- a/indra/llui/llstyle.cpp
+++ b/indra/llui/llstyle.cpp
@@ -33,11 +33,12 @@
#include "llui.h"
LLStyle::Params::Params()
-: visible("visible", true),
+ : visible("visible", true),
drop_shadow("drop_shadow", LLFontGL::NO_SHADOW),
color("color", LLColor4::black),
readonly_color("readonly_color", LLColor4::black),
selected_color("selected_color", LLColor4::black),
+ alpha("alpha", 1.f),
font("font", LLFontGL::getFontMonospace()),
image("image"),
link_href("href"),
@@ -54,7 +55,8 @@ LLStyle::LLStyle(const LLStyle::Params& p)
mLink(p.link_href),
mIsLink(p.is_link.isProvided() ? p.is_link : !p.link_href().empty()),
mDropShadow(p.drop_shadow),
- mImagep(p.image())
+ mImagep(p.image()),
+ mAlpha(p.alpha)
{}
void LLStyle::setFont(const LLFontGL* font)
diff --git a/indra/llui/llstyle.h b/indra/llui/llstyle.h
index 7dbccfff87..e506895de5 100644
--- a/indra/llui/llstyle.h
+++ b/indra/llui/llstyle.h
@@ -44,6 +44,7 @@ public:
Optional<LLUIColor> color,
readonly_color,
selected_color;
+ Optional<F32> alpha;
Optional<const LLFontGL*> font;
Optional<LLUIImage*> image;
Optional<std::string> link_href;
@@ -61,6 +62,9 @@ public:
const LLUIColor& getSelectedColor() const { return mSelectedColor; }
void setSelectedColor(const LLUIColor& color) { mSelectedColor = color; }
+ F32 getAlpha() const { return mAlpha; }
+ void setAlpha(F32 alpha) { mAlpha = alpha; }
+
bool isVisible() const;
void setVisible(bool is_visible);
@@ -89,7 +93,8 @@ public:
&& mFont == rhs.mFont
&& mLink == rhs.mLink
&& mImagep == rhs.mImagep
- && mDropShadow == rhs.mDropShadow;
+ && mDropShadow == rhs.mDropShadow
+ && mAlpha == rhs.mAlpha;
}
bool operator!=(const LLStyle& rhs) const { return !(*this == rhs); }
@@ -98,18 +103,19 @@ public:
LLFontGL::ShadowType mDropShadow;
protected:
- ~LLStyle() { }
+ ~LLStyle() = default;
private:
- bool mVisible;
+ std::string mFontName;
+ std::string mLink;
LLUIColor mColor;
LLUIColor mReadOnlyColor;
LLUIColor mSelectedColor;
- std::string mFontName;
const LLFontGL* mFont;
- std::string mLink;
- bool mIsLink;
LLPointer<LLUIImage> mImagep;
+ F32 mAlpha;
+ bool mVisible;
+ bool mIsLink;
};
typedef LLPointer<LLStyle> LLStyleSP;
diff --git a/indra/llui/lltextbase.cpp b/indra/llui/lltextbase.cpp
index 8c3b317838..0aebf7543c 100644
--- a/indra/llui/lltextbase.cpp
+++ b/indra/llui/lltextbase.cpp
@@ -584,9 +584,8 @@ void LLTextBase::drawCursor()
if (LL_KIM_OVERWRITE == gKeyboard->getInsertMode() && !hasSelection() && text[mCursorPos] != '\n')
{
- LLColor4 text_color;
const LLFontGL* fontp;
- text_color = segmentp->getColor();
+ const LLColor4& text_color = segmentp->getColor();
fontp = segmentp->getStyle()->getFont();
fontp->render(text, mCursorPos, cursor_rect,
LLColor4(1.f - text_color.mV[VRED], 1.f - text_color.mV[VGREEN], 1.f - text_color.mV[VBLUE], alpha),
@@ -1368,7 +1367,7 @@ void LLTextBase::draw()
{
bg_rect.intersectWith(text_rect);
}
- LLColor4 bg_color = mReadOnly
+ const LLColor4& bg_color = mReadOnly
? mReadOnlyBgColor.get()
: hasFocus()
? mFocusBgColor.get()
@@ -1379,7 +1378,7 @@ void LLTextBase::draw()
// Draw highlighted if needed
if( ll::ui::SearchableControl::getHighlighted() )
{
- LLColor4 bg_color = ll::ui::SearchableControl::getHighlightColor();
+ const LLColor4& bg_color = ll::ui::SearchableControl::getHighlightColor();
LLRect bg_rect = mVisibleTextRect;
if( mScroller )
bg_rect.intersectWith( text_rect );
@@ -1412,14 +1411,14 @@ void LLTextBase::draw()
//virtual
-void LLTextBase::setColor( const LLColor4& c )
+void LLTextBase::setColor( const LLUIColor& c )
{
mFgColor = c;
mStyleDirty = true;
}
//virtual
-void LLTextBase::setReadOnlyColor(const LLColor4 &c)
+void LLTextBase::setReadOnlyColor(const LLUIColor &c)
{
mReadOnlyFgColor = c;
mStyleDirty = true;
@@ -2203,8 +2202,8 @@ static LLUIImagePtr image_from_icon_name(const std::string& icon_name)
void LLTextBase::appendTextImpl(const std::string &new_text, const LLStyle::Params& input_params)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_UI;
- LLStyle::Params style_params(input_params);
- style_params.fillFrom(getStyleParams());
+ LLStyle::Params style_params(getStyleParams());
+ style_params.overwriteFrom(input_params);
S32 part = (S32)LLTextParser::WHOLE;
if (mParseHTML && !style_params.is_link) // Don't search for URLs inside a link segment (STORM-358).
@@ -2418,16 +2417,14 @@ void LLTextBase::appendAndHighlightTextImpl(const std::string &new_text, S32 hig
{
LLStyle::Params highlight_params(style_params);
- LLSD pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color(), (LLTextParser::EHighlightPosition)highlight_part);
+ auto pieces = LLTextParser::instance().parsePartialLineHighlights(new_text, highlight_params.color, (LLTextParser::EHighlightPosition)highlight_part);
for (S32 i = 0; i < pieces.size(); i++)
{
- LLSD color_llsd = pieces[i]["color"];
- LLColor4 lcolor;
- lcolor.setValue(color_llsd);
- highlight_params.color = lcolor;
+ const auto& piece_pair = pieces[i];
+ highlight_params.color = piece_pair.second;
LLWString wide_text;
- wide_text = utf8str_to_wstring(pieces[i]["text"].asString());
+ wide_text = utf8str_to_wstring(piece_pair.first);
S32 cur_length = getLength();
LLStyleConstSP sp(new LLStyle(highlight_params));
@@ -3247,8 +3244,8 @@ F32 LLTextSegment::draw(S32 start, S32 end, S32 selection_start, S32 selection_e
bool LLTextSegment::canEdit() const { return false; }
void LLTextSegment::unlinkFromDocument(LLTextBase*) {}
void LLTextSegment::linkToDocument(LLTextBase*) {}
-const LLColor4& LLTextSegment::getColor() const { return LLColor4::white; }
-//void LLTextSegment::setColor(const LLColor4 &color) {}
+const LLUIColor& LLTextSegment::getColor() const { static const LLUIColor white = LLUIColorTable::instance().getColor("White", LLColor4::white); return white; }
+//void LLTextSegment::setColor(const LLUIColor &color) {}
LLStyleConstSP LLTextSegment::getStyle() const {static LLStyleConstSP sp(new LLStyle()); return sp; }
void LLTextSegment::setStyle(LLStyleConstSP style) {}
void LLTextSegment::setToken( LLKeywordToken* token ) {}
@@ -3294,7 +3291,7 @@ LLNormalTextSegment::LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 e
}
}
-LLNormalTextSegment::LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLNormalTextSegment::LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
: LLTextSegment(start, end),
mToken(NULL),
mEditor(editor)
@@ -3334,7 +3331,7 @@ F32 LLNormalTextSegment::drawClippedSegment(S32 seg_start, S32 seg_end, S32 sele
const LLFontGL* font = mStyle->getFont();
- LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % alpha;
+ LLColor4 color = (mEditor.getReadOnly() ? mStyle->getReadOnlyColor() : mStyle->getColor()) % (alpha * mStyle->getAlpha());
if( selection_start > seg_start )
{
@@ -3604,7 +3601,7 @@ LLLabelTextSegment::LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end
{
}
-LLLabelTextSegment::LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLLabelTextSegment::LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
: LLNormalTextSegment(color, start, end, editor, is_visible)
{
}
@@ -3628,7 +3625,7 @@ LLEmojiTextSegment::LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end,
{
}
-LLEmojiTextSegment::LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
+LLEmojiTextSegment::LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible)
: LLNormalTextSegment(color, start, end, editor, is_visible)
{
}
diff --git a/indra/llui/lltextbase.h b/indra/llui/lltextbase.h
index 4120d9ea32..00cf66b134 100644
--- a/indra/llui/lltextbase.h
+++ b/indra/llui/lltextbase.h
@@ -84,8 +84,8 @@ public:
virtual void unlinkFromDocument(class LLTextBase* editor);
virtual void linkToDocument(class LLTextBase* editor);
- virtual const LLColor4& getColor() const;
- //virtual void setColor(const LLColor4 &color);
+ virtual const LLUIColor& getColor() const;
+ //virtual void setColor(const LLUIColor &color);
virtual LLStyleConstSP getStyle() const;
virtual void setStyle(LLStyleConstSP style);
virtual void setToken( LLKeywordToken* token );
@@ -125,7 +125,7 @@ class LLNormalTextSegment : public LLTextSegment
{
public:
LLNormalTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
- LLNormalTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+ LLNormalTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
virtual ~LLNormalTextSegment();
/*virtual*/ bool getDimensionsF32(S32 first_char, S32 num_chars, F32& width, S32& height) const;
@@ -133,7 +133,7 @@ public:
/*virtual*/ S32 getNumChars(S32 num_pixels, S32 segment_offset, S32 line_offset, S32 max_chars, S32 line_ind) const;
/*virtual*/ F32 draw(S32 start, S32 end, S32 selection_start, S32 selection_end, const LLRectf& draw_rect);
/*virtual*/ bool canEdit() const { return true; }
- /*virtual*/ const LLColor4& getColor() const { return mStyle->getColor(); }
+ /*virtual*/ const LLUIColor& getColor() const { return mStyle->getColor(); }
/*virtual*/ LLStyleConstSP getStyle() const { return mStyle; }
/*virtual*/ void setStyle(LLStyleConstSP style) { mStyle = style; }
/*virtual*/ void setToken( LLKeywordToken* token ) { mToken = token; }
@@ -170,7 +170,7 @@ class LLLabelTextSegment : public LLNormalTextSegment
{
public:
LLLabelTextSegment( LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor );
- LLLabelTextSegment( const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+ LLLabelTextSegment( const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
protected:
@@ -184,7 +184,7 @@ class LLEmojiTextSegment : public LLNormalTextSegment
{
public:
LLEmojiTextSegment(LLStyleConstSP style, S32 start, S32 end, LLTextBase& editor);
- LLEmojiTextSegment(const LLColor4& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
+ LLEmojiTextSegment(const LLUIColor& color, S32 start, S32 end, LLTextBase& editor, bool is_visible = true);
bool canEdit() const override { return false; }
bool handleToolTip(S32 x, S32 y, MASK mask) override;
@@ -372,8 +372,8 @@ public:
// LLUICtrl interface
/*virtual*/ bool acceptsTextInput() const override { return !mReadOnly; }
- /*virtual*/ void setColor(const LLColor4& c) override;
- virtual void setReadOnlyColor(const LLColor4 &c);
+ /*virtual*/ void setColor(const LLUIColor& c) override;
+ virtual void setReadOnlyColor(const LLUIColor& c);
/*virtual*/ void onVisibilityChange(bool new_visibility) override;
/*virtual*/ void setValue(const LLSD& value) override;
diff --git a/indra/llui/lltextparser.cpp b/indra/llui/lltextparser.cpp
index 097b168106..d4ef77664e 100644
--- a/indra/llui/lltextparser.cpp
+++ b/indra/llui/lltextparser.cpp
@@ -36,6 +36,7 @@
#include "llmath.h"
#include "v4color.h"
#include "lldir.h"
+#include "lluicolor.h"
//
// Member Functions
@@ -80,14 +81,14 @@ S32 LLTextParser::findPattern(const std::string &text, LLSD highlight)
return static_cast<S32>(found);
}
-LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLColor4 &color, EHighlightPosition part, S32 index)
+LLTextParser::parser_out_vec_t LLTextParser::parsePartialLineHighlights(const std::string &text, const LLUIColor& color, EHighlightPosition part, S32 index)
{
loadKeywords();
//evil recursive string atomizer.
- LLSD ret_llsd, start_llsd, middle_llsd, end_llsd;
+ parser_out_vec_t ret_vec, start_vec, middle_vec, end_vec;
- for (S32 i=index;i<mHighlights.size();i++)
+ for (S32 i=index, size = (S32)mHighlights.size();i< size;i++)
{
S32 condition = mHighlights[i]["condition"];
if ((S32)mHighlights[i]["highlight"]==PART && condition!=MATCHES)
@@ -104,72 +105,69 @@ LLSD LLTextParser::parsePartialLineHighlights(const std::string &text, const LLC
EHighlightPosition newpart;
if (start==0)
{
- start_llsd[0]["text"] =text.substr(0,end);
- start_llsd[0]["color"]=mHighlights[i]["color"];
+ if (start_vec.empty())
+ {
+ start_vec.push_back(std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"])));
+ }
+ else
+ {
+ start_vec[0] = std::make_pair(text.substr(0, end), LLColor4(mHighlights[i]["color"]));
+ }
if (end < len)
{
if (part==END || part==WHOLE) newpart=END; else newpart=MIDDLE;
- end_llsd=parsePartialLineHighlights(text.substr( end ),color,newpart,i);
+ end_vec = parsePartialLineHighlights(text.substr( end ),color,newpart,i);
}
}
else
{
if (part==START || part==WHOLE) newpart=START; else newpart=MIDDLE;
- start_llsd=parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
+ start_vec = parsePartialLineHighlights(text.substr(0,start),color,newpart,i+1);
if (end < len)
{
- middle_llsd[0]["text"] =text.substr(start,end);
- middle_llsd[0]["color"]=mHighlights[i]["color"];
+ if (middle_vec.empty())
+ {
+ middle_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
+ }
+ else
+ {
+ middle_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
+ }
if (part==END || part==WHOLE) newpart=END; else newpart=MIDDLE;
- end_llsd=parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
+ end_vec = parsePartialLineHighlights(text.substr( (start+end) ),color,newpart,i);
}
else
{
- end_llsd[0]["text"] =text.substr(start,end);
- end_llsd[0]["color"]=mHighlights[i]["color"];
+ if (end_vec.empty())
+ {
+ end_vec.push_back(std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"])));
+ }
+ else
+ {
+ end_vec[0] = std::make_pair(text.substr(start, end), LLColor4(mHighlights[i]["color"]));
+ }
}
}
- S32 retcount=0;
-
- //FIXME These loops should be wrapped into a subroutine.
- for (LLSD::array_iterator iter = start_llsd.beginArray();
- iter != start_llsd.endArray();++iter)
- {
- LLSD highlight = *iter;
- ret_llsd[retcount++]=highlight;
- }
-
- for (LLSD::array_iterator iter = middle_llsd.beginArray();
- iter != middle_llsd.endArray();++iter)
- {
- LLSD highlight = *iter;
- ret_llsd[retcount++]=highlight;
- }
-
- for (LLSD::array_iterator iter = end_llsd.beginArray();
- iter != end_llsd.endArray();++iter)
- {
- LLSD highlight = *iter;
- ret_llsd[retcount++]=highlight;
- }
+ ret_vec.reserve(start_vec.size() + middle_vec.size() + end_vec.size());
+ ret_vec.insert(ret_vec.end(), start_vec.begin(), start_vec.end());
+ ret_vec.insert(ret_vec.end(), middle_vec.begin(), middle_vec.end());
+ ret_vec.insert(ret_vec.end(), end_vec.begin(), end_vec.end());
- return ret_llsd;
+ return ret_vec;
}
}
}
}
//No patterns found. Just send back what was passed in.
- ret_llsd[0]["text"] =text;
- LLSD color_sd = color.getValue();
- ret_llsd[0]["color"]=color_sd;
- return ret_llsd;
+ ret_vec.push_back(std::make_pair(text, color));
+ return ret_vec;
}
bool LLTextParser::parseFullLineHighlights(const std::string &text, LLColor4 *color)
diff --git a/indra/llui/lltextparser.h b/indra/llui/lltextparser.h
index 20fcc07e4c..c5756f9b4c 100644
--- a/indra/llui/lltextparser.h
+++ b/indra/llui/lltextparser.h
@@ -30,6 +30,7 @@
#include "llsd.h"
#include "llsingleton.h"
+#include "lluicolor.h"
class LLUUID;
class LLVector3d;
@@ -45,7 +46,9 @@ public:
typedef enum e_highlight_position { WHOLE, START, MIDDLE, END } EHighlightPosition;
typedef enum e_dialog_action { ACTION_NONE, ACTION_CLOSE, ACTION_ADD, ACTION_COPY, ACTION_UPDATE } EDialogAction;
- LLSD parsePartialLineHighlights(const std::string &text,const LLColor4 &color, EHighlightPosition part=WHOLE, S32 index=0);
+ using parser_out_vec_t = std::vector<std::pair<std::string, LLUIColor>>;
+
+ parser_out_vec_t parsePartialLineHighlights(const std::string &text,const LLUIColor &color, EHighlightPosition part=WHOLE, S32 index=0);
bool parseFullLineHighlights(const std::string &text, LLColor4 *color);
private:
diff --git a/indra/llui/lltoolbar.cpp b/indra/llui/lltoolbar.cpp
index aa48ae048f..5955a28fa3 100644
--- a/indra/llui/lltoolbar.cpp
+++ b/indra/llui/lltoolbar.cpp
@@ -1073,7 +1073,7 @@ bool LLToolBar::handleDragAndDrop(S32 x, S32 y, MASK mask, bool drop,
int orig_rank = getRankFromPosition(dragged_command);
mDragRank = getRankFromPosition(x, y);
// Don't DaD if we're dragging a command on itself
- mDragAndDropTarget = ((orig_rank != RANK_NONE) && ((mDragRank == orig_rank) || ((mDragRank - 1) == orig_rank)));
+ mDragAndDropTarget = (orig_rank == RANK_NONE) || ((mDragRank != orig_rank) && ((mDragRank - 1) != orig_rank));
//LL_INFOS() << "Merov debug : DaD, rank = " << mDragRank << ", dragged uui = " << inv_item->getUUID() << LL_ENDL;
/* Do the following if you want to animate the button itself
LLCommandId dragged_command(inv_item->getUUID());
diff --git a/indra/llui/llui.cpp b/indra/llui/llui.cpp
index e3ddd66b58..8d46422c09 100644
--- a/indra/llui/llui.cpp
+++ b/indra/llui/llui.cpp
@@ -156,7 +156,7 @@ mWindow(NULL), // set later in startup
mRootView(NULL),
mHelpImpl(NULL)
{
- LLRender2D::initParamSingleton(image_provider);
+ LLRender2D::createInstance(image_provider);
if ((get_ptr_in_map(mSettingGroups, std::string("config")) == NULL) ||
(get_ptr_in_map(mSettingGroups, std::string("floater")) == NULL) ||
@@ -196,6 +196,11 @@ mHelpImpl(NULL)
LLCommandManager::load();
}
+LLUI::~LLUI()
+{
+ LLRender2D::deleteSingleton();
+}
+
void LLUI::setPopupFuncs(const add_popup_t& add_popup, const remove_popup_t& remove_popup, const clear_popups_t& clear_popups)
{
mAddPopupFunc = add_popup;
diff --git a/indra/llui/llui.h b/indra/llui/llui.h
index f33b43f599..375cd539b7 100644
--- a/indra/llui/llui.h
+++ b/indra/llui/llui.h
@@ -112,18 +112,18 @@ class LLImageProviderInterface;
typedef void (*LLUIAudioCallback)(const LLUUID& uuid);
-class LLUI : public LLParamSingleton<LLUI>
+class LLUI : public LLSimpleton<LLUI>
{
+ LOG_CLASS(LLUI);
public:
typedef std::map<std::string, LLControlGroup*, std::less<> > settings_map_t;
-private:
- LLSINGLETON(LLUI , const settings_map_t &settings,
+ LLUI(const settings_map_t &settings,
LLImageProviderInterface* image_provider,
LLUIAudioCallback audio_callback,
LLUIAudioCallback deferred_audio_callback);
- LOG_CLASS(LLUI);
-public:
+ ~LLUI();
+
//
// Classes
//
diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp
index 3279926786..a792cb8103 100644
--- a/indra/llui/lluicolortable.cpp
+++ b/indra/llui/lluicolortable.cpp
@@ -198,7 +198,61 @@ LLUIColor LLUIColorTable::getColor(std::string_view name, const LLColor4& defaul
// update user color, loaded colors are parsed on initialization
void LLUIColorTable::setColor(std::string_view name, const LLColor4& color)
{
- setColor(name, color, mUserSetColors);
+ auto it = mUserSetColors.lower_bound(name);
+ if(it != mUserSetColors.end() && !(mUserSetColors.key_comp()(name, it->first)))
+ {
+ it->second = color;
+ }
+ else
+ {
+ string_color_map_t::iterator base_iter = mLoadedColors.find(name);
+ if (base_iter != mLoadedColors.end())
+ {
+ LLColor4 original_color = base_iter->second.get();
+ auto color_handle = mLoadedColors.extract(base_iter);
+ auto new_color_pair = mUserSetColors.insert(std::move(color_handle));
+ new_color_pair.position->second = color;
+ mLoadedColors.emplace(name, LLUIColor(original_color));
+ }
+ else
+ {
+ mUserSetColors.insert(it, std::make_pair(name, color));
+ }
+ }
+}
+
+bool LLUIColorTable::isDefault(std::string_view name) const
+{
+ string_color_map_t::const_iterator base_iter = mLoadedColors.find(name);
+ string_color_map_t::const_iterator user_iter = mUserSetColors.find(name);
+ if (base_iter != mLoadedColors.end())
+ {
+ if(user_iter != mUserSetColors.end())
+ return user_iter->second == base_iter->second;
+
+ return true;
+ }
+ else if (user_iter != mUserSetColors.end()) // user only color ???
+ {
+ return true;
+ }
+
+ return false;
+}
+
+void LLUIColorTable::resetToDefault(std::string_view name)
+{
+ string_color_map_t::iterator iter = mUserSetColors.find(name);
+
+ if (iter != mUserSetColors.end())
+ {
+ auto default_iter = mLoadedColors.find(name);
+
+ if (default_iter != mLoadedColors.end())
+ {
+ iter->second = default_iter->second.get();
+ }
+ }
}
bool LLUIColorTable::loadFromSettings()
@@ -223,18 +277,16 @@ void LLUIColorTable::saveUserSettings() const
{
Params params;
- for(string_color_map_t::const_iterator it = mUserSetColors.begin();
- it != mUserSetColors.end();
- ++it)
+ for (const auto& color_pair : mUserSetColors)
{
// Compare user color value with the default value, skip if equal
- string_color_map_t::const_iterator itd = mLoadedColors.find(it->first);
- if(itd != mLoadedColors.end() && itd->second == it->second)
+ string_color_map_t::const_iterator itd = mLoadedColors.find(color_pair.first);
+ if(itd != mLoadedColors.end() && itd->second == color_pair.second)
continue;
ColorEntryParams color_entry;
- color_entry.name = it->first;
- color_entry.color.value = it->second;
+ color_entry.name = color_pair.first;
+ color_entry.color.value = color_pair.second;
params.color_entries.add(color_entry);
}
diff --git a/indra/llui/lluicolortable.h b/indra/llui/lluicolortable.h
index ca1ca9eaa7..0c6286e5eb 100644
--- a/indra/llui/lluicolortable.h
+++ b/indra/llui/lluicolortable.h
@@ -83,12 +83,19 @@ public:
// returns true if color_name exists in the table
bool colorExists(std::string_view color_name) const;
+ bool isDefault(std::string_view color_name) const;
+
+ void resetToDefault(std::string_view color_name);
+
// loads colors from settings files
bool loadFromSettings();
// saves colors specified by the user to the users skin directory
void saveUserSettings() const;
+ const auto& getLoadedColors() { return mLoadedColors; }
+ const auto& getUserColors() { return mUserSetColors; }
+
private:
bool loadFromFilename(const std::string& filename, string_color_map_t& table);
diff --git a/indra/llui/lluictrl.cpp b/indra/llui/lluictrl.cpp
index cb86a79407..cbabb5a933 100644
--- a/indra/llui/lluictrl.cpp
+++ b/indra/llui/lluictrl.cpp
@@ -1023,7 +1023,7 @@ bool LLUICtrl::getTentative() const
}
// virtual
-void LLUICtrl::setColor(const LLColor4& color)
+void LLUICtrl::setColor(const LLUIColor& color)
{ }
F32 LLUICtrl::getCurrentTransparency()
diff --git a/indra/llui/lluictrl.h b/indra/llui/lluictrl.h
index fb8fc0c5ea..8cd9950917 100644
--- a/indra/llui/lluictrl.h
+++ b/indra/llui/lluictrl.h
@@ -216,7 +216,7 @@ public:
// selected radio button, etc.). Defaults to no-op.
virtual void clear();
- virtual void setColor(const LLColor4& color);
+ virtual void setColor(const LLUIColor& color);
// Ansariel: Changed to virtual. We might want to change the transparency ourself!
virtual F32 getCurrentTransparency();
diff --git a/indra/llui/llviewborder.cpp b/indra/llui/llviewborder.cpp
index c1777c972c..d53fd6eb91 100644
--- a/indra/llui/llviewborder.cpp
+++ b/indra/llui/llviewborder.cpp
@@ -73,14 +73,14 @@ LLViewBorder::LLViewBorder(const LLViewBorder::Params& p)
mStyle(p.render_style)
{}
-void LLViewBorder::setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light )
+void LLViewBorder::setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light )
{
mShadowDark = shadow_dark;
mHighlightLight = highlight_light;
}
-void LLViewBorder::setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
- const LLColor4& highlight_light, const LLColor4& highlight_dark )
+void LLViewBorder::setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
+ const LLUIColor& highlight_light, const LLUIColor& highlight_dark )
{
mShadowDark = shadow_dark;
mShadowLight = shadow_light;
diff --git a/indra/llui/llviewborder.h b/indra/llui/llviewborder.h
index be499bb534..1f118a0d20 100644
--- a/indra/llui/llviewborder.h
+++ b/indra/llui/llviewborder.h
@@ -77,9 +77,9 @@ public:
S32 getBorderWidth() const { return mBorderWidth; }
void setBevel(EBevel bevel) { mBevel = bevel; }
EBevel getBevel() const { return mBevel; }
- void setColors( const LLColor4& shadow_dark, const LLColor4& highlight_light );
- void setColorsExtended( const LLColor4& shadow_light, const LLColor4& shadow_dark,
- const LLColor4& highlight_light, const LLColor4& highlight_dark );
+ void setColors( const LLUIColor& shadow_dark, const LLUIColor& highlight_light );
+ void setColorsExtended( const LLUIColor& shadow_light, const LLUIColor& shadow_dark,
+ const LLUIColor& highlight_light, const LLUIColor& highlight_dark );
void setTexture( const class LLUUID &image_id );
LLColor4 getHighlightLight() {return mHighlightLight.get();}
diff --git a/indra/llwebrtc/CMakeLists.txt b/indra/llwebrtc/CMakeLists.txt
index fd1788c5d4..30aaec1265 100644
--- a/indra/llwebrtc/CMakeLists.txt
+++ b/indra/llwebrtc/CMakeLists.txt
@@ -31,7 +31,11 @@ add_library (llwebrtc SHARED ${llwebrtc_SOURCE_FILES})
set_target_properties(llwebrtc PROPERTIES PUBLIC_HEADER llwebrtc.h)
if (WINDOWS)
- target_link_libraries(llwebrtc PRIVATE ll::webrtc
+ set_target_properties(llwebrtc
+ PROPERTIES
+ LINK_FLAGS "/debug /LARGEADDRESSAWARE"
+ )
+ target_link_libraries(llwebrtc PRIVATE ll::webrtc
secur32
winmm
dmoguids
@@ -39,8 +43,15 @@ if (WINDOWS)
msdmo
strmiids
iphlpapi)
+ if (USE_BUGSPLAT)
+ set_target_properties(llwebrtc PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}")
+ endif (USE_BUGSPLAT)
elseif (DARWIN)
target_link_libraries(llwebrtc PRIVATE ll::webrtc)
+ if (USE_BUGSPLAT)
+ set_target_properties(llwebrtc PROPERTIES XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
+ XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
+ endif (USE_BUGSPLAT)
elseif (LINUX)
target_link_libraries(llwebrtc PRIVATE ll::webrtc)
endif (WINDOWS)
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 6dc632aba4..2c890acbdb 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -154,7 +154,8 @@ void LLCustomProcessor::Process(webrtc::AudioBuffer *audio_in)
// LLWebRTCImpl implementation
//
-LLWebRTCImpl::LLWebRTCImpl() :
+LLWebRTCImpl::LLWebRTCImpl(LLWebRTCLogCallback* logCallback) :
+ mLogSink(new LLWebRTCLogSink(logCallback)),
mPeerCustomProcessor(nullptr),
mMute(true),
mTuningMode(false),
@@ -173,6 +174,7 @@ void LLWebRTCImpl::init()
// Normal logging is rather spammy, so turn it off.
rtc::LogMessage::LogToDebug(rtc::LS_NONE);
rtc::LogMessage::SetLogToStderr(true);
+ rtc::LogMessage::AddLogToStream(mLogSink, rtc::LS_VERBOSE);
mTaskQueueFactory = webrtc::CreateDefaultTaskQueueFactory();
@@ -312,6 +314,7 @@ void LLWebRTCImpl::terminate()
mPeerDeviceModule = nullptr;
mTaskQueueFactory = nullptr;
});
+ rtc::LogMessage::RemoveLogToStream(mLogSink);
}
//
@@ -1327,9 +1330,9 @@ void freePeerConnection(LLWebRTCPeerConnectionInterface* peer_connection)
}
-void init()
+void init(LLWebRTCLogCallback* logCallback)
{
- gWebRTCImpl = new LLWebRTCImpl();
+ gWebRTCImpl = new LLWebRTCImpl(logCallback);
gWebRTCImpl->init();
}
diff --git a/indra/llwebrtc/llwebrtc.h b/indra/llwebrtc/llwebrtc.h
index 62b40636d2..c6fdb909dd 100644
--- a/indra/llwebrtc/llwebrtc.h
+++ b/indra/llwebrtc/llwebrtc.h
@@ -56,6 +56,20 @@
namespace llwebrtc
{
+class LLWebRTCLogCallback
+{
+public:
+ typedef enum {
+ LOG_LEVEL_VERBOSE = 0,
+ LOG_LEVEL_INFO,
+ LOG_LEVEL_WARNING,
+ LOG_LEVEL_ERROR
+ } LogLevel;
+
+ virtual void LogMessage(LogLevel level, const std::string& message) = 0;
+};
+
+
// LLWebRTCVoiceDevice is a simple representation of the
// components of a device, used to communicate this
// information to the viewer.
@@ -230,7 +244,7 @@ class LLWebRTCSignalingObserver
// allows for management of this peer connection.
class LLWebRTCPeerConnectionInterface
{
-public:
+ public:
struct InitOptions
{
@@ -262,7 +276,7 @@ public:
// exports.
// This library must be initialized before use.
-LLSYMEXPORT void init();
+LLSYMEXPORT void init(LLWebRTCLogCallback* logSink);
// And should be terminated as part of shutdown.
LLSYMEXPORT void terminate();
diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h
index c1acd77275..9504e6573b 100644
--- a/indra/llwebrtc/llwebrtc_impl.h
+++ b/indra/llwebrtc/llwebrtc_impl.h
@@ -69,6 +69,54 @@ namespace llwebrtc
class LLWebRTCPeerConnectionImpl;
+class LLWebRTCLogSink : public rtc::LogSink {
+public:
+ LLWebRTCLogSink(LLWebRTCLogCallback* callback) :
+ mCallback(callback)
+ {
+ }
+
+ // Destructor: close the log file
+ ~LLWebRTCLogSink() override
+ {
+ }
+
+ void OnLogMessage(const std::string& msg,
+ rtc::LoggingSeverity severity) override
+ {
+ if (mCallback)
+ {
+ switch(severity)
+ {
+ case rtc::LS_VERBOSE:
+ mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg);
+ break;
+ case rtc::LS_INFO:
+ mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg);
+ break;
+ case rtc::LS_WARNING:
+ mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg);
+ break;
+ case rtc::LS_ERROR:
+ mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, msg);
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
+ void OnLogMessage(const std::string& message) override
+ {
+ if (mCallback)
+ {
+ mCallback->LogMessage(LLWebRTCLogCallback::LOG_LEVEL_VERBOSE, message);
+ }
+ }
+
+private:
+ LLWebRTCLogCallback* mCallback;
+};
// Implements a class allowing capture of audio data
// to determine audio level of the microphone.
@@ -139,8 +187,11 @@ class LLCustomProcessor : public webrtc::CustomProcessing
class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceSink
{
public:
- LLWebRTCImpl();
- ~LLWebRTCImpl() {}
+ LLWebRTCImpl(LLWebRTCLogCallback* logCallback);
+ ~LLWebRTCImpl()
+ {
+ delete mLogSink;
+ }
void init();
void terminate();
@@ -228,6 +279,8 @@ class LLWebRTCImpl : public LLWebRTCDeviceInterface, public webrtc::AudioDeviceS
void setRecording(bool recording);
protected:
+ LLWebRTCLogSink* mLogSink;
+
// The native webrtc threads
std::unique_ptr<rtc::Thread> mNetworkThread;
std::unique_ptr<rtc::Thread> mWorkerThread;
diff --git a/indra/llxml/llxmltree.cpp b/indra/llxml/llxmltree.cpp
index 0ace1baf2a..164b3156e1 100644
--- a/indra/llxml/llxmltree.cpp
+++ b/indra/llxml/llxmltree.cpp
@@ -111,11 +111,11 @@ LLXmlTreeNode::~LLXmlTreeNode()
attribute_map_t::iterator iter;
for (iter=mAttributes.begin(); iter != mAttributes.end(); iter++)
delete iter->second;
- for(LLXmlTreeNode* node : mChildren)
- {
- delete node;
- }
- mChildren.clear();
+ for(LLXmlTreeNode* node : mChildren)
+ {
+ delete node;
+ }
+ mChildren.clear();
}
void LLXmlTreeNode::dump( const std::string& prefix )
diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt
index 410778114d..0d1a833936 100644
--- a/indra/media_plugins/cef/CMakeLists.txt
+++ b/indra/media_plugins/cef/CMakeLists.txt
@@ -66,7 +66,7 @@ if (WINDOWS)
set_target_properties(
media_plugin_cef
PROPERTIES
- LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
+ LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT /IGNORE:4099"
)
endif (WINDOWS)
diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt
index 7d3e7f663b..41e2353f31 100644
--- a/indra/media_plugins/example/CMakeLists.txt
+++ b/indra/media_plugins/example/CMakeLists.txt
@@ -36,7 +36,7 @@ if (WINDOWS)
set_target_properties(
media_plugin_example
PROPERTIES
- LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /LTCG /NODEFAULTLIB:LIBCMT"
+ LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT"
)
endif (WINDOWS)
diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt
index a3c1c4ef99..202cbed96e 100644
--- a/indra/media_plugins/libvlc/CMakeLists.txt
+++ b/indra/media_plugins/libvlc/CMakeLists.txt
@@ -39,7 +39,7 @@ if (WINDOWS)
set_target_properties(
media_plugin_libvlc
PROPERTIES
- LINK_FLAGS "/MANIFEST:NO /SAFESEH:NO /NODEFAULTLIB:LIBCMT"
+ LINK_FLAGS "/MANIFEST:NO /NODEFAULTLIB:LIBCMT"
)
endif (WINDOWS)
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index e7857ff09f..fbaf4e559f 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -286,6 +286,7 @@ set(viewer_SOURCE_FILES
llfloaterscriptlimits.cpp
llfloatersearch.cpp
llfloatersellland.cpp
+ llfloatersettingscolor.cpp
llfloatersettingsdebug.cpp
llfloatersidepanelcontainer.cpp
llfloatersnapshot.cpp
@@ -955,6 +956,7 @@ set(viewer_HEADER_FILES
llfloaterscriptlimits.h
llfloatersearch.h
llfloatersellland.h
+ llfloatersettingscolor.h
llfloatersettingsdebug.h
llfloatersidepanelcontainer.h
llfloatersnapshot.h
@@ -1731,7 +1733,6 @@ if (WINDOWS)
${CMAKE_SOURCE_DIR}/../etc/message.xml
${CMAKE_SOURCE_DIR}/../scripts/messages/message_template.msg
${SHARED_LIB_STAGING_DIR}/openjp2.dll
- ${SHARED_LIB_STAGING_DIR}/libhunspell.dll
${SHARED_LIB_STAGING_DIR}/llwebrtc.dll
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/SLVoice.exe
#${SHARED_LIB_STAGING_DIR}/${LL_INTDIR}/libsndfile-1.dll
@@ -1750,15 +1751,11 @@ if (WINDOWS)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/vivoxsdk_x64.dll
${SHARED_LIB_STAGING_DIR}/ortp_x64.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1-x64.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1-x64.dll
)
else (ADDRESS_SIZE EQUAL 64)
list(APPEND COPY_INPUT_DEPENDENCIES
${SHARED_LIB_STAGING_DIR}/vivoxsdk.dll
${SHARED_LIB_STAGING_DIR}/ortp.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libcrypto-1_1.dll
- ${ARCH_PREBUILT_DIRS_RELEASE}/libssl-1_1.dll
)
endif (ADDRESS_SIZE EQUAL 64)
@@ -2074,8 +2071,6 @@ if (DARWIN)
set(VIEWER_APP_BUNDLE "${CMAKE_CURRENT_BINARY_DIR}/$<IF:$<BOOL:${LL_GENERATOR_IS_MULTI_CONFIG}>,$<CONFIG>,>/${product}.app")
set(VIEWER_APP_EXE "${VIEWER_APP_BUNDLE}/Contents/MacOS/${product}")
- set(VIEWER_APP_DSYM "${VIEWER_APP_EXE}.dSYM")
- set(VIEWER_APP_XCARCHIVE "${VIEWER_APP_BUNDLE}/../${product}.xcarchive.zip")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/Info-SecondLife.plist"
@@ -2146,73 +2141,51 @@ if (INSTALL)
include(${CMAKE_CURRENT_SOURCE_DIR}/ViewerInstall.cmake)
endif (INSTALL)
-# Note that the conventional VIEWER_SYMBOL_FILE is set by ../../build.sh
if (PACKAGE AND (RELEASE_CRASH_REPORTING OR NON_RELEASE_CRASH_REPORTING) AND VIEWER_SYMBOL_FILE)
if (USE_BUGSPLAT)
# BugSplat symbol-file generation
if (WINDOWS)
- # Just pack up a tarball containing only the .pdb file for the
- # executable. Because we intend to use cygwin tar, we must render
- # VIEWER_SYMBOL_FILE in cygwin path syntax.
- execute_process(COMMAND "cygpath" "-u" "${VIEWER_SYMBOL_FILE}"
- OUTPUT_VARIABLE VIEWER_SYMBOL_FILE_CYGWIN
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- execute_process(COMMAND "cygpath" "-u" "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}"
- OUTPUT_VARIABLE PARENT_DIRECTORY_CYGWIN
- OUTPUT_STRIP_TRAILING_WHITESPACE)
- add_custom_command(OUTPUT "${VIEWER_SYMBOL_FILE}"
- # Use of 'tar ...J' here assumes VIEWER_SYMBOL_FILE endswith .tar.xz;
- # testing a string suffix is painful enough in CMake language that
- # we'll continue assuming it until forced to generalize.
+ set(VIEWER_APP_SYMBOLS_ARCHIVE "${SYMBOLS_STAGING_DIR}.sym.tar.xz")
+ set_target_properties( ${VIEWER_BINARY_NAME} PROPERTIES PDB_OUTPUT_DIRECTORY "${SYMBOLS_STAGING_DIR}")
+
+ # Just pack up a tarball containing only the .pdb files for the
+ # executables.
+ add_custom_command(OUTPUT "${VIEWER_APP_SYMBOLS_ARCHIVE}"
COMMAND "tar"
ARGS
"cJf"
- "${VIEWER_SYMBOL_FILE_CYGWIN}"
- "-C"
- "${PARENT_DIRECTORY_CYGWIN}"
- "secondlife-bin.pdb"
- DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/secondlife-bin.pdb"
- COMMENT "Packing viewer PDB into ${VIEWER_SYMBOL_FILE_CYGWIN}"
+ "${VIEWER_CHANNEL}.sym.tar.xz"
+ "${VIEWER_CHANNEL}"
+ DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc
+ WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}/.."
+ COMMENT "Packing viewer PDBs into ${VIEWER_APP_SYMBOLS_ARCHIVE}"
)
- add_custom_target(generate_symbols DEPENDS "${VIEWER_SYMBOL_FILE}" ${VIEWER_BINARY_NAME})
- add_dependencies(generate_symbols ${VIEWER_BINARY_NAME})
+ add_custom_target(generate_symbols DEPENDS "${VIEWER_APP_SYMBOLS_ARCHIVE}")
+ add_dependencies(generate_symbols ${VIEWER_BINARY_NAME} llwebrtc)
+
endif (WINDOWS)
if (DARWIN)
- # Have to run dsymutil first, then pack up the resulting .dSYM directory
- add_custom_command(OUTPUT "${VIEWER_APP_DSYM}"
- COMMAND "dsymutil"
- ARGS
- ${VIEWER_APP_EXE}
- COMMENT "Generating ${VIEWER_APP_DSYM}"
- )
- add_custom_target(dsym_generate DEPENDS "${VIEWER_APP_DSYM}")
- add_dependencies(dsym_generate ${VIEWER_BINARY_NAME})
+ set(VIEWER_APP_XCARCHIVE "${SYMBOLS_STAGING_DIR}.xcarchive.zip")
+
+ # we only need an xcarchive with dSYMs (including the application)
+ set_target_properties(${VIEWER_BINARY_NAME}
+ PROPERTIES
+ XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT "dwarf-with-dsym"
+ XCODE_ATTRIBUTE_DWARF_DSYM_FOLDER_PATH "${SYMBOLS_STAGING_DIR}/dSYMs")
+
add_custom_command(OUTPUT "${VIEWER_APP_XCARCHIVE}"
COMMAND "zip"
ARGS
"-r"
"${VIEWER_APP_XCARCHIVE}"
- "."
- WORKING_DIRECTORY "${VIEWER_APP_DSYM}/.."
- DEPENDS "${VIEWER_APP_DSYM}"
- COMMENT "Generating xcarchive.zip for upload to BugSplat"
- )
- add_custom_target(dsym_xcarchive DEPENDS "${VIEWER_APP_XCARCHIVE}")
- add_dependencies(dsym_xcarchive dsym_generate)
- # Have to create a stamp file, and depend on it, to force CMake to run
- # the cleanup step.
- add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp"
- COMMAND rm -rf "${VIEWER_APP_DSYM}"
- COMMAND touch "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp"
- DEPENDS "${VIEWER_APP_XCARCHIVE}"
- COMMENT "Cleaning up dSYM"
+ "${VIEWER_CHANNEL}"
+ WORKING_DIRECTORY "${SYMBOLS_STAGING_DIR}/.."
+ DEPENDS "${VIEWER_BINARY_NAME}" llwebrtc
+ COMMENT "Generating ${VIEWER_APP_XCARCHIVE} for upload to BugSplat"
)
add_custom_target(generate_symbols DEPENDS
- "${VIEWER_APP_DSYM}"
"${VIEWER_APP_XCARCHIVE}"
- "${CMAKE_CURRENT_BINARY_DIR}/dsym.stamp"
)
- add_dependencies(generate_symbols dsym_xcarchive)
endif (DARWIN)
if (LINUX)
# TBD
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index 5c3706bb6c..b89618dc87 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -1874,6 +1874,28 @@
<key>Value</key>
<real>64.0</real>
</map>
+ <key>AvatarExtentRefreshPeriodBatch</key>
+ <map>
+ <key>Comment</key>
+ <string>how many frames do we spread over by default when refreshing extents (default is 4)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>4</integer>
+ </map>
+ <key>AvatarExtentRefreshMaxPerBatch</key>
+ <map>
+ <key>Comment</key>
+ <string>how many avatars do we want to handle in total per batch (default is 5)</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>S32</string>
+ <key>Value</key>
+ <integer>5</integer>
+ </map>
<key>DebugAvatarAppearanceMessage</key>
<map>
<key>Comment</key>
@@ -15806,6 +15828,17 @@
<key>Value</key>
<integer>0</integer>
</map>
+ <key>ColorSettingsHideDefault</key>
+ <map>
+ <key>Comment</key>
+ <string>Show non-default settings only in Color Settings list</string>
+ <key>Persist</key>
+ <integer>0</integer>
+ <key>Type</key>
+ <string>Boolean</string>
+ <key>Value</key>
+ <integer>0</integer>
+ </map>
<key>DebugSettingsHideDefault</key>
<map>
<key>Comment</key>
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index d1dab94a76..77f24ac6a6 100644
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -32,6 +32,7 @@ SetCompressor /solid lzma # Compress whole installer as one block
SetDatablockOptimize off # Only saves us 0.1%, not worth it
XPStyle on # Add an XP manifest to the installer
RequestExecutionLevel admin # For when we write to Program Files
+Unicode true # Enable unicode support
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Project flags
diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index a808c196c7..66082d317a 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -2133,11 +2133,11 @@ void LLAppearanceMgr::filterWearableItems(
items.clear();
for (S32 i=0; i<LLWearableType::WT_COUNT; i++)
{
- auto size = items_by_type[i].size();
+ S32 size = (S32)items_by_type[i].size();
if (size <= 0)
continue;
- auto start_index = llmax(0,size-max_per_type);
- for (size_t j = start_index; j<size; j++)
+ S32 start_index = llmax(0,size-max_per_type);
+ for (S32 j = start_index; j<size; j++)
{
items.push_back(items_by_type[i][j]);
}
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index f2023565fc..262ab439b4 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -802,7 +802,7 @@ bool LLAppViewer::init()
settings_map["floater"] = &gSavedSettings; // *TODO: New settings file
settings_map["account"] = &gSavedPerAccountSettings;
- LLUI::initParamSingleton(settings_map,
+ LLUI::createInstance(settings_map,
LLUIImageList::getInstance(),
ui_audio_callback,
deferred_ui_audio_callback);
@@ -2155,6 +2155,7 @@ bool LLAppViewer::cleanup()
LLViewerEventRecorder::deleteSingleton();
LLWorld::deleteSingleton();
LLVoiceClient::deleteSingleton();
+ LLUI::deleteSingleton();
// It's not at first obvious where, in this long sequence, a generic cleanup
// call OUGHT to go. So let's say this: as we migrate cleanup from
diff --git a/indra/newview/llchathistory.cpp b/indra/newview/llchathistory.cpp
index 2b02aabc31..a48e22bc73 100644
--- a/indra/newview/llchathistory.cpp
+++ b/indra/newview/llchathistory.cpp
@@ -693,7 +693,7 @@ public:
mNeedsTimeBox = false;
user_name->setValue(mFrom);
updateMinUserNameWidth();
- LLColor4 sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
+ LLUIColor sep_color = LLUIColorTable::instance().getColor("ChatTeleportSeparatorColor");
setTransparentColor(sep_color);
mTimeBoxTextBox->setVisible(false);
}
@@ -739,7 +739,7 @@ public:
std::string username = chat.mFromName.substr(username_start + 2);
username = username.substr(0, username.length() - 1);
LLStyle::Params style_params_name;
- LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
+ LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
style_params_name.color(userNameColor);
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
@@ -1037,7 +1037,7 @@ private:
!av_name.isDisplayNameDefault())
{
LLStyle::Params style_params_name;
- LLColor4 userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
+ LLUIColor userNameColor = LLUIColorTable::instance().getColor("EmphasisColor");
style_params_name.color(userNameColor);
style_params_name.font.name("SansSerifSmall");
style_params_name.font.style("NORMAL");
@@ -1239,10 +1239,11 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
mMoreChatPanel->reshape(mMoreChatPanel->getRect().getWidth(), height);
}
- LLColor4 txt_color = LLUIColorTable::instance().getColor("White");
- LLColor4 name_color(txt_color);
+ F32 alpha = 1.f;
+ LLUIColor txt_color = LLUIColorTable::instance().getColor("White");
+ LLUIColor name_color(txt_color);
+ LLViewerChat::getChatColor(chat, txt_color, alpha);
- LLViewerChat::getChatColor(chat,txt_color);
LLFontGL* fontp = LLViewerChat::getChatFont();
std::string font_name = LLFontGL::nameFromFont(fontp);
std::string font_size = LLFontGL::sizeFromFont(fontp);
@@ -1250,6 +1251,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
LLStyle::Params body_message_params;
body_message_params.color(txt_color);
body_message_params.readonly_color(txt_color);
+ body_message_params.alpha(alpha);
body_message_params.font.name(font_name);
body_message_params.font.size(font_size);
body_message_params.font.style(input_append_params.font.style);
@@ -1317,7 +1319,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
{
if (!message_from_log)
{
- LLColor4 timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
+ LLUIColor timestamp_color = LLUIColorTable::instance().getColor("ChatTimestampColor");
timestamp_style.color(timestamp_color);
timestamp_style.readonly_color(timestamp_color);
}
@@ -1344,7 +1346,7 @@ void LLChatHistory::appendMessage(const LLChat& chat, const LLSD &args, const LL
// set the link for the object name to be the objectim SLapp
// (don't let object names with hyperlinks override our objectim Url)
LLStyle::Params link_params(body_message_params);
- LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
link_params.color = link_color;
link_params.readonly_color = link_color;
link_params.is_link = true;
diff --git a/indra/newview/llchatitemscontainerctrl.cpp b/indra/newview/llchatitemscontainerctrl.cpp
index a5c26eff9c..550dfeb802 100644
--- a/indra/newview/llchatitemscontainerctrl.cpp
+++ b/indra/newview/llchatitemscontainerctrl.cpp
@@ -134,8 +134,8 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
std::string color_name = notification["text_color"].asString();
- LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
- textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
+ LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
+ F32 textAlpha = (F32)notification["color_alpha"].asReal();
S32 font_size = notification["font_size"].asInteger();
@@ -152,6 +152,7 @@ void LLFloaterIMNearbyChatToastPanel::addMessage(LLSD& notification)
{
LLStyle::Params style_params;
style_params.color(textColor);
+ style_params.alpha(textAlpha);
std::string font_name = LLFontGL::nameFromFont(messageFont);
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
style_params.font.name(font_name);
@@ -190,8 +191,8 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
std::string color_name = notification["text_color"].asString();
- LLColor4 textColor = LLUIColorTable::instance().getColor(color_name);
- textColor.mV[VALPHA] = (F32)notification["color_alpha"].asReal();
+ LLUIColor textColor = LLUIColorTable::instance().getColor(color_name);
+ F32 textAlpha = (F32)notification["color_alpha"].asReal();
S32 font_size = notification["font_size"].asInteger();
@@ -222,14 +223,9 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
if (mSourceType == CHAT_SOURCE_AGENT || mSourceType == CHAT_SOURCE_OBJECT)
{
LLStyle::Params style_params_name;
-
- LLColor4 user_name_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
- style_params_name.color(user_name_color);
-
- std::string font_name = LLFontGL::nameFromFont(messageFont);
- std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
- style_params_name.font.name(font_name);
- style_params_name.font.size(font_style_size);
+ style_params_name.color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ style_params_name.font.name = LLFontGL::nameFromFont(messageFont);
+ style_params_name.font.size = LLFontGL::sizeFromFont(messageFont);
style_params_name.link_href = notification["sender_slurl"].asString();
style_params_name.is_link = true;
@@ -274,6 +270,7 @@ void LLFloaterIMNearbyChatToastPanel::init(LLSD& notification)
{
LLStyle::Params style_params;
style_params.color(textColor);
+ style_params.alpha(textAlpha);
std::string font_name = LLFontGL::nameFromFont(messageFont);
std::string font_style_size = LLFontGL::sizeFromFont(messageFont);
style_params.font.name(font_name);
diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp
index eac1ee2a3c..cb2370f413 100644
--- a/indra/newview/llconversationview.cpp
+++ b/indra/newview/llconversationview.cpp
@@ -652,6 +652,7 @@ void LLConversationViewParticipant::draw()
static LLUIColor sFlashBgColor = LLUIColorTable::instance().getColor("MenuItemFlashBgColor", DEFAULT_WHITE);
static LLUIColor sFocusOutlineColor = LLUIColorTable::instance().getColor("InventoryFocusOutlineColor", DEFAULT_WHITE);
static LLUIColor sMouseOverColor = LLUIColorTable::instance().getColor("InventoryMouseOverColor", DEFAULT_WHITE);
+ static LLUIColor sFriendColor = LLUIColorTable::instance().getColor("ConversationFriendColor");
const bool show_context = (getRoot() ? getRoot()->getShowSelectionContext() : false);
@@ -661,23 +662,23 @@ void LLConversationViewParticipant::draw()
F32 y = (F32)getRect().getHeight() - font->getLineHeight() - (F32)mTextPad;
F32 text_left = (F32)getLabelXPos();
- LLColor4 color;
+ LLUIColor* color;
LLLocalSpeakerMgr *speakerMgr = LLLocalSpeakerMgr::getInstance();
if (speakerMgr && speakerMgr->isSpeakerToBeRemoved(mUUID))
{
- color = sFgDisabledColor;
+ color = &sFgDisabledColor;
}
else
{
if (LLAvatarActions::isFriend(mUUID))
{
- color = LLUIColorTable::instance().getColor("ConversationFriendColor");
+ color = &sFriendColor;
}
else
{
- color = mIsSelected ? sHighlightFgColor : sFgColor;
+ color = mIsSelected ? &sHighlightFgColor : &sFgColor;
}
}
@@ -688,7 +689,7 @@ void LLConversationViewParticipant::draw()
}
drawHighlight(show_context, mIsSelected, sHighlightBgColor, sFlashBgColor, sFocusOutlineColor, sMouseOverColor);
- drawLabel(font, text_left, y, color, right_x);
+ drawLabel(font, text_left, y, color->get(), right_x);
LLView::draw();
}
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp
index 60e7171004..ae48db24bc 100644
--- a/indra/newview/lldrawable.cpp
+++ b/indra/newview/lldrawable.cpp
@@ -1600,18 +1600,10 @@ void LLSpatialBridge::updateDistance(LLCamera& camera_in, bool force_update)
mDrawable->updateDistance(camera, force_update);
- LLViewerObject::const_child_list_t& child_list = mDrawable->getVObj()->getChildren();
- for (LLViewerObject::child_list_t::const_iterator iter = child_list.begin();
- iter != child_list.end(); iter++)
+ for (LLViewerObject* child : mDrawable->getVObj()->getChildren())
{
- LLViewerObject* child = *iter;
LLDrawable* drawable = child->mDrawable;
- if (!drawable)
- {
- continue;
- }
-
- if (!drawable->isAvatar())
+ if (drawable && !drawable->isDead() && !drawable->isAvatar())
{
drawable->updateDistance(camera, force_update);
}
diff --git a/indra/newview/lldrawpoolwater.cpp b/indra/newview/lldrawpoolwater.cpp
index 0d4eaab488..53d6e528b6 100644
--- a/indra/newview/lldrawpoolwater.cpp
+++ b/indra/newview/lldrawpoolwater.cpp
@@ -241,8 +241,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
F32 screenRes[] = { 1.f / gGLViewport[2], 1.f / gGLViewport[3] };
- S32 diffTex = shader->enableTexture(LLShaderMgr::DIFFUSE_MAP);
-
shader->uniform2fv(LLShaderMgr::DEFERRED_SCREEN_RES, 1, screenRes);
shader->uniform1f(LLShaderMgr::BLEND_FACTOR, blend_factor);
@@ -316,8 +314,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
water = static_cast<LLVOWater*>(face->getViewerObject());
if (!water) continue;
- gGL.getTexUnit(diffTex)->bind(face->getTexture());
-
if ((bool)edge == (bool)water->getIsEdgePatch())
{
face->renderIndexed();
@@ -334,7 +330,6 @@ void LLDrawPoolWater::renderPostDeferred(S32 pass)
shader->disableTexture(LLShaderMgr::ENVIRONMENT_MAP, LLTexUnit::TT_CUBE_MAP);
shader->disableTexture(LLShaderMgr::WATER_SCREENTEX);
shader->disableTexture(LLShaderMgr::BUMP_MAP);
- shader->disableTexture(LLShaderMgr::DIFFUSE_MAP);
shader->disableTexture(LLShaderMgr::WATER_REFTEX);
// clean up
diff --git a/indra/newview/llenvironment.cpp b/indra/newview/llenvironment.cpp
index c12546f7eb..5dfaf176fd 100644
--- a/indra/newview/llenvironment.cpp
+++ b/indra/newview/llenvironment.cpp
@@ -54,8 +54,6 @@
#include "llregioninfomodel.h"
-#include <boost/make_shared.hpp>
-
#include "llatmosphere.h"
#include "llagent.h"
#include "roles_constants.h"
diff --git a/indra/newview/lleventpoll.cpp b/indra/newview/lleventpoll.cpp
index 471bb6d478..c05a7fef44 100644
--- a/indra/newview/lleventpoll.cpp
+++ b/indra/newview/lleventpoll.cpp
@@ -40,8 +40,6 @@
#include "llcorehttputil.h"
#include "lleventfilter.h"
-#include "boost/make_shared.hpp"
-
namespace LLEventPolling
{
namespace Details
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index f73c530ff9..d14a7ffddc 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -514,7 +514,7 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
mDrawablep->getSpatialGroup()->rebuildGeom();
mDrawablep->getSpatialGroup()->rebuildMesh();
- if(mVertexBuffer.isNull())
+ if (mVertexBuffer.isNull())
{
return;
}
@@ -567,8 +567,20 @@ void LLFace::renderSelected(LLViewerTexture *imagep, const LLColor4& color)
{
// cheaters sometimes prosper...
//
- mVertexBuffer->setBuffer();
- mVertexBuffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
+ LLVertexBuffer* vertex_buffer = mVertexBuffer.get();
+ // To display selection markers (white squares with the rounded cross at the center)
+ // on faces with GLTF textures we use a spectal vertex buffer with other transforms
+ if (const LLTextureEntry* te = getTextureEntry())
+ {
+ if (LLGLTFMaterial* gltf_mat = te->getGLTFRenderMaterial())
+ {
+ vertex_buffer = mVertexBufferGLTF.get();
+ vertex_buffer->unmapBuffer();
+ }
+ }
+ // Draw the selection marker using the correctly chosen vertex buffer
+ vertex_buffer->setBuffer();
+ vertex_buffer->draw(LLRender::TRIANGLES, mIndicesCount, mIndicesIndex);
}
gGL.popMatrix();
@@ -1144,7 +1156,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
const LLMatrix3& mat_norm_in,
U16 index_offset,
bool force_rebuild,
- bool no_debug_assert)
+ bool no_debug_assert,
+ bool rebuild_for_gltf)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_FACE;
llassert(verify());
@@ -1202,6 +1215,58 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
}
}
+ const LLTextureEntry* tep = mVObjp->getTE(face_index);
+ llassert(tep);
+ if (!tep)
+ return false;
+
+ LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
+ // To display selection markers (white squares with the rounded cross at the center)
+ // on faces with GLTF textures we use a special vertex buffer with other transforms
+ if (gltf_mat && !rebuild_for_gltf && tep->isSelected() && mVertexBuffer.notNull())
+ {
+ // Create a temporary vertex buffer to provide transforms for GLTF textures
+ if (mVertexBufferGLTF.isNull())
+ {
+ mVertexBufferGLTF = new LLVertexBuffer(mVertexBuffer->getTypeMask());
+ }
+
+ // Clone the existing vertex buffer into the temporary one
+ mVertexBuffer->clone(*mVertexBufferGLTF);
+
+ // Recursive call the same function with the argument rebuild_for_gltf set to true
+ // This call will make geometry in mVertexBuffer but in fact for mVertexBufferGLTF
+ mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+ getGeometryVolume(volume, face_index, mat_vert_in, mat_norm_in, index_offset, force_rebuild, no_debug_assert, true);
+ mVertexBufferGLTF.swap(mVertexBufferGLTF, mVertexBuffer);
+ }
+ else if (!tep->isSelected() && mVertexBufferGLTF.notNull())
+ {
+ // Free the temporary vertex buffer when it is not needed anymore
+ mVertexBufferGLTF = nullptr;
+ }
+
+ LLGLTFMaterial::TextureInfo gltf_info_index = (LLGLTFMaterial::TextureInfo)0;
+ if (gltf_mat && rebuild_for_gltf)
+ {
+ switch (LLPipeline::sRenderHighlightTextureChannel)
+ {
+ case LLRender::BASECOLOR_MAP:
+ gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
+ break;
+ case LLRender::METALLIC_ROUGHNESS_MAP:
+ gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS;
+ break;
+ case LLRender::GLTF_NORMAL_MAP:
+ gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL;
+ break;
+ case LLRender::EMISSIVE_MAP:
+ gltf_info_index = LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE;
+ break;
+ default:; // just to make clang happy
+ }
+ }
+
LLStrider<LLVector3> vert;
LLStrider<LLVector2> tex_coords0;
LLStrider<LLVector2> tex_coords1;
@@ -1218,7 +1283,7 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
LLVector3 scale;
if (global_volume)
{
- scale.setVec(1,1,1);
+ scale.setVec(1, 1, 1);
}
else
{
@@ -1233,7 +1298,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
bool rebuild_tangent = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_TANGENT);
bool rebuild_weights = rebuild_pos && mVertexBuffer->hasDataType(LLVertexBuffer::TYPE_WEIGHT4);
- const LLTextureEntry *tep = mVObjp->getTE(face_index);
const U8 bump_code = tep ? tep->getBumpmap() : 0;
bool is_static = mDrawablep->isStatic();
@@ -1323,7 +1387,6 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
LLMaterial* mat = tep->getMaterialParams().get();
- LLGLTFMaterial* gltf_mat = tep->getGLTFRenderMaterial();
F32 r = 0, os = 0, ot = 0, ms = 0, mt = 0, cos_ang = 0, sin_ang = 0;
@@ -1334,13 +1397,27 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
S32 xforms = XFORM_NONE;
// For GLTF, transforms will be applied later
- if (rebuild_tcoord && tep && !gltf_mat)
+ if (rebuild_tcoord && tep && (!gltf_mat || rebuild_for_gltf))
{
- r = tep->getRotation();
- os = tep->mOffsetS;
- ot = tep->mOffsetT;
- ms = tep->mScaleS;
- mt = tep->mScaleT;
+ if (gltf_mat && rebuild_for_gltf)
+ {
+ // Apply special transformations for mVertexBufferGLTF
+ // They are used only to display a face selection marker
+ // (white square with a rounded cross at the center)
+ const auto& tt = gltf_mat->mTextureTransform[gltf_info_index];
+ r = -tt.mRotation * 2;
+ ms = tt.mScale[VX];
+ mt = tt.mScale[VY];
+ os += tt.mOffset[VX] + (ms - 1) / 2;
+ ot -= tt.mOffset[VY] + (mt - 1) / 2;
+ }
+ else
+ {
+ r = tep->getRotation();
+ tep->getOffset(&os, &ot);
+ tep->getScale(&ms, &mt);
+ }
+
cos_ang = cos(r);
sin_ang = sin(r);
@@ -1481,12 +1558,9 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
break;
}
- F32 s_scale = 1.f;
- F32 t_scale = 1.f;
- if( tep )
- {
- tep->getScale( &s_scale, &t_scale );
- }
+ F32 s_scale = tep->getScaleS();
+ F32 t_scale = tep->getScaleT();
+
// Use the nudged south when coming from above sun angle, such
// that emboss mapping always shows up on the upward faces of cubes when
// it's noon (since a lot of builders build with the sun forced to noon).
@@ -1508,8 +1582,8 @@ bool LLFace::getGeometryVolume(const LLVolume& volume,
bool tex_anim = false;
- LLVOVolume* vobj = (LLVOVolume*) (LLViewerObject*) mVObjp;
- tex_mode = vobj->mTexAnimMode;
+ LLVOVolume* vobj = (LLVOVolume*)mVObjp.get();
+ tex_mode = vobj->mTexAnimMode;
if (vobj->mTextureAnimp)
{ //texture animation is in play, override specular and normal map tex coords with diffuse texcoords
diff --git a/indra/newview/llface.h b/indra/newview/llface.h
index 917f3aa0b2..7cf256f731 100644
--- a/indra/newview/llface.h
+++ b/indra/newview/llface.h
@@ -161,7 +161,8 @@ public:
const LLMatrix3& mat_normal,
U16 index_offset,
bool force_rebuild = false,
- bool no_debug_assert = false);
+ bool no_debug_assert = false,
+ bool rebuild_for_gltf = false);
// For avatar
U16 getGeometryAvatar(
@@ -266,6 +267,7 @@ public:
private:
LLPointer<LLVertexBuffer> mVertexBuffer;
+ LLPointer<LLVertexBuffer> mVertexBufferGLTF;
U32 mState;
LLFacePool* mDrawPoolp;
diff --git a/indra/newview/llfloatercolorpicker.cpp b/indra/newview/llfloatercolorpicker.cpp
index 603f54fb49..cd45093856 100644
--- a/indra/newview/llfloatercolorpicker.cpp
+++ b/indra/newview/llfloatercolorpicker.cpp
@@ -110,12 +110,6 @@ LLFloaterColorPicker::LLFloaterColorPicker (LLColorSwatchCtrl* swatch, bool show
// create user interface for this picker
createUI ();
-
- if (!mCanApplyImmediately)
- {
- mApplyImmediateCheck->setEnabled(false);
- mApplyImmediateCheck->set(false);
- }
}
LLFloaterColorPicker::~LLFloaterColorPicker()
@@ -226,6 +220,12 @@ bool LLFloaterColorPicker::postBuild()
mApplyImmediateCheck->set(gSavedSettings.getBOOL("ApplyColorImmediately"));
mApplyImmediateCheck->setCommitCallback(onImmediateCheck, this);
+ if (!mCanApplyImmediately)
+ {
+ mApplyImmediateCheck->setEnabled(false);
+ mApplyImmediateCheck->set(false);
+ }
+
childSetCommitCallback("rspin", onTextCommit, (void*)this );
childSetCommitCallback("gspin", onTextCommit, (void*)this );
childSetCommitCallback("bspin", onTextCommit, (void*)this );
diff --git a/indra/newview/llfloatereditenvironmentbase.cpp b/indra/newview/llfloatereditenvironmentbase.cpp
index bd5839ed17..a42c94f049 100644
--- a/indra/newview/llfloatereditenvironmentbase.cpp
+++ b/indra/newview/llfloatereditenvironmentbase.cpp
@@ -28,8 +28,6 @@
#include "llfloatereditenvironmentbase.h"
-#include <boost/make_shared.hpp>
-
// libs
#include "llnotifications.h"
#include "llnotificationsutil.h"
diff --git a/indra/newview/llfloateremojipicker.cpp b/indra/newview/llfloateremojipicker.cpp
index 30f58aaeec..cc13e5d059 100644
--- a/indra/newview/llfloateremojipicker.cpp
+++ b/indra/newview/llfloateremojipicker.cpp
@@ -186,7 +186,7 @@ public:
{
mWStr = LLWString(1, emoji);
mEmoji = emoji;
- mTitle = title;
+ mTitle = utf8str_to_wstring(title);
mBegin = begin;
mEnd = end;
}
@@ -203,10 +203,9 @@ public:
F32 centerY = 0.5f * clientHeight;
drawIcon(centerX, centerY - 1, iconWidth);
- static LLColor4 defaultColor(0.75f, 0.75f, 0.75f, 1.0f);
- LLColor4 textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", defaultColor);
+ static LLUIColor textColor = LLUIColorTable::instance().getColor("MenuItemEnabledColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
S32 max_pixels = clientWidth - iconWidth;
- drawName((F32)iconWidth, centerY, max_pixels, textColor);
+ drawName((F32)iconWidth, centerY, max_pixels, textColor.get());
}
protected:
@@ -226,16 +225,16 @@ protected:
max_pixels); // max_pixels
}
- void drawName(F32 x, F32 y, S32 max_pixels, LLColor4& color)
+ void drawName(F32 x, F32 y, S32 max_pixels, const LLColor4& color)
{
F32 x0 = x;
F32 x1 = (F32)max_pixels;
LLFontGL* font = LLFontGL::getFontEmojiLarge();
if (mBegin)
{
- std::string text = mTitle.substr(0, mBegin);
- font->renderUTF8(
- text, // text
+ LLWString text = mTitle.substr(0, mBegin);
+ font->render(
+ text.c_str(), // text
0, // begin_offset
x0, // x
y, // y
@@ -246,14 +245,14 @@ protected:
LLFontGL::DROP_SHADOW_SOFT, // shadow
static_cast<S32>(text.size()), // max_chars
(S32)x1); // max_pixels
- F32 dx = font->getWidthF32(text);
+ F32 dx = font->getWidthF32(text.c_str());
x0 += dx;
x1 -= dx;
}
if (x1 > 0 && mEnd > mBegin)
{
- std::string text = mTitle.substr(mBegin, mEnd - mBegin);
- font->renderUTF8(
+ LLWString text = mTitle.substr(mBegin, mEnd - mBegin);
+ font->render(
text, // text
0, // begin_offset
x0, // x
@@ -265,14 +264,14 @@ protected:
LLFontGL::DROP_SHADOW_SOFT, // shadow
static_cast<S32>(text.size()), // max_chars
(S32)x1); // max_pixels
- F32 dx = font->getWidthF32(text);
+ F32 dx = font->getWidthF32(text.c_str());
x0 += dx;
x1 -= dx;
}
if (x1 > 0 && mEnd < mTitle.size())
{
- std::string text = mEnd ? mTitle.substr(mEnd) : mTitle;
- font->renderUTF8(
+ LLWString text = mEnd ? mTitle.substr(mEnd) : mTitle;
+ font->render(
text, // text
0, // begin_offset
x0, // x
@@ -290,7 +289,7 @@ protected:
private:
llwchar mEmoji;
LLWString mWStr;
- std::string mTitle;
+ LLWString mTitle;
size_t mBegin;
size_t mEnd;
};
@@ -429,6 +428,7 @@ void LLFloaterEmojiPicker::fillGroups()
for (LLButton* button : mGroupButtons)
{
mGroups->removeChild(button);
+ button->die();
}
mFilteredEmojiGroups.clear();
mFilteredEmojis.clear();
@@ -442,6 +442,7 @@ void LLFloaterEmojiPicker::fillGroups()
rect.mBottom = mBadge->getRect().getHeight();
// Create button for "All categories"
+ params.name = "all_categories";
createGroupButton(params, rect, ALL_EMOJIS_IMAGE_INDEX);
// Create group and button for "Recently used" and/or "Frequently used"
@@ -455,6 +456,7 @@ void LLFloaterEmojiPicker::fillGroups()
{
mFilteredEmojiGroups.push_back(USED_EMOJIS_GROUP_INDEX);
mFilteredEmojis.emplace_back(cats);
+ params.name = "used_categories";
createGroupButton(params, rect, USED_EMOJIS_IMAGE_INDEX);
}
}
@@ -472,6 +474,7 @@ void LLFloaterEmojiPicker::fillGroups()
{
mFilteredEmojiGroups.push_back(i);
mFilteredEmojis.emplace_back(cats);
+ params.name = "group_" + std::to_string(i);
createGroupButton(params, rect, groups[i].Character);
}
}
@@ -700,8 +703,7 @@ void LLFloaterEmojiPicker::fillEmojis(bool fromResize)
LLPanel::Params icon_params;
LLRect icon_rect(0, icon_size, icon_size, 0);
- static LLColor4 default_color(0.75f, 0.75f, 0.75f, 1.0f);
- LLColor4 bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", default_color);
+ static LLUIColor bg_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4(0.75f, 0.75f, 0.75f, 1.0f));
if (!mSelectedGroupIndex)
{
diff --git a/indra/newview/llfloaterfixedenvironment.cpp b/indra/newview/llfloaterfixedenvironment.cpp
index 6829e6b479..e44202312b 100644
--- a/indra/newview/llfloaterfixedenvironment.cpp
+++ b/indra/newview/llfloaterfixedenvironment.cpp
@@ -28,8 +28,6 @@
#include "llfloaterfixedenvironment.h"
-#include <boost/make_shared.hpp>
-
// libs
#include "llbutton.h"
#include "llnotifications.h"
diff --git a/indra/newview/llfloaterimnearbychathandler.cpp b/indra/newview/llfloaterimnearbychathandler.cpp
index 5cf02d1ec0..a614299e03 100644
--- a/indra/newview/llfloaterimnearbychathandler.cpp
+++ b/indra/newview/llfloaterimnearbychathandler.cpp
@@ -535,14 +535,13 @@ void LLFloaterIMNearbyChatHandler::processChat(const LLChat& chat_msg,
if (gSavedSettings.getS32("ShowScriptErrorsLocation") == 1)// show error in window //("ScriptErrorsAsChat"))
{
-
- LLColor4 txt_color;
-
- LLViewerChat::getChatColor(chat_msg,txt_color);
+ LLUIColor txt_color;
+ F32 alpha = 1.f;
+ LLViewerChat::getChatColor(chat_msg, txt_color, alpha);
LLFloaterScriptDebug::addScriptLine(chat_msg.mText,
chat_msg.mFromName,
- txt_color,
+ txt_color % alpha,
chat_msg.mFromID);
return;
}
diff --git a/indra/newview/llfloaterjoystick.cpp b/indra/newview/llfloaterjoystick.cpp
index 7db3621a4b..68b11ec92b 100644
--- a/indra/newview/llfloaterjoystick.cpp
+++ b/indra/newview/llfloaterjoystick.cpp
@@ -93,8 +93,9 @@ BOOL CALLBACK di8_list_devices_callback(LPCDIDEVICEINSTANCE device_instance_ptr,
#endif
LLFloaterJoystick::LLFloaterJoystick(const LLSD& data)
- : LLFloater(data),
- mHasDeviceList(false)
+ : LLFloater(data)
+ , mHasDeviceList(false)
+ , mJoystickInitialized(false)
{
if (!LLViewerJoystick::getInstance()->isJoystickInitialized())
{
@@ -108,7 +109,10 @@ void LLFloaterJoystick::draw()
{
LLViewerJoystick* joystick(LLViewerJoystick::getInstance());
bool joystick_inited = joystick->isJoystickInitialized();
- if (joystick_inited != mHasDeviceList)
+ if (!mHasDeviceList
+ || mJoystickInitialized != joystick_inited
+ || (joystick->isDeviceUUIDSet() && joystick->getDeviceUUID().asUUID() != mCurrentDeviceId)
+ || (!joystick->isDeviceUUIDSet() && mCurrentDeviceId.notNull()))
{
refreshListOfDevices();
}
@@ -290,15 +294,16 @@ void LLFloaterJoystick::refreshListOfDevices()
mHasDeviceList = true;
}
- bool is_device_id_set = LLViewerJoystick::getInstance()->isDeviceUUIDSet();
+ LLViewerJoystick* joystick = LLViewerJoystick::getInstance();
+ bool is_device_id_set = joystick->isDeviceUUIDSet();
- if (LLViewerJoystick::getInstance()->isJoystickInitialized() &&
+ if (joystick->isJoystickInitialized() &&
(!mHasDeviceList || !is_device_id_set))
{
#if LL_WINDOWS && !LL_MESA_HEADLESS
LL_WARNS() << "NDOF connected to device without using SL provided handle" << LL_ENDL;
#endif
- std::string desc = LLViewerJoystick::getInstance()->getDescription();
+ std::string desc = joystick->getDescription();
if (!desc.empty())
{
LLSD value = LLSD::Integer(1); // value for selection
@@ -311,11 +316,13 @@ void LLFloaterJoystick::refreshListOfDevices()
{
if (is_device_id_set)
{
- LLSD guid = LLViewerJoystick::getInstance()->getDeviceUUID();
+ LLSD guid = joystick->getDeviceUUID();
+ mCurrentDeviceId = guid.asUUID();
mJoysticksCombo->selectByValue(guid);
}
else
{
+ mCurrentDeviceId.setNull();
mJoysticksCombo->selectByValue(LLSD::Integer(1));
}
}
@@ -323,6 +330,18 @@ void LLFloaterJoystick::refreshListOfDevices()
{
mJoysticksCombo->selectByValue(LLSD::Integer(0));
}
+
+ // Update tracking
+ if (is_device_id_set)
+ {
+ LLSD guid = joystick->getDeviceUUID();
+ mCurrentDeviceId = guid.asUUID();
+ }
+ else
+ {
+ mCurrentDeviceId.setNull();
+ }
+ mJoystickInitialized = joystick->isJoystickInitialized();
}
void LLFloaterJoystick::cancel()
diff --git a/indra/newview/llfloaterjoystick.h b/indra/newview/llfloaterjoystick.h
index b94223a738..c7e727635d 100644
--- a/indra/newview/llfloaterjoystick.h
+++ b/indra/newview/llfloaterjoystick.h
@@ -95,6 +95,8 @@ private:
LLComboBox *mJoysticksCombo;
bool mHasDeviceList;
+ bool mJoystickInitialized;
+ LLUUID mCurrentDeviceId;
// stats view
LLStatBar* mAxisStatsBar[6];
diff --git a/indra/newview/llfloaterscriptedprefs.cpp b/indra/newview/llfloaterscriptedprefs.cpp
index a38c4b51f2..fa31cd72c1 100644
--- a/indra/newview/llfloaterscriptedprefs.cpp
+++ b/indra/newview/llfloaterscriptedprefs.cpp
@@ -54,8 +54,6 @@ bool LLFloaterScriptEdPrefs::postBuild()
void LLFloaterScriptEdPrefs::applyUIColor(LLUICtrl* ctrl, const LLSD& param)
{
LLUIColorTable::instance().setColor(param.asString(), LLColor4(ctrl->getValue()));
- mEditor->initKeywords();
- mEditor->loadKeywords();
}
void LLFloaterScriptEdPrefs::getUIColor(LLUICtrl* ctrl, const LLSD& param)
diff --git a/indra/newview/llfloatersettingscolor.cpp b/indra/newview/llfloatersettingscolor.cpp
new file mode 100644
index 0000000000..d9c382a1dc
--- /dev/null
+++ b/indra/newview/llfloatersettingscolor.cpp
@@ -0,0 +1,334 @@
+/**
+* @file llfloatersettingscolor.cpp
+* @brief Implementation of LLFloaterSettingsColor
+* @author Rye Cogtail<rye@alchemyviewer.org>
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#include "llviewerprecompiledheaders.h"
+
+#include "llfloatersettingscolor.h"
+
+#include "llfloater.h"
+#include "llfiltereditor.h"
+#include "lluictrlfactory.h"
+#include "llcombobox.h"
+#include "llspinctrl.h"
+#include "llcolorswatch.h"
+#include "llviewercontrol.h"
+#include "lltexteditor.h"
+
+
+LLFloaterSettingsColor::LLFloaterSettingsColor(const LLSD& key)
+: LLFloater(key),
+ mSettingList(NULL)
+{
+ mCommitCallbackRegistrar.add("CommitSettings", boost::bind(&LLFloaterSettingsColor::onCommitSettings, this));
+ mCommitCallbackRegistrar.add("ClickDefault", boost::bind(&LLFloaterSettingsColor::onClickDefault, this));
+}
+
+LLFloaterSettingsColor::~LLFloaterSettingsColor()
+{}
+
+bool LLFloaterSettingsColor::postBuild()
+{
+ enableResizeCtrls(true, false, true);
+
+ mAlphaSpinner = getChild<LLSpinCtrl>("alpha_spinner");
+ mColorSwatch = getChild<LLColorSwatchCtrl>("color_swatch");
+
+ mDefaultButton = getChild<LLUICtrl>("default_btn");
+ mSettingNameText = getChild<LLTextBox>("color_name_txt");
+
+ getChild<LLFilterEditor>("filter_input")->setCommitCallback(boost::bind(&LLFloaterSettingsColor::setSearchFilter, this, _2));
+
+ mSettingList = getChild<LLScrollListCtrl>("setting_list");
+ mSettingList->setCommitOnSelectionChange(true);
+ mSettingList->setCommitCallback(boost::bind(&LLFloaterSettingsColor::onSettingSelect, this));
+
+ updateList();
+
+ gSavedSettings.getControl("ColorSettingsHideDefault")->getCommitSignal()->connect(boost::bind(&LLFloaterSettingsColor::updateList, this, false));
+
+ return LLFloater::postBuild();
+}
+
+void LLFloaterSettingsColor::draw()
+{
+ LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+ if (first_selected)
+ {
+ if(auto cell = first_selected->getColumn(1))
+ {
+ updateControl(cell->getValue().asString());
+ }
+ }
+
+ LLFloater::draw();
+}
+
+void LLFloaterSettingsColor::onCommitSettings()
+{
+ LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+ if (!first_selected)
+ {
+ return;
+ }
+ auto cell = first_selected->getColumn(1);
+
+ if (!cell)
+ {
+ return;
+ }
+
+ auto color_name = cell->getValue().asString();
+ if (color_name.empty())
+ {
+ return;
+ }
+
+ LLColor4 col4;
+ LLColor3 col3;
+ col3.setValue(mColorSwatch->getValue());
+ col4 = LLColor4(col3, (F32)mAlphaSpinner->getValue().asReal());
+ LLUIColorTable::instance().setColor(color_name, col4);
+
+ updateDefaultColumn(color_name);
+}
+
+// static
+void LLFloaterSettingsColor::onClickDefault()
+{
+ LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+ if (first_selected)
+ {
+ auto cell = first_selected->getColumn(1);
+ if (cell)
+ {
+ auto name = cell->getValue().asString();
+ LLUIColorTable::instance().resetToDefault(name);
+ updateDefaultColumn(name);
+ updateControl(name);
+ }
+ }
+}
+
+// we've switched controls, or doing per-frame update, so update spinners, etc.
+void LLFloaterSettingsColor::updateControl(const std::string& color_name)
+{
+ hideUIControls();
+
+ if (!isSettingHidden(color_name))
+ {
+ mDefaultButton->setVisible(true);
+ mSettingNameText->setVisible(true);
+ mSettingNameText->setText(color_name);
+ mSettingNameText->setToolTip(color_name);
+
+ LLColor4 clr = LLUIColorTable::instance().getColor(color_name);
+ mColorSwatch->setVisible(true);
+ // only set if changed so color picker doesn't update
+ if (clr != LLColor4(mColorSwatch->getValue()))
+ {
+ mColorSwatch->setOriginal(clr);
+ }
+ mAlphaSpinner->setVisible(true);
+ mAlphaSpinner->setLabel(std::string("Alpha"));
+ if (!mAlphaSpinner->hasFocus())
+ {
+ mAlphaSpinner->setPrecision(3);
+ mAlphaSpinner->setMinValue(0.0);
+ mAlphaSpinner->setMaxValue(1.f);
+ mAlphaSpinner->setValue(clr.mV[VALPHA]);
+ }
+ }
+
+}
+
+void LLFloaterSettingsColor::updateList(bool skip_selection)
+{
+ std::string last_selected;
+ LLScrollListItem* item = mSettingList->getFirstSelected();
+ if (item)
+ {
+ LLScrollListCell* cell = item->getColumn(1);
+ if (cell)
+ {
+ last_selected = cell->getValue().asString();
+ }
+ }
+
+ mSettingList->deleteAllItems();
+
+ const auto& base_colors = LLUIColorTable::instance().getLoadedColors();
+ for (const auto& pair : base_colors)
+ {
+ const auto& name = pair.first;
+ if (matchesSearchFilter(name) && !isSettingHidden(name))
+ {
+ LLSD row;
+
+ row["columns"][0]["column"] = "changed_color";
+ row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
+
+ row["columns"][1]["column"] = "color";
+ row["columns"][1]["value"] = name;
+
+ LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
+ if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
+ {
+ std::string lower_name(name);
+ LLStringUtil::toLower(lower_name);
+ if (LLStringUtil::startsWith(lower_name, mSearchFilter))
+ {
+ item->setSelected(true);
+ }
+ }
+ }
+ }
+
+ for (const auto& pair : LLUIColorTable::instance().getUserColors())
+ {
+ const auto& name = pair.first;
+ if (base_colors.find(name) == base_colors.end() && matchesSearchFilter(name) && !isSettingHidden(name))
+ {
+ LLSD row;
+
+ row["columns"][0]["column"] = "changed_color";
+ row["columns"][0]["value"] = LLUIColorTable::instance().isDefault(name) ? "" : "*";
+
+ row["columns"][1]["column"] = "color";
+ row["columns"][1]["value"] = name;
+
+ LLScrollListItem* item = mSettingList->addElement(row, ADD_BOTTOM, nullptr);
+ if (!mSearchFilter.empty() && (last_selected == name) && !skip_selection)
+ {
+ std::string lower_name(name);
+ LLStringUtil::toLower(lower_name);
+ if (LLStringUtil::startsWith(lower_name, mSearchFilter))
+ {
+ item->setSelected(true);
+ }
+ }
+ }
+ }
+
+ mSettingList->updateSort();
+
+ if (!mSettingList->isEmpty())
+ {
+ if (mSettingList->hasSelectedItem())
+ {
+ mSettingList->scrollToShowSelected();
+ }
+ else if (!mSettingList->hasSelectedItem() && !mSearchFilter.empty() && !skip_selection)
+ {
+ if (!mSettingList->selectItemByPrefix(mSearchFilter, false, 1))
+ {
+ mSettingList->selectFirstItem();
+ }
+ mSettingList->scrollToShowSelected();
+ }
+ }
+ else
+ {
+ LLSD row;
+
+ row["columns"][0]["column"] = "changed_color";
+ row["columns"][0]["value"] = "";
+ row["columns"][1]["column"] = "color";
+ row["columns"][1]["value"] = "No matching colors.";
+
+ mSettingList->addElement(row);
+ hideUIControls();
+ }
+}
+
+void LLFloaterSettingsColor::onSettingSelect()
+{
+ LLScrollListItem* first_selected = mSettingList->getFirstSelected();
+ if (first_selected)
+ {
+ auto cell = first_selected->getColumn(1);
+ if (cell)
+ {
+ updateControl(cell->getValue().asString());
+ }
+ }
+}
+
+void LLFloaterSettingsColor::setSearchFilter(const std::string& filter)
+{
+ if(mSearchFilter == filter)
+ return;
+ mSearchFilter = filter;
+ LLStringUtil::toLower(mSearchFilter);
+ updateList();
+}
+
+bool LLFloaterSettingsColor::matchesSearchFilter(std::string setting_name)
+{
+ // If the search filter is empty, everything passes.
+ if (mSearchFilter.empty()) return true;
+
+ LLStringUtil::toLower(setting_name);
+ std::string::size_type match_name = setting_name.find(mSearchFilter);
+
+ return (std::string::npos != match_name);
+}
+
+bool LLFloaterSettingsColor::isSettingHidden(const std::string& color_name)
+{
+ static LLCachedControl<bool> hide_default(gSavedSettings, "ColorSettingsHideDefault", false);
+ return hide_default && LLUIColorTable::instance().isDefault(color_name);
+}
+
+void LLFloaterSettingsColor::updateDefaultColumn(const std::string& color_name)
+{
+ if (isSettingHidden(color_name))
+ {
+ hideUIControls();
+ updateList(true);
+ return;
+ }
+
+ LLScrollListItem* item = mSettingList->getFirstSelected();
+ if (item)
+ {
+ LLScrollListCell* cell = item->getColumn(0);
+ if (cell)
+ {
+ std::string is_default = LLUIColorTable::instance().isDefault(color_name) ? "" : "*";
+ cell->setValue(is_default);
+ }
+ }
+}
+
+void LLFloaterSettingsColor::hideUIControls()
+{
+ mColorSwatch->setVisible(false);
+ mAlphaSpinner->setVisible(false);
+ mDefaultButton->setVisible(false);
+ mSettingNameText->setVisible(false);
+}
+
diff --git a/indra/newview/llfloatersettingscolor.h b/indra/newview/llfloatersettingscolor.h
new file mode 100644
index 0000000000..42eb85cd60
--- /dev/null
+++ b/indra/newview/llfloatersettingscolor.h
@@ -0,0 +1,81 @@
+/**
+* @file llfloatersettingscolor.h
+* @brief Header file for LLFloaterSettingsColor
+* @author Rye Cogtail<rye@alchemyviewer.org>
+*
+* $LicenseInfo:firstyear=2024&license=viewerlgpl$
+* Second Life Viewer Source Code
+* Copyright (C) 2024, Linden Research, Inc.
+*
+* This library is free software; you can redistribute it and/or
+* modify it under the terms of the GNU Lesser General Public
+* License as published by the Free Software Foundation;
+* version 2.1 of the License only.
+*
+* This library is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this library; if not, write to the Free Software
+* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*
+* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
+* $/LicenseInfo$
+*/
+
+#ifndef LLFLOATERCOLORSETTINGS_H
+#define LLFLOATERCOLORSETTINGS_H
+
+#include "llcontrol.h"
+#include "llfloater.h"
+
+class LLColorSwatchCtrl;
+class LLScrollListCtrl;
+class LLSpinCtrl;
+class LLTextBox;
+
+class LLFloaterSettingsColor final
+: public LLFloater
+{
+ friend class LLFloaterReg;
+
+public:
+
+ bool postBuild() override;
+ void draw() override;
+
+ void updateControl(const std::string& color_name);
+
+ void onCommitSettings();
+ void onClickDefault();
+
+ bool matchesSearchFilter(std::string setting_name);
+ bool isSettingHidden(const std::string& color_name);
+
+private:
+ LLFloaterSettingsColor(const LLSD& key);
+ virtual ~LLFloaterSettingsColor();
+
+ void updateList(bool skip_selection = false);
+ void onSettingSelect();
+ void setSearchFilter(const std::string& filter);
+
+ void updateDefaultColumn(const std::string& color_name);
+ void hideUIControls();
+
+ LLScrollListCtrl* mSettingList;
+
+protected:
+ LLUICtrl* mDefaultButton = nullptr;
+ LLTextBox* mSettingNameText = nullptr;
+
+ LLSpinCtrl* mAlphaSpinner = nullptr;
+ LLColorSwatchCtrl* mColorSwatch = nullptr;
+
+ std::string mSearchFilter;
+};
+
+#endif //LLFLOATERCOLORSETTINGS_H
+
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index 8d74a99539..fc2cfbcf2b 100755
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -261,6 +261,48 @@ void LLMapFriendObserver::changed(U32 mask)
}
}
+LLWorldMapParcelInfoObserver::LLWorldMapParcelInfoObserver(const LLVector3d& pos_global)
+ : LLRemoteParcelInfoObserver(),
+ mPosGlobal(pos_global),
+ mParcelID(LLUUID::null)
+{ }
+
+LLWorldMapParcelInfoObserver::~LLWorldMapParcelInfoObserver()
+{
+ if (mParcelID.notNull())
+ {
+ LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelID, this);
+ }
+}
+
+void LLWorldMapParcelInfoObserver::processParcelInfo(const LLParcelData& parcel_data)
+{
+ if (parcel_data.parcel_id == mParcelID)
+ {
+ LLRemoteParcelInfoProcessor::getInstance()->removeObserver(mParcelID, this);
+
+ if (gFloaterWorldMap)
+ {
+ gFloaterWorldMap->processParcelInfo(parcel_data, mPosGlobal);
+ }
+ }
+}
+
+// virtual
+void LLWorldMapParcelInfoObserver::setParcelID(const LLUUID& parcel_id)
+{
+ mParcelID = parcel_id;
+ auto instance = LLRemoteParcelInfoProcessor::getInstance();
+ instance->addObserver(mParcelID, this);
+ instance->sendParcelInfoRequest(mParcelID);
+}
+
+// virtual
+void LLWorldMapParcelInfoObserver::setErrorStatus(S32 status, const std::string& reason)
+{
+ LL_WARNS("LLWorldMapParcelInfoObserver") << "Can't handle remote parcel request." << " Http Status: " << status << ". Reason : " << reason << LL_ENDL;
+}
+
//---------------------------------------------------------------------------
// Statics
//---------------------------------------------------------------------------
@@ -275,23 +317,25 @@ const LLUUID LLFloaterWorldMap::sHomeID( "10000000-0000-0000-0000-000000000001"
LLFloaterWorldMap::LLFloaterWorldMap(const LLSD& key)
: LLFloater(key),
- mInventory(NULL),
- mInventoryObserver(NULL),
- mFriendObserver(NULL),
+ mInventory(nullptr),
+ mInventoryObserver(nullptr),
+ mFriendObserver(nullptr),
mCompletingRegionName(),
mCompletingRegionPos(),
mWaitingForTracker(false),
mIsClosing(false),
mSetToUserPosition(true),
- mTrackedLocation(0,0,0),
+ mTrackedLocation(0.0,0.0,0.0),
mTrackedStatus(LLTracker::TRACKING_NOTHING),
- mListFriendCombo(NULL),
- mListLandmarkCombo(NULL),
- mListSearchResults(NULL)
+ mListFriendCombo(nullptr),
+ mListLandmarkCombo(nullptr),
+ mListSearchResults(nullptr),
+ mParcelInfoObserver(nullptr),
+ mShowParcelInfo(false)
{
gFloaterWorldMap = this;
- mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, NULL);
+ mFactoryMap["objects_mapview"] = LLCallbackMap(createWorldMapView, nullptr);
mCommitCallbackRegistrar.add("WMap.Coordinates", boost::bind(&LLFloaterWorldMap::onCoordinatesCommit, this));
mCommitCallbackRegistrar.add("WMap.Location", boost::bind(&LLFloaterWorldMap::onLocationCommit, this));
@@ -374,6 +418,11 @@ bool LLFloaterWorldMap::postBuild()
// virtual
LLFloaterWorldMap::~LLFloaterWorldMap()
{
+ if (mParcelInfoObserver)
+ {
+ delete mParcelInfoObserver;
+ }
+
// All cleaned up by LLView destructor
mMapView = NULL;
@@ -584,9 +633,73 @@ void LLFloaterWorldMap::draw()
// Internal utility functions
//-------------------------------------------------------------------------
+void LLFloaterWorldMap::processParcelInfo(const LLParcelData& parcel_data, const LLVector3d& pos_global) const
+{
+ LLVector3d tracker_pos = LLTracker::getTrackedPositionGlobal();
+ if (!mShowParcelInfo ||
+ (tracker_pos.mdV[VX] != pos_global.mdV[VX] && tracker_pos.mdV[VY] != pos_global.mdV[VY]) ||
+ LLTracker::getTrackedLocationType() != LLTracker::LOCATION_NOTHING ||
+ LLTracker::getTrackingStatus() != LLTracker::TRACKING_LOCATION)
+ {
+ return;
+ }
+
+ LLSimInfo* sim_info = LLWorldMap::getInstance()->simInfoFromPosGlobal(pos_global);
+ if (!sim_info)
+ {
+ return;
+ }
+
+ std::string sim_name = sim_info->getName();
+ U32 locX, locY;
+ from_region_handle(sim_info->getHandle(), &locX, &locY);
+ F32 region_x = (F32)(pos_global.mdV[VX] - locX);
+ F32 region_y = (F32)(pos_global.mdV[VY] - locY);
+ std::string full_name = llformat("%s (%d, %d, %d)",
+ sim_name.c_str(),
+ ll_round(region_x),
+ ll_round(region_y),
+ ll_round((F32)pos_global.mdV[VZ]));
+
+ LLTracker::trackLocation(pos_global, parcel_data.name.empty() ? getString("UnnamedParcel") : parcel_data.name, full_name);
+}
+
+void LLFloaterWorldMap::requestParcelInfo(const LLVector3d& pos_global, const LLVector3d& region_origin)
+{
+ if (pos_global == mRequestedGlobalPos)
+ {
+ return;
+ }
+
+ LLViewerRegion* region = gAgent.getRegion();
+ if (!region)
+ {
+ return;
+ }
+
+ if (std::string url = region->getCapability("RemoteParcelRequest"); !url.empty())
+ {
+ mRequestedGlobalPos = pos_global;
+ if (mParcelInfoObserver)
+ {
+ delete mParcelInfoObserver;
+ }
+ mParcelInfoObserver = new LLWorldMapParcelInfoObserver(pos_global);
+
+ auto pos_region = LLVector3(pos_global - region_origin);
+ LLRemoteParcelInfoProcessor::instance().requestRegionParcelInfo(url,
+ region->getRegionID(), pos_region, pos_global,
+ mParcelInfoObserver->getObserverHandle());
+ }
+ else
+ {
+ LL_WARNS() << "Cannot request parcel details: Cap not found" << LL_ENDL;
+ }
+}
void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string& name )
{
+ mShowParcelInfo = false;
LLCtrlSelectionInterface *iface = childGetSelectionInterface("friend combo");
if (!iface) return;
@@ -617,6 +730,7 @@ void LLFloaterWorldMap::trackAvatar( const LLUUID& avatar_id, const std::string&
void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
{
+ mShowParcelInfo = false;
LLCtrlSelectionInterface *iface = childGetSelectionInterface("landmark combo");
if (!iface) return;
@@ -662,6 +776,7 @@ void LLFloaterWorldMap::trackLandmark( const LLUUID& landmark_item_id )
void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
{
+ mShowParcelInfo = false;
mTrackedStatus = LLTracker::TRACKING_LOCATION;
LLTracker::trackLocation(event_info.getGlobalPosition(), event_info.getName(), event_info.getToolTip(), LLTracker::LOCATION_EVENT);
setDefaultBtn("Teleport");
@@ -669,6 +784,7 @@ void LLFloaterWorldMap::trackEvent(const LLItemInfo &event_info)
void LLFloaterWorldMap::trackGenericItem(const LLItemInfo &item)
{
+ mShowParcelInfo = false;
mTrackedStatus = LLTracker::TRACKING_LOCATION;
LLTracker::trackLocation(item.getGlobalPosition(), item.getName(), item.getToolTip(), LLTracker::LOCATION_ITEM);
setDefaultBtn("Teleport");
@@ -721,6 +837,9 @@ void LLFloaterWorldMap::trackLocation(const LLVector3d& pos_global)
LLWorldMap::getInstance()->cancelTracking(); // The floater is taking over the tracking
LLTracker::trackLocation(pos_global, full_name, tooltip);
+ mShowParcelInfo = true;
+ requestParcelInfo(pos_global, sim_info->getGlobalOrigin());
+
LLVector3d coord_pos = LLTracker::getTrackedPositionGlobal();
updateTeleportCoordsDisplay( coord_pos );
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h
index a99100f5bd..2f2b2b7a0d 100644
--- a/indra/newview/llfloaterworldmap.h
+++ b/indra/newview/llfloaterworldmap.h
@@ -34,8 +34,9 @@
#include "llfloater.h"
#include "llmapimagetype.h"
-#include "lltracker.h"
+#include "llremoteparcelrequest.h"
#include "llslurl.h"
+#include "lltracker.h"
class LLCtrlListInterface;
class LLFriendObserver;
@@ -51,6 +52,21 @@ class LLSliderCtrl;
class LLSpinCtrl;
class LLSearchEditor;
+class LLWorldMapParcelInfoObserver : public LLRemoteParcelInfoObserver
+{
+public:
+ LLWorldMapParcelInfoObserver(const LLVector3d& pos_global);
+ ~LLWorldMapParcelInfoObserver();
+
+ void processParcelInfo(const LLParcelData& parcel_data);
+ void setParcelID(const LLUUID& parcel_id);
+ void setErrorStatus(S32 status, const std::string& reason);
+
+protected:
+ LLVector3d mPosGlobal;
+ LLUUID mParcelID;
+};
+
class LLFloaterWorldMap : public LLFloater
{
public:
@@ -119,6 +135,8 @@ public:
//Slapp instigated avatar tracking
void avatarTrackFromSlapp( const LLUUID& id );
+ void processParcelInfo(const LLParcelData& parcel_data, const LLVector3d& pos_global) const;
+
protected:
void onGoHome();
@@ -169,8 +187,13 @@ private:
// enable/disable teleport destination coordinates
void enableTeleportCoordsDisplay( bool enabled );
- std::vector<LLUUID> mLandmarkAssetIDList;
- std::vector<LLUUID> mLandmarkItemIDList;
+ void requestParcelInfo(const LLVector3d& pos_global, const LLVector3d& region_origin);
+ LLVector3d mRequestedGlobalPos;
+ bool mShowParcelInfo;
+ LLWorldMapParcelInfoObserver* mParcelInfoObserver;
+
+ uuid_vec_t mLandmarkAssetIDList;
+ uuid_vec_t mLandmarkItemIDList;
static const LLUUID sHomeID;
diff --git a/indra/newview/llhudnametag.cpp b/indra/newview/llhudnametag.cpp
index 4011a857e5..205089c662 100644
--- a/indra/newview/llhudnametag.cpp
+++ b/indra/newview/llhudnametag.cpp
@@ -279,8 +279,10 @@ void LLHUDNameTag::renderText(bool for_select)
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
// *TODO: make this a per-text setting
- LLColor4 bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
- bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
+ static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
+ static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("NameTagBackground");
+ LLColor4 bg_color = nametag_bg_color;
+ bg_color.setAlpha(bubble_opacity * alpha_factor);
// scale screen size of borders down
//RN: for now, text on hud objects is never occluded
@@ -340,8 +342,7 @@ void LLHUDNameTag::renderText(bool for_select)
x_offset = -0.5f * mWidth + (HORIZONTAL_PADDING / 2.f);
}
- LLColor4 label_color(0.f, 0.f, 0.f, 1.f);
- label_color.mV[VALPHA] = alpha_factor;
+ LLColor4 label_color(0.f, 0.f, 0.f, alpha_factor);
hud_render_text(segment_iter->getText(), render_position, *fontp, segment_iter->mStyle, LLFontGL::NO_SHADOW, x_offset, y_offset, label_color, false);
}
}
diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp
index 35bcf65db6..fd0d8b696f 100644
--- a/indra/newview/llhudtext.cpp
+++ b/indra/newview/llhudtext.cpp
@@ -138,8 +138,10 @@ void LLHUDText::renderText()
mOffsetY = lltrunc(mHeight * ((mVertAlignment == ALIGN_VERT_CENTER) ? 0.5f : 1.f));
// *TODO: make this a per-text setting
- LLColor4 bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
- bg_color.setAlpha(gSavedSettings.getF32("ChatBubbleOpacity") * alpha_factor);
+ static LLCachedControl<F32> bubble_opacity(gSavedSettings, "ChatBubbleOpacity");
+ static LLUIColor nametag_bg_color = LLUIColorTable::instance().getColor("ObjectBubbleColor");
+ LLColor4 bg_color = nametag_bg_color;
+ bg_color.setAlpha(bubble_opacity * alpha_factor);
const S32 border_height = 16;
const S32 border_width = 16;
diff --git a/indra/newview/llinventorygallery.cpp b/indra/newview/llinventorygallery.cpp
index 98b3707457..9e6cf7ac73 100644
--- a/indra/newview/llinventorygallery.cpp
+++ b/indra/newview/llinventorygallery.cpp
@@ -221,9 +221,10 @@ void LLInventoryGallery::setRootFolder(const LLUUID cat_id)
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
@@ -348,7 +349,7 @@ void LLInventoryGallery::initGallery()
mScrollPanel->addChild(mGalleryPanel);
for (int i = 0; i < n; i++)
{
- addToGallery(mItemMap[cats[i]]);
+ addToGallery(getItem(cats[i]));
}
reArrangeRows();
mGalleryCreated = true;
@@ -656,6 +657,16 @@ LLInventoryGalleryItem* LLInventoryGallery::buildGalleryItem(std::string name, L
return gitem;
}
+LLInventoryGalleryItem* LLInventoryGallery::getItem(const LLUUID& id) const
+{
+ auto it = mItemMap.find(id);
+ if (it != mItemMap.end())
+ {
+ return it->second;
+ }
+ return nullptr;
+}
+
void LLInventoryGallery::buildGalleryPanel(int row_count)
{
LLPanel::Params params;
@@ -1006,14 +1017,15 @@ void LLInventoryGallery::updateItemThumbnail(LLUUID item_id)
thumbnail_id = getOutfitImageID(item_id);
}
- if (mItemMap[item_id])
+ LLInventoryGalleryItem* item = getItem(item_id);
+ if (item)
{
- mItemMap[item_id]->setLoadImmediately(mLoadThumbnailsImmediately);
- mItemMap[item_id]->setThumbnail(thumbnail_id);
+ item->setLoadImmediately(mLoadThumbnailsImmediately);
+ item->setThumbnail(thumbnail_id);
- bool passes_filter = checkAgainstFilters(mItemMap[item_id], mFilterSubString);
- if((mItemMap[item_id]->isHidden() && passes_filter)
- || (!mItemMap[item_id]->isHidden() && !passes_filter))
+ bool passes_filter = checkAgainstFilters(item, mFilterSubString);
+ if((item->isHidden() && passes_filter)
+ || (!item->isHidden() && !passes_filter))
{
reArrangeRows();
}
@@ -1169,7 +1181,7 @@ void LLInventoryGallery::moveUp(MASK mask)
if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
{
- LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+ LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
if (item)
{
if (mask == MASK_NONE || mask == MASK_CONTROL)
@@ -1214,7 +1226,7 @@ void LLInventoryGallery::moveDown(MASK mask)
if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
{
- LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+ LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
if (item)
{
if (mask == MASK_NONE || mask == MASK_CONTROL)
@@ -1259,11 +1271,7 @@ void LLInventoryGallery::moveLeft(MASK mask)
if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
{
- LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
- if (mask == MASK_SHIFT)
- {
- item = mItemMap[mLastInteractedUUID];
- }
+ LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
if (item)
{
// Might be better to get item from panel
@@ -1307,7 +1315,7 @@ void LLInventoryGallery::moveRight(MASK mask)
if (mInventoryGalleryMenu && mSelectedItemIDs.size() > 0 && mItemsAddedCount > 1)
{
- LLInventoryGalleryItem* item = mItemMap[mLastInteractedUUID];
+ LLInventoryGalleryItem* item = getItem(mLastInteractedUUID);
if (item)
{
S32 n = mItemIndexMap[item];
@@ -1373,8 +1381,8 @@ void LLInventoryGallery::toggleSelectionRangeFromLast(const LLUUID target)
{
return;
}
- LLInventoryGalleryItem* last_item = mItemMap[mLastInteractedUUID];
- LLInventoryGalleryItem* next_item = mItemMap[target];
+ LLInventoryGalleryItem* last_item = getItem(mLastInteractedUUID);
+ LLInventoryGalleryItem* next_item = getItem(target);
if (last_item && next_item)
{
S32 last_idx = mItemIndexMap[last_item];
@@ -1417,9 +1425,10 @@ void LLInventoryGallery::onFocusLost()
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
}
@@ -1435,9 +1444,10 @@ void LLInventoryGallery::onFocusReceived()
LLInventoryGalleryItem* focus_item = NULL;
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id] && !mItemMap[id]->isHidden())
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item && !item->isHidden())
{
- focus_item = mItemMap[id];
+ focus_item = item;
focus_item->setSelected(true);
}
}
@@ -1478,9 +1488,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
{
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -1499,9 +1510,10 @@ void LLInventoryGallery::changeItemSelection(const LLUUID& item_id, bool scroll_
return;
}
- if (mItemMap[item_id])
+ LLInventoryGalleryItem* item = getItem(item_id);
+ if (item)
{
- mItemMap[item_id]->setSelected(true);
+ item->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1527,9 +1539,10 @@ void LLInventoryGallery::addItemSelection(const LLUUID& item_id, bool scroll_to_
return;
}
- if (mItemMap[item_id])
+ LLInventoryGalleryItem* item = getItem(item_id);
+ if (item)
{
- mItemMap[item_id]->setSelected(true);
+ item->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1552,18 +1565,20 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
selection_deque::iterator found = std::find(mSelectedItemIDs.begin(), mSelectedItemIDs.end(), item_id);
if (found != mSelectedItemIDs.end())
{
- if (mItemMap[item_id])
+ LLInventoryGalleryItem* item = getItem(item_id);
+ if (item)
{
- mItemMap[item_id]->setSelected(false);
+ item->setSelected(false);
}
mSelectedItemIDs.erase(found);
result = false;
}
else
{
- if (mItemMap[item_id])
+ LLInventoryGalleryItem* item = getItem(item_id);
+ if (item)
{
- mItemMap[item_id]->setSelected(true);
+ item->setSelected(true);
}
mSelectedItemIDs.push_back(item_id);
signalSelectionItemID(item_id);
@@ -1580,7 +1595,7 @@ bool LLInventoryGallery::toggleItemSelection(const LLUUID& item_id, bool scroll_
void LLInventoryGallery::scrollToShowItem(const LLUUID& item_id)
{
- LLInventoryGalleryItem* item = mItemMap[item_id];
+ LLInventoryGalleryItem* item = getItem(item_id);
if(item)
{
const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect();
@@ -1610,7 +1625,7 @@ LLInventoryGalleryItem* LLInventoryGallery::getFirstSelectedItem()
if (mSelectedItemIDs.size() > 0)
{
selection_deque::iterator iter = mSelectedItemIDs.begin();
- return mItemMap[*iter];
+ return getItem(*iter);
}
return NULL;
}
@@ -1768,9 +1783,10 @@ void LLInventoryGallery::paste()
{
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -2108,9 +2124,10 @@ void LLInventoryGallery::pasteAsLink()
{
for (const LLUUID& id : mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
mSelectedItemIDs.clear();
@@ -2433,10 +2450,10 @@ void LLInventoryGallery::onGesturesChanged()
void LLInventoryGallery::deselectItem(const LLUUID& category_id)
{
// Reset selection if the item is selected.
- LLInventoryGalleryItem* item = mItemMap[category_id];
+ LLInventoryGalleryItem* item = getItem(category_id);
if (item && item->isSelected())
{
- mItemMap[category_id]->setSelected(false);
+ item->setSelected(false);
setFocus(true);
// Todo: support multiselect
// signalSelectionItemID(LLUUID::null);
@@ -2453,9 +2470,10 @@ void LLInventoryGallery::clearSelection()
{
for (const LLUUID& id: mSelectedItemIDs)
{
- if (mItemMap[id])
+ LLInventoryGalleryItem* item = getItem(id);
+ if (item)
{
- mItemMap[id]->setSelected(false);
+ item->setSelected(false);
}
}
if (!mSelectedItemIDs.empty())
@@ -2863,11 +2881,13 @@ void LLInventoryGalleryItem::draw()
LLPanel::draw();
// Draw border
- LLUIColor border_color = LLUIColorTable::instance().getColor(mSelected ? "MenuItemHighlightBgColor" : "TextFgTentativeColor", LLColor4::white);
+ static LLUIColor menu_highlighted_color = LLUIColorTable::instance().getColor("MenuItemHighlightBgColor", LLColor4::white);;
+ static LLUIColor text_fg_tentative_color = LLUIColorTable::instance().getColor("TextFgTentativeColor", LLColor4::white);;
+ const LLColor4& border_color = mSelected ? menu_highlighted_color : text_fg_tentative_color;
LLRect border = mThumbnailCtrl->getRect();
border.mRight = border.mRight + 1;
border.mTop = border.mTop + 1;
- gl_rect_2d(border, border_color.get(), false);
+ gl_rect_2d(border, border_color, false);
}
}
diff --git a/indra/newview/llinventorygallery.h b/indra/newview/llinventorygallery.h
index afc7bdc9f8..59d08d19ed 100644
--- a/indra/newview/llinventorygallery.h
+++ b/indra/newview/llinventorygallery.h
@@ -228,6 +228,7 @@ private:
void updateGalleryWidth();
LLInventoryGalleryItem* buildGalleryItem(std::string name, LLUUID item_id, LLAssetType::EType type, LLUUID thumbnail_id, LLInventoryType::EType inventory_type, U32 flags, time_t creation_date, bool is_link, bool is_worn);
+ LLInventoryGalleryItem* getItem(const LLUUID& id) const;
void buildGalleryPanel(int row_count);
void reshapeGalleryPanel(int row_count);
diff --git a/indra/newview/lllocalbitmaps.cpp b/indra/newview/lllocalbitmaps.cpp
index 0e2b3cb409..31c9eb8966 100644
--- a/indra/newview/lllocalbitmaps.cpp
+++ b/indra/newview/lllocalbitmaps.cpp
@@ -670,15 +670,16 @@ void LLLocalBitmap::updateGLTFMaterials(LLUUID old_id, LLUUID new_id)
if (override_mat)
{
// do not create a new material, reuse existing pointer
- LLFetchedGLTFMaterial* render_mat = (LLFetchedGLTFMaterial*)entry->getGLTFRenderMaterial();
+ LLFetchedGLTFMaterial* render_mat = dynamic_cast<LLFetchedGLTFMaterial*>(entry->getGLTFRenderMaterial());
if (render_mat)
{
- llassert(dynamic_cast<LLFetchedGLTFMaterial*>(entry->getGLTFRenderMaterial()) != nullptr);
- {
*render_mat = *fetched_mat;
- }
render_mat->applyOverride(*override_mat);
}
+ else
+ {
+ LL_WARNS_ONCE() << "Failed to apply local material override, render material not found" << LL_ENDL;
+ }
}
}
}
diff --git a/indra/newview/llmanip.cpp b/indra/newview/llmanip.cpp
index 0c82db1011..0d617753c8 100644
--- a/indra/newview/llmanip.cpp
+++ b/indra/newview/llmanip.cpp
@@ -594,9 +594,9 @@ void LLManip::renderTickValue(const LLVector3& pos, F32 value, const std::string
LLColor4 LLManip::setupSnapGuideRenderPass(S32 pass)
{
- static LLColor4 grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
- static LLColor4 grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
- static LLColor4 grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
+ static LLUIColor grid_color_fg = LLUIColorTable::instance().getColor("GridlineColor");
+ static LLUIColor grid_color_bg = LLUIColorTable::instance().getColor("GridlineBGColor");
+ static LLUIColor grid_color_shadow = LLUIColorTable::instance().getColor("GridlineShadowColor");
LLColor4 line_color;
F32 line_alpha = gSavedSettings.getF32("GridOpacity");
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 4c5cc37766..349df11f35 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2363,10 +2363,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
// We want to be able to allow more than 8 materials...
//
- S32 end = llmin((S32)instance.mMaterial.size(), instance.mModel->getNumVolumeFaces()) ;
+ S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), instance.mModel->getNumVolumeFaces()) ;
for (S32 face_num = 0; face_num < end; face_num++)
{
+ // multiple faces can reuse the same material
LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]];
LLSD face_entry = LLSD::emptyMap();
diff --git a/indra/newview/lloutfitgallery.cpp b/indra/newview/lloutfitgallery.cpp
index 7482890d1e..d7df9ceadc 100644
--- a/indra/newview/lloutfitgallery.cpp
+++ b/indra/newview/lloutfitgallery.cpp
@@ -128,7 +128,7 @@ void LLOutfitGallery::onOpen(const LLSD& info)
mScrollPanel->addChild(mGalleryPanel);
for (int i = 0; i < n; i++)
{
- addToGallery(mOutfitMap[cats[i]]);
+ addToGallery(getItem(cats[i]));
}
reArrangeRows();
mGalleryCreated = true;
@@ -377,7 +377,7 @@ void LLOutfitGallery::onOutfitsRemovalConfirmation(const LLSD& notification, con
void LLOutfitGallery::scrollToShowItem(const LLUUID& item_id)
{
- LLOutfitGalleryItem* item = mOutfitMap[item_id];
+ LLOutfitGalleryItem* item = getItem(item_id);
if (item)
{
const LLRect visible_content_rect = mScrollPanel->getVisibleContentRect();
@@ -525,6 +525,10 @@ LLPanel* LLOutfitGallery::addToRow(LLPanel* row_stack, LLOutfitGalleryItem* item
void LLOutfitGallery::addToGallery(LLOutfitGalleryItem* item)
{
+ if (!item)
+ {
+ return;
+ }
if(item->isHidden())
{
mHiddenItems.push_back(item);
@@ -632,9 +636,19 @@ LLOutfitGalleryItem* LLOutfitGallery::buildGalleryItem(std::string name, LLUUID
return gitem;
}
-LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem()
+LLOutfitGalleryItem* LLOutfitGallery::getSelectedItem() const
+{
+ return getItem(mSelectedOutfitUUID);
+}
+
+LLOutfitGalleryItem* LLOutfitGallery::getItem(const LLUUID& id) const
{
- return mOutfitMap[mSelectedOutfitUUID];
+ auto it = mOutfitMap.find(id);
+ if (it != mOutfitMap.end())
+ {
+ return it->second;
+ }
+ return nullptr;
}
void LLOutfitGallery::buildGalleryPanel(int row_count)
@@ -1006,8 +1020,8 @@ void LLOutfitGalleryItem::setOutfitWorn(bool value)
LLStringUtil::format_map_t worn_string_args;
std::string worn_string = getString("worn_string", worn_string_args);
LLUIColor text_color = LLUIColorTable::instance().getColor("White", LLColor4::white);
- mOutfitWornText->setReadOnlyColor(text_color.get());
- mOutfitNameText->setReadOnlyColor(text_color.get());
+ mOutfitWornText->setReadOnlyColor(text_color);
+ mOutfitNameText->setReadOnlyColor(text_color);
mOutfitWornText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
mOutfitNameText->setFont(value ? LLFontGL::getFontSansSerifBold() : LLFontGL::getFontSansSerifSmall());
mOutfitWornText->setValue(value ? worn_string : "");
@@ -1275,7 +1289,15 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
}
if (asset_id.notNull())
{
- photo_loaded |= mOutfitMap[category_id]->setImageAssetId(asset_id);
+ LLOutfitGalleryItem* item = getItem(category_id);
+ if (item)
+ {
+ photo_loaded |= item->setImageAssetId(asset_id);
+ }
+ else
+ {
+ photo_loaded = true;
+ }
// Rename links
if (!mOutfitRenamePending.isNull() && mOutfitRenamePending.asString() == item_name)
{
@@ -1301,13 +1323,21 @@ void LLOutfitGallery::refreshOutfit(const LLUUID& category_id)
}
if (!photo_loaded)
{
- mOutfitMap[category_id]->setDefaultImage();
+ LLOutfitGalleryItem* item = getItem(category_id);
+ if (item)
+ {
+ item->setDefaultImage();
+ }
}
}
}
else
{
- mOutfitMap[category_id]->setImageAssetId(asset_id);
+ LLOutfitGalleryItem* item = getItem(category_id);
+ if (item)
+ {
+ item->setImageAssetId(asset_id);
+ }
}
}
diff --git a/indra/newview/lloutfitgallery.h b/indra/newview/lloutfitgallery.h
index 5b2a33d0ca..fa441ff209 100644
--- a/indra/newview/lloutfitgallery.h
+++ b/indra/newview/lloutfitgallery.h
@@ -135,7 +135,8 @@ private:
void updateGalleryWidth();
LLOutfitGalleryItem* buildGalleryItem(std::string name, LLUUID outfit_id);
- LLOutfitGalleryItem* getSelectedItem();
+ LLOutfitGalleryItem* getSelectedItem() const;
+ LLOutfitGalleryItem* getItem(const LLUUID& id) const;
void onTextureSelectionChanged(LLInventoryItem* itemp);
diff --git a/indra/newview/lloutputmonitorctrl.cpp b/indra/newview/lloutputmonitorctrl.cpp
index e6421d8a41..488bd87272 100644
--- a/indra/newview/lloutputmonitorctrl.cpp
+++ b/indra/newview/lloutputmonitorctrl.cpp
@@ -126,29 +126,31 @@ void LLOutputMonitorCtrl::draw()
const F32 LEVEL_1 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL * 2.f / 3.f;
const F32 LEVEL_2 = LLVoiceClient::OVERDRIVEN_POWER_LEVEL;
+ LLVoiceClient* vocie_client = LLVoiceClient::getInstance();
+
if (getVisible() && mAutoUpdate && !getIsMuted() && mSpeakerId.notNull())
{
- setPower(LLVoiceClient::getInstance()->getCurrentPower(mSpeakerId));
+ setPower(vocie_client->getCurrentPower(mSpeakerId));
if(mIsAgentControl)
{
- setIsTalking(LLVoiceClient::getInstance()->getUserPTTState());
+ setIsTalking(vocie_client->getUserPTTState());
}
else
{
- setIsTalking(LLVoiceClient::getInstance()->getIsSpeaking(mSpeakerId));
+ setIsTalking(vocie_client->getIsSpeaking(mSpeakerId));
}
}
if ((mPower == 0.f && !mIsTalking) && mShowParticipantsSpeaking)
{
std::set<LLUUID> participant_uuids;
- LLVoiceClient::instance().getParticipantList(participant_uuids);
+ vocie_client->getParticipantList(participant_uuids);
std::set<LLUUID>::const_iterator part_it = participant_uuids.begin();
F32 power = 0;
for (; part_it != participant_uuids.end(); ++part_it)
{
- power = LLVoiceClient::instance().getCurrentPower(*part_it);
+ power = vocie_client->getCurrentPower(*part_it);
if (power)
{
mPower = power;
diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index 0afe967839..544b6fbc9c 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -117,26 +117,23 @@ const S32 PBRTYPE_METALLIC_ROUGHNESS = 2; // PBR Metallic
const S32 PBRTYPE_EMISSIVE = 3; // PBR Emissive
const S32 PBRTYPE_NORMAL = 4; // PBR Normal
-LLGLTFMaterial::TextureInfo texture_info_from_pbrtype(S32 pbr_type)
+LLGLTFMaterial::TextureInfo LLPanelFace::getPBRTextureInfo()
{
- switch (pbr_type)
+ // Radiogroup [ "Complete material", "Base color", "Metallic/roughness", "Emissive", "Normal" ]
+ S32 radio_group_index = mRadioPbrType->getSelectedIndex();
+ switch (radio_group_index)
{
case PBRTYPE_BASE_COLOR:
return LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
- break;
case PBRTYPE_NORMAL:
return LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL;
- break;
case PBRTYPE_METALLIC_ROUGHNESS:
return LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS;
- break;
case PBRTYPE_EMISSIVE:
return LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE;
- break;
- default:
- return LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
- break;
}
+ // The default value is used as a fallback
+ return LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
}
void LLPanelFace::updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func)
@@ -195,265 +192,250 @@ std::string USE_TEXTURE;
LLRender::eTexIndex LLPanelFace::getTextureChannelToEdit()
{
- LLRender::eTexIndex channel_to_edit = LLRender::DIFFUSE_MAP;
- if (mComboMatMedia)
+ S32 matmedia_selection = mComboMatMedia->getCurrentIndex();
+ switch (matmedia_selection)
{
- U32 matmedia_selection = mComboMatMedia->getCurrentIndex();
- if (matmedia_selection == MATMEDIA_MATERIAL)
- {
- channel_to_edit = (LLRender::eTexIndex)mRadioMaterialType->getSelectedIndex();
- }
- if (matmedia_selection == MATMEDIA_PBR)
- {
- channel_to_edit = (LLRender::eTexIndex)mRadioPbrType->getSelectedIndex();
- }
+ case MATMEDIA_MATERIAL:
+ return getMatTextureChannel();
+ case MATMEDIA_PBR:
+ return getPBRTextureChannel();
}
+ return (LLRender::eTexIndex)0;
+}
- channel_to_edit = (channel_to_edit == LLRender::NORMAL_MAP) ? (getCurrentNormalMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
- channel_to_edit = (channel_to_edit == LLRender::SPECULAR_MAP) ? (getCurrentSpecularMap().isNull() ? LLRender::DIFFUSE_MAP : channel_to_edit) : channel_to_edit;
- return channel_to_edit;
+LLRender::eTexIndex LLPanelFace::getMatTextureChannel()
+{
+ // Radiogroup [ "Texture (diffuse)", "Bumpiness (normal)", "Shininess (specular)" ]
+ S32 radio_group_index = mRadioMaterialType->getSelectedIndex();
+ switch (radio_group_index)
+ {
+ case MATTYPE_DIFFUSE: // "Texture (diffuse)"
+ return LLRender::DIFFUSE_MAP;
+ case MATTYPE_NORMAL: // "Bumpiness (normal)"
+ if (getCurrentNormalMap().notNull())
+ return LLRender::NORMAL_MAP;
+ break;
+ case MATTYPE_SPECULAR: // "Shininess (specular)"
+ if (getCurrentNormalMap().notNull())
+ return LLRender::SPECULAR_MAP;
+ break;
+ }
+ // The default value is used as a fallback if no required texture is chosen
+ return (LLRender::eTexIndex)0;
+}
+
+LLRender::eTexIndex LLPanelFace::getPBRTextureChannel()
+{
+ // Radiogroup [ "Complete material", "Base color", "Metallic/roughness", "Emissive", "Normal" ]
+ S32 radio_group_index = mRadioPbrType->getSelectedIndex();
+ switch (radio_group_index)
+ {
+ case PBRTYPE_RENDER_MATERIAL_ID: // "Complete material"
+ return LLRender::NUM_TEXTURE_CHANNELS;
+ case PBRTYPE_BASE_COLOR: // "Base color"
+ return LLRender::BASECOLOR_MAP;
+ case PBRTYPE_METALLIC_ROUGHNESS: // "Metallic/roughness"
+ return LLRender::METALLIC_ROUGHNESS_MAP;
+ case PBRTYPE_EMISSIVE: // "Emissive"
+ return LLRender::EMISSIVE_MAP;
+ case PBRTYPE_NORMAL: // "Normal"
+ return LLRender::GLTF_NORMAL_MAP;
+ }
+ // The default value is used as a fallback
+ return LLRender::NUM_TEXTURE_CHANNELS;
}
LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
{
- if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)
+ if (mComboMatMedia->getCurrentIndex() == MATMEDIA_MATERIAL)
{
- return LLRender::eTexIndex(mRadioMaterialType->getSelectedIndex());
+ return getMatTextureChannel();
}
- return LLRender::eTexIndex(MATTYPE_DIFFUSE);
+ return (LLRender::eTexIndex)0;
}
LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
{
- if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
+ if (mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
{
- return texture_info_from_pbrtype(mRadioPbrType->getSelectedIndex());
+ return getPBRTextureInfo();
}
- return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
+ return (LLGLTFMaterial::TextureInfo)0;
}
// Things the UI provides...
//
-LLUUID LLPanelFace::getCurrentNormalMap() { return mBumpyTextureCtrl->getImageAssetID(); }
-LLUUID LLPanelFace::getCurrentSpecularMap() { return mShinyTextureCtrl->getImageAssetID(); }
-U32 LLPanelFace::getCurrentShininess() { return getChild<LLComboBox>("combobox shininess")->getCurrentIndex(); }
-U32 LLPanelFace::getCurrentBumpiness() { return getChild<LLComboBox>("combobox bumpiness")->getCurrentIndex(); }
-U8 LLPanelFace::getCurrentDiffuseAlphaMode() { return (U8)getChild<LLComboBox>("combobox alphamode")->getCurrentIndex(); }
-U8 LLPanelFace::getCurrentAlphaMaskCutoff() { return (U8)getChild<LLUICtrl>("maskcutoff")->getValue().asInteger(); }
-U8 LLPanelFace::getCurrentEnvIntensity() { return (U8)getChild<LLUICtrl>("environment")->getValue().asInteger(); }
-U8 LLPanelFace::getCurrentGlossiness() { return (U8)getChild<LLUICtrl>("glossiness")->getValue().asInteger(); }
-F32 LLPanelFace::getCurrentBumpyRot() { return (F32)getChild<LLUICtrl>("bumpyRot")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentBumpyScaleU() { return (F32)getChild<LLUICtrl>("bumpyScaleU")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentBumpyScaleV() { return (F32)getChild<LLUICtrl>("bumpyScaleV")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentBumpyOffsetU() { return (F32)getChild<LLUICtrl>("bumpyOffsetU")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentBumpyOffsetV() { return (F32)getChild<LLUICtrl>("bumpyOffsetV")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentShinyRot() { return (F32)getChild<LLUICtrl>("shinyRot")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentShinyScaleU() { return (F32)getChild<LLUICtrl>("shinyScaleU")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentShinyScaleV() { return (F32)getChild<LLUICtrl>("shinyScaleV")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentShinyOffsetU() { return (F32)getChild<LLUICtrl>("shinyOffsetU")->getValue().asReal(); }
-F32 LLPanelFace::getCurrentShinyOffsetV() { return (F32)getChild<LLUICtrl>("shinyOffsetV")->getValue().asReal(); }
+LLUUID LLPanelFace::getCurrentNormalMap() { return mBumpyTextureCtrl->getImageAssetID(); }
+LLUUID LLPanelFace::getCurrentSpecularMap() { return mShinyTextureCtrl->getImageAssetID(); }
+U32 LLPanelFace::getCurrentShininess() { return mComboShininess->getCurrentIndex(); }
+U32 LLPanelFace::getCurrentBumpiness() { return mComboBumpiness->getCurrentIndex(); }
+U8 LLPanelFace::getCurrentDiffuseAlphaMode() { return (U8)mComboAlphaMode->getCurrentIndex(); }
+U8 LLPanelFace::getCurrentAlphaMaskCutoff() { return (U8)mMaskCutoff->getValue().asInteger(); }
+U8 LLPanelFace::getCurrentEnvIntensity() { return (U8)mEnvironment->getValue().asInteger(); }
+U8 LLPanelFace::getCurrentGlossiness() { return (U8)mGlossiness->getValue().asInteger(); }
+F32 LLPanelFace::getCurrentBumpyRot() { return (F32)mBumpyRotate->getValue().asReal(); }
+F32 LLPanelFace::getCurrentBumpyScaleU() { return (F32)mBumpyScaleU->getValue().asReal(); }
+F32 LLPanelFace::getCurrentBumpyScaleV() { return (F32)mBumpyScaleV->getValue().asReal(); }
+F32 LLPanelFace::getCurrentBumpyOffsetU() { return (F32)mBumpyOffsetU->getValue().asReal(); }
+F32 LLPanelFace::getCurrentBumpyOffsetV() { return (F32)mBumpyOffsetV->getValue().asReal(); }
+F32 LLPanelFace::getCurrentShinyRot() { return (F32)mShinyRotate->getValue().asReal(); }
+F32 LLPanelFace::getCurrentShinyScaleU() { return (F32)mShinyScaleU->getValue().asReal(); }
+F32 LLPanelFace::getCurrentShinyScaleV() { return (F32)mShinyScaleV->getValue().asReal(); }
+F32 LLPanelFace::getCurrentShinyOffsetU() { return (F32)mShinyOffsetU->getValue().asReal(); }
+F32 LLPanelFace::getCurrentShinyOffsetV() { return (F32)mShinyOffsetV->getValue().asReal(); }
//
// Methods
//
-bool LLPanelFace::postBuild()
-{
- childSetCommitCallback("combobox shininess",&LLPanelFace::onCommitShiny,this);
- childSetCommitCallback("combobox bumpiness",&LLPanelFace::onCommitBump,this);
- childSetCommitCallback("combobox alphamode",&LLPanelFace::onCommitAlphaMode,this);
- childSetCommitCallback("TexScaleU",&LLPanelFace::onCommitTextureScaleX, this);
- childSetCommitCallback("TexScaleV",&LLPanelFace::onCommitTextureScaleY, this);
- childSetCommitCallback("TexRot",&LLPanelFace::onCommitTextureRot, this);
- childSetCommitCallback("rptctrl",&LLPanelFace::onCommitRepeatsPerMeter, this);
- childSetCommitCallback("checkbox planar align",&LLPanelFace::onCommitPlanarAlign, this);
- childSetCommitCallback("TexOffsetU",LLPanelFace::onCommitTextureOffsetX, this);
- childSetCommitCallback("TexOffsetV",LLPanelFace::onCommitTextureOffsetY, this);
-
- childSetCommitCallback("bumpyScaleU",&LLPanelFace::onCommitMaterialBumpyScaleX, this);
- childSetCommitCallback("bumpyScaleV",&LLPanelFace::onCommitMaterialBumpyScaleY, this);
- childSetCommitCallback("bumpyRot",&LLPanelFace::onCommitMaterialBumpyRot, this);
- childSetCommitCallback("bumpyOffsetU",&LLPanelFace::onCommitMaterialBumpyOffsetX, this);
- childSetCommitCallback("bumpyOffsetV",&LLPanelFace::onCommitMaterialBumpyOffsetY, this);
- childSetCommitCallback("shinyScaleU",&LLPanelFace::onCommitMaterialShinyScaleX, this);
- childSetCommitCallback("shinyScaleV",&LLPanelFace::onCommitMaterialShinyScaleY, this);
- childSetCommitCallback("shinyRot",&LLPanelFace::onCommitMaterialShinyRot, this);
- childSetCommitCallback("shinyOffsetU",&LLPanelFace::onCommitMaterialShinyOffsetX, this);
- childSetCommitCallback("shinyOffsetV",&LLPanelFace::onCommitMaterialShinyOffsetY, this);
- childSetCommitCallback("glossiness",&LLPanelFace::onCommitMaterialGloss, this);
- childSetCommitCallback("environment",&LLPanelFace::onCommitMaterialEnv, this);
- childSetCommitCallback("maskcutoff",&LLPanelFace::onCommitMaterialMaskCutoff, this);
- childSetCommitCallback("add_media", &LLPanelFace::onClickBtnAddMedia, this);
- childSetCommitCallback("delete_media", &LLPanelFace::onClickBtnDeleteMedia, this);
-
- getChild<LLUICtrl>("gltfTextureScaleU")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureScaleU, this, _1), nullptr);
- getChild<LLUICtrl>("gltfTextureScaleV")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureScaleV, this, _1), nullptr);
- getChild<LLUICtrl>("gltfTextureRotation")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFRotation, this, _1), nullptr);
- getChild<LLUICtrl>("gltfTextureOffsetU")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureOffsetU, this, _1), nullptr);
- getChild<LLUICtrl>("gltfTextureOffsetV")->setCommitCallback(boost::bind(&LLPanelFace::onCommitGLTFTextureOffsetV, this, _1), nullptr);
+bool LLPanelFace::postBuild()
+{
+ getChildSetCommitCallback(mComboShininess, "combobox shininess", [&](LLUICtrl*, const LLSD&) { onCommitShiny(); });
+ getChildSetCommitCallback(mComboBumpiness, "combobox bumpiness", [&](LLUICtrl*, const LLSD&) { onCommitBump(); });
+ getChildSetCommitCallback(mComboAlphaMode, "combobox alphamode", [&](LLUICtrl*, const LLSD&) { onCommitAlphaMode(); });
+ getChildSetCommitCallback(mTexScaleU, "TexScaleU", [&](LLUICtrl*, const LLSD&) { onCommitTextureScaleX(); });
+ getChildSetCommitCallback(mTexScaleV, "TexScaleV", [&](LLUICtrl*, const LLSD&) { onCommitTextureScaleY(); });
+ getChildSetCommitCallback(mTexRotate, "TexRot", [&](LLUICtrl*, const LLSD&) { onCommitTextureRot(); });
+ getChildSetCommitCallback(mTexRepeat, "rptctrl", [&](LLUICtrl*, const LLSD&) { onCommitRepeatsPerMeter(); });
+ getChildSetCommitCallback(mPlanarAlign, "checkbox planar align", [&](LLUICtrl*, const LLSD&) { onCommitPlanarAlign(); });
+ getChildSetCommitCallback(mTexOffsetU, "TexOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitTextureOffsetX(); });
+ getChildSetCommitCallback(mTexOffsetV, "TexOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitTextureOffsetY(); });
+
+ getChildSetCommitCallback(mBumpyScaleU, "bumpyScaleU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyScaleX(); });
+ getChildSetCommitCallback(mBumpyScaleV, "bumpyScaleV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyScaleY(); });
+ getChildSetCommitCallback(mBumpyRotate, "bumpyRot", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyRot(); });
+ getChildSetCommitCallback(mBumpyOffsetU, "bumpyOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyOffsetX(); });
+ getChildSetCommitCallback(mBumpyOffsetV, "bumpyOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialBumpyOffsetY(); });
+ getChildSetCommitCallback(mShinyScaleU, "shinyScaleU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyScaleX(); });
+ getChildSetCommitCallback(mShinyScaleV, "shinyScaleV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyScaleY(); });
+ getChildSetCommitCallback(mShinyRotate, "shinyRot", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyRot(); });
+ getChildSetCommitCallback(mShinyOffsetU, "shinyOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyOffsetX(); });
+ getChildSetCommitCallback(mShinyOffsetV, "shinyOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitMaterialShinyOffsetY(); });
+
+ getChildSetCommitCallback(mGlossiness, "glossiness", [&](LLUICtrl*, const LLSD&) { onCommitMaterialGloss(); });
+ getChildSetCommitCallback(mEnvironment, "environment", [&](LLUICtrl*, const LLSD&) { onCommitMaterialEnv(); });
+ getChildSetCommitCallback(mMaskCutoff, "maskcutoff", [&](LLUICtrl*, const LLSD&) { onCommitMaterialMaskCutoff(); });
+ getChildSetCommitCallback(mAddMedia, "add_media", [&](LLUICtrl*, const LLSD&) { onClickBtnAddMedia(); });
+ getChildSetCommitCallback(mDelMedia, "delete_media", [&](LLUICtrl*, const LLSD&) { onClickBtnDeleteMedia(); });
+
+ getChildSetCommitCallback(mPBRScaleU, "gltfTextureScaleU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleU(); });
+ getChildSetCommitCallback(mPBRScaleV, "gltfTextureScaleV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureScaleV(); });
+ getChildSetCommitCallback(mPBRRotate, "gltfTextureRotation", [&](LLUICtrl*, const LLSD&) { onCommitGLTFRotation(); });
+ getChildSetCommitCallback(mPBROffsetU, "gltfTextureOffsetU", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetU(); });
+ getChildSetCommitCallback(mPBROffsetV, "gltfTextureOffsetV", [&](LLUICtrl*, const LLSD&) { onCommitGLTFTextureOffsetV(); });
LLGLTFMaterialList::addSelectionUpdateCallback(&LLPanelFace::onMaterialOverrideReceived);
sMaterialOverrideSelection.connect();
- childSetAction("button align",&LLPanelFace::onClickAutoFix,this);
- childSetAction("button align textures", &LLPanelFace::onAlignTexture, this);
- childSetAction("pbr_from_inventory", &LLPanelFace::onClickBtnLoadInvPBR, this);
- childSetAction("edit_selected_pbr", &LLPanelFace::onClickBtnEditPBR, this);
- childSetAction("save_selected_pbr", &LLPanelFace::onClickBtnSavePBR, this);
+ getChildSetClickedCallback(mBtnAlign, "button align", [&](LLUICtrl*, const LLSD&) { onClickAutoFix(); });
+ getChildSetClickedCallback(mBtnAlignTex, "button align textures", [&](LLUICtrl*, const LLSD&) { onAlignTexture(); });
+ getChildSetClickedCallback(mBtnPbrFromInv, "pbr_from_inventory", [&](LLUICtrl*, const LLSD&) { onClickBtnLoadInvPBR(); });
+ getChildSetClickedCallback(mBtnEditBbr, "edit_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnEditPBR(); });
+ getChildSetClickedCallback(mBtnSaveBbr, "save_selected_pbr", [&](LLUICtrl*, const LLSD&) { onClickBtnSavePBR(); });
setMouseOpaque(false);
mPBRTextureCtrl = getChild<LLTextureCtrl>("pbr_control");
- if (mPBRTextureCtrl)
- {
- mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
- mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
- mPBRTextureCtrl->setCommitCallback(boost::bind(&LLPanelFace::onCommitPbr, this, _2));
- mPBRTextureCtrl->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelPbr, this, _2));
- mPBRTextureCtrl->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectPbr, this, _2));
- mPBRTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragPbr, this, _2));
- mPBRTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onPbrSelectionChanged, this, _1));
- mPBRTextureCtrl->setOnCloseCallback(boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2));
-
- mPBRTextureCtrl->setFollowsTop();
- mPBRTextureCtrl->setFollowsLeft();
- mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
- mPBRTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
- mPBRTextureCtrl->setBakeTextureEnabled(false);
- mPBRTextureCtrl->setInventoryPickType(PICK_MATERIAL);
- }
+ mPBRTextureCtrl->setDefaultImageAssetID(LLUUID::null);
+ mPBRTextureCtrl->setBlankImageAssetID(BLANK_MATERIAL_ASSET_ID);
+ mPBRTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitPbr(); });
+ mPBRTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelPbr(); });
+ mPBRTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectPbr(); });
+ mPBRTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragPbr(item); });
+ mPBRTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onPbrSelectionChanged(item); });
+ mPBRTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+ mPBRTextureCtrl->setFollowsTop();
+ mPBRTextureCtrl->setFollowsLeft();
+ mPBRTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+ mPBRTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
+ mPBRTextureCtrl->setBakeTextureEnabled(false);
+ mPBRTextureCtrl->setInventoryPickType(PICK_MATERIAL);
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
- if(mTextureCtrl)
- {
- mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
- mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
- mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
- mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
- mTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
- mTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
- mTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
-
- mTextureCtrl->setFollowsTop();
- mTextureCtrl->setFollowsLeft();
- mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
- mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
- }
+ mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
+ mTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitTexture(); });
+ mTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelTexture(); });
+ mTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectTexture(); });
+ mTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+ mTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+ mTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+ mTextureCtrl->setFollowsTop();
+ mTextureCtrl->setFollowsLeft();
+ mTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+ mTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
- if(mShinyTextureCtrl)
- {
- mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
- mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
- mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
- mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
- mShinyTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
-
- mShinyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
- mShinyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
- mShinyTextureCtrl->setFollowsTop();
- mShinyTextureCtrl->setFollowsLeft();
- mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
- mShinyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
- }
+ mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
+ mShinyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitSpecularTexture(data); });
+ mShinyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelSpecularTexture(data); });
+ mShinyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectSpecularTexture(data); });
+ mShinyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+ mShinyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+ mShinyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+ mShinyTextureCtrl->setFollowsTop();
+ mShinyTextureCtrl->setFollowsLeft();
+ mShinyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+ mShinyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
- if(mBumpyTextureCtrl)
- {
- mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
- mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
- mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
- mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
- mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
- mBumpyTextureCtrl->setOnCloseCallback( boost::bind(&LLPanelFace::onCloseTexturePicker, this, _2) );
-
- mBumpyTextureCtrl->setDragCallback(boost::bind(&LLPanelFace::onDragTexture, this, _2));
- mBumpyTextureCtrl->setOnTextureSelectedCallback(boost::bind(&LLPanelFace::onTextureSelectionChanged, this, _1));
- mBumpyTextureCtrl->setFollowsTop();
- mBumpyTextureCtrl->setFollowsLeft();
- mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
- mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
- }
+ mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
+ mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
+ mBumpyTextureCtrl->setCommitCallback([&](LLUICtrl*, const LLSD& data) { onCommitNormalTexture(data); });
+ mBumpyTextureCtrl->setOnCancelCallback([&](LLUICtrl*, const LLSD& data) { onCancelNormalTexture(data); });
+ mBumpyTextureCtrl->setOnSelectCallback([&](LLUICtrl*, const LLSD& data) { onSelectNormalTexture(data); });
+ mBumpyTextureCtrl->setDragCallback([&](LLUICtrl*, LLInventoryItem* item) { return onDragTexture(item); });
+ mBumpyTextureCtrl->setOnTextureSelectedCallback([&](LLInventoryItem* item) { onTextureSelectionChanged(item); });
+ mBumpyTextureCtrl->setOnCloseCallback([&](LLUICtrl*, const LLSD& data) { onCloseTexturePicker(data); });
+ mBumpyTextureCtrl->setFollowsTop();
+ mBumpyTextureCtrl->setFollowsLeft();
+ mBumpyTextureCtrl->setImmediateFilterPermMask(PERM_NONE);
+ mBumpyTextureCtrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
mColorSwatch = getChild<LLColorSwatchCtrl>("colorswatch");
- if(mColorSwatch)
- {
- mColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitColor, this, _2));
- mColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelColor, this, _2));
- mColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectColor, this, _2));
- mColorSwatch->setFollowsTop();
- mColorSwatch->setFollowsLeft();
- mColorSwatch->setCanApplyImmediately(true);
- }
+ mColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitColor(); });
+ mColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelColor(); });
+ mColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectColor(); });
+ mColorSwatch->setFollowsTop();
+ mColorSwatch->setFollowsLeft();
+ mColorSwatch->setCanApplyImmediately(true);
mShinyColorSwatch = getChild<LLColorSwatchCtrl>("shinycolorswatch");
- if(mShinyColorSwatch)
- {
- mShinyColorSwatch->setCommitCallback(boost::bind(&LLPanelFace::onCommitShinyColor, this, _2));
- mShinyColorSwatch->setOnCancelCallback(boost::bind(&LLPanelFace::onCancelShinyColor, this, _2));
- mShinyColorSwatch->setOnSelectCallback(boost::bind(&LLPanelFace::onSelectShinyColor, this, _2));
- mShinyColorSwatch->setFollowsTop();
- mShinyColorSwatch->setFollowsLeft();
- mShinyColorSwatch->setCanApplyImmediately(true);
- }
+ mShinyColorSwatch->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitShinyColor(); });
+ mShinyColorSwatch->setOnCancelCallback([&](LLUICtrl*, const LLSD&) { onCancelShinyColor(); });
+ mShinyColorSwatch->setOnSelectCallback([&](LLUICtrl*, const LLSD&) { onSelectShinyColor(); });
+ mShinyColorSwatch->setFollowsTop();
+ mShinyColorSwatch->setFollowsLeft();
+ mShinyColorSwatch->setCanApplyImmediately(true);
mLabelColorTransp = getChild<LLTextBox>("color trans");
- if(mLabelColorTransp)
- {
- mLabelColorTransp->setFollowsTop();
- mLabelColorTransp->setFollowsLeft();
- }
+ mLabelColorTransp->setFollowsTop();
+ mLabelColorTransp->setFollowsLeft();
mCtrlColorTransp = getChild<LLSpinCtrl>("ColorTrans");
- if(mCtrlColorTransp)
- {
- mCtrlColorTransp->setCommitCallback(boost::bind(&LLPanelFace::onCommitAlpha, this, _2));
- mCtrlColorTransp->setPrecision(0);
- mCtrlColorTransp->setFollowsTop();
- mCtrlColorTransp->setFollowsLeft();
- }
+ mCtrlColorTransp->setCommitCallback([&](LLUICtrl*, const LLSD&) { onCommitAlpha(); });
+ mCtrlColorTransp->setPrecision(0);
+ mCtrlColorTransp->setFollowsTop();
+ mCtrlColorTransp->setFollowsLeft();
- mCheckFullbright = getChild<LLCheckBoxCtrl>("checkbox fullbright");
- if (mCheckFullbright)
- {
- mCheckFullbright->setCommitCallback(LLPanelFace::onCommitFullbright, this);
- }
+ getChildSetCommitCallback(mCheckFullbright, "checkbox fullbright", [&](LLUICtrl*, const LLSD&) { onCommitFullbright(); });
- mComboTexGen = getChild<LLComboBox>("combobox texgen");
- if(mComboTexGen)
- {
- mComboTexGen->setCommitCallback(LLPanelFace::onCommitTexGen, this);
- mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
- }
+ mLabelTexGen = getChild<LLTextBox>("tex gen");
+ getChildSetCommitCallback(mComboTexGen, "combobox texgen", [&](LLUICtrl*, const LLSD&) { onCommitTexGen(); });
+ mComboTexGen->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP);
- mComboMatMedia = getChild<LLComboBox>("combobox matmedia");
- if(mComboMatMedia)
- {
- mComboMatMedia->setCommitCallback(LLPanelFace::onCommitMaterialsMedia,this);
- mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
- }
+ getChildSetCommitCallback(mComboMatMedia, "combobox matmedia", [&](LLUICtrl*, const LLSD&) { onCommitMaterialsMedia(); });
+ mComboMatMedia->selectNthItem(MATMEDIA_MATERIAL);
- mRadioMaterialType = getChild<LLRadioGroup>("radio_material_type");
- if(mRadioMaterialType)
- {
- mRadioMaterialType->setCommitCallback(LLPanelFace::onCommitMaterialType, this);
- mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
- }
+ getChildSetCommitCallback(mRadioMaterialType, "radio_material_type", [&](LLUICtrl*, const LLSD&) { onCommitMaterialType(); });
+ mRadioMaterialType->selectNthItem(MATTYPE_DIFFUSE);
- mRadioPbrType = getChild<LLRadioGroup>("radio_pbr_type");
- if (mRadioPbrType)
- {
- mRadioPbrType->setCommitCallback(LLPanelFace::onCommitPbrType, this);
- mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
- }
+ getChildSetCommitCallback(mRadioPbrType, "radio_pbr_type", [&](LLUICtrl*, const LLSD&) { onCommitPbrType(); });
+ mRadioPbrType->selectNthItem(PBRTYPE_RENDER_MATERIAL_ID);
- mCtrlGlow = getChild<LLSpinCtrl>("glow");
- if(mCtrlGlow)
- {
- mCtrlGlow->setCommitCallback(LLPanelFace::onCommitGlow, this);
- }
+ mLabelGlow = getChild<LLTextBox>("glow label");
+ getChildSetCommitCallback(mCtrlGlow, "glow", [&](LLUICtrl*, const LLSD&) { onCommitGlow(); });
mMenuClipboardColor = getChild<LLMenuButton>("clipboard_color_params_btn");
mMenuClipboardTexture = getChild<LLMenuButton>("clipboard_texture_params_btn");
@@ -461,6 +443,19 @@ bool LLPanelFace::postBuild()
mTitleMedia = getChild<LLMediaCtrl>("title_media");
mTitleMediaText = getChild<LLTextBox>("media_info");
+ mLabelBumpiness = getChild<LLTextBox>("label bumpiness");
+ mLabelShininess = getChild<LLTextBox>("label shininess");
+ mLabelAlphaMode = getChild<LLTextBox>("label alphamode");
+ mLabelGlossiness = getChild<LLTextBox>("label glossiness");
+ mLabelEnvironment = getChild<LLTextBox>("label environment");
+ mLabelMaskCutoff = getChild<LLTextBox>("label maskcutoff");
+ mLabelShiniColor = getChild<LLTextBox>("label shinycolor");
+ mLabelColor = getChild<LLTextBox>("color label");
+
+ mLabelMatPermLoading = getChild<LLTextBox>("material_permissions_loading_label");
+
+ mCheckSyncSettings = getChild<LLCheckBoxCtrl>("checkbox_sync_settings");
+
clearCtrls();
return true;
@@ -513,8 +508,7 @@ void LLPanelFace::draw()
void LLPanelFace::sendTexture()
{
- if(!mTextureCtrl) return;
- if( !mTextureCtrl->getTentative() )
+ if (!mTextureCtrl->getTentative())
{
// we grab the item id first, because we want to do a
// permissions check in the selection manager. ARGH!
@@ -534,7 +528,7 @@ void LLPanelFace::sendTexture()
void LLPanelFace::sendBump(U32 bumpiness)
{
if (bumpiness < BUMPY_TEXTURE)
-{
+ {
LL_DEBUGS("Materials") << "clearing bumptexture control" << LL_ENDL;
mBumpyTextureCtrl->clear();
mBumpyTextureCtrl->setImageAssetID(LLUUID());
@@ -544,12 +538,13 @@ void LLPanelFace::sendBump(U32 bumpiness)
LLUUID current_normal_map = mBumpyTextureCtrl->getImageAssetID();
- U8 bump = (U8) bumpiness & TEM_BUMP_MASK;
+ U8 bump = (U8)bumpiness & TEM_BUMP_MASK;
// Clear legacy bump to None when using an actual normal map
- //
if (!current_normal_map.isNull())
+ {
bump = 0;
+ }
// Set the normal map or reset it to null as appropriate
//
@@ -560,14 +555,14 @@ void LLPanelFace::sendBump(U32 bumpiness)
void LLPanelFace::sendTexGen()
{
- U8 tex_gen = (U8) mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT;
- LLSelectMgr::getInstance()->selectionSetTexGen( tex_gen );
+ U8 tex_gen = (U8)mComboTexGen->getCurrentIndex() << TEM_TEX_GEN_SHIFT;
+ LLSelectMgr::getInstance()->selectionSetTexGen(tex_gen);
}
void LLPanelFace::sendShiny(U32 shininess)
{
if (shininess < SHINY_TEXTURE)
-{
+ {
mShinyTextureCtrl->clear();
mShinyTextureCtrl->setImageAssetID(LLUUID());
}
@@ -576,47 +571,39 @@ void LLPanelFace::sendShiny(U32 shininess)
U8 shiny = (U8) shininess & TEM_SHINY_MASK;
if (!specmap.isNull())
+ {
shiny = 0;
+ }
LLSelectedTEMaterial::setSpecularID(this, specmap);
- LLSelectMgr::getInstance()->selectionSetShiny( shiny, mShinyTextureCtrl->getImageItemID() );
+ LLSelectMgr::getInstance()->selectionSetShiny(shiny, mShinyTextureCtrl->getImageItemID());
updateShinyControls(!specmap.isNull(), true);
-
}
void LLPanelFace::sendFullbright()
{
- if(!mCheckFullbright)return;
U8 fullbright = mCheckFullbright->get() ? TEM_FULLBRIGHT_MASK : 0;
- LLSelectMgr::getInstance()->selectionSetFullbright( fullbright );
+ LLSelectMgr::getInstance()->selectionSetFullbright(fullbright);
}
void LLPanelFace::sendColor()
{
- if(!mColorSwatch)return;
LLColor4 color = mColorSwatch->get();
-
- LLSelectMgr::getInstance()->selectionSetColorOnly( color );
+ LLSelectMgr::getInstance()->selectionSetColorOnly(color);
}
void LLPanelFace::sendAlpha()
{
- if(!mCtrlColorTransp)return;
F32 alpha = (100.f - mCtrlColorTransp->get()) / 100.f;
-
LLSelectMgr::getInstance()->selectionSetAlphaOnly( alpha );
}
-
void LLPanelFace::sendGlow()
{
- if (mCtrlGlow)
- {
- F32 glow = mCtrlGlow->get();
- LLSelectMgr::getInstance()->selectionSetGlow( glow );
- }
+ F32 glow = mCtrlGlow->get();
+ LLSelectMgr::getInstance()->selectionSetGlow(glow);
}
struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
@@ -624,47 +611,49 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
LLPanelFaceSetTEFunctor(LLPanelFace* panel) : mPanel(panel) {}
virtual bool apply(LLViewerObject* object, S32 te)
{
- bool valid;
- F32 value;
- std::string prefix;
+ LLSpinCtrl *ctrlTexScaleS, *ctrlTexScaleT, *ctrlTexOffsetS, *ctrlTexOffsetT, *ctrlTexRotation;
// Effectively the same as MATMEDIA_PBR sans using different radio,
// separate for the sake of clarity
- LLRadioGroup * radio_mat_type = mPanel->getChild<LLRadioGroup>("radio_material_type");
- switch (radio_mat_type->getSelectedIndex())
+ switch (mPanel->mRadioMaterialType->getSelectedIndex())
{
case MATTYPE_DIFFUSE:
- prefix = "Tex";
+ ctrlTexScaleS = mPanel->mTexScaleU;
+ ctrlTexScaleT = mPanel->mTexScaleV;
+ ctrlTexOffsetS = mPanel->mTexOffsetU;
+ ctrlTexOffsetT = mPanel->mTexOffsetV;
+ ctrlTexRotation = mPanel->mTexRotate;
break;
case MATTYPE_NORMAL:
- prefix = "bumpy";
+ ctrlTexScaleS = mPanel->mBumpyScaleU;
+ ctrlTexScaleT = mPanel->mBumpyScaleV;
+ ctrlTexOffsetS = mPanel->mBumpyOffsetU;
+ ctrlTexOffsetT = mPanel->mBumpyOffsetV;
+ ctrlTexRotation = mPanel->mBumpyRotate;
break;
case MATTYPE_SPECULAR:
- prefix = "shiny";
+ ctrlTexScaleS = mPanel->mShinyScaleU;
+ ctrlTexScaleT = mPanel->mShinyScaleV;
+ ctrlTexOffsetS = mPanel->mShinyOffsetU;
+ ctrlTexOffsetT = mPanel->mShinyOffsetV;
+ ctrlTexRotation = mPanel->mShinyRotate;
break;
+ default:
+ llassert(false);
+ return false;
}
- LLSpinCtrl * ctrlTexScaleS = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleU");
- LLSpinCtrl * ctrlTexScaleT = mPanel->getChild<LLSpinCtrl>(prefix + "ScaleV");
- LLSpinCtrl * ctrlTexOffsetS = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetU");
- LLSpinCtrl * ctrlTexOffsetT = mPanel->getChild<LLSpinCtrl>(prefix + "OffsetV");
- LLSpinCtrl * ctrlTexRotation = mPanel->getChild<LLSpinCtrl>(prefix + "Rot");
+ bool align_planar = mPanel->mPlanarAlign->get();
- LLComboBox* comboTexGen = mPanel->getChild<LLComboBox>("combobox texgen");
- LLCheckBoxCtrl* cb_planar_align = mPanel->getChild<LLCheckBoxCtrl>("checkbox planar align");
- bool align_planar = (cb_planar_align && cb_planar_align->get());
-
- llassert(comboTexGen);
llassert(object);
if (ctrlTexScaleS)
{
- valid = !ctrlTexScaleS->getTentative(); // || !checkFlipScaleS->getTentative();
+ bool valid = !ctrlTexScaleS->getTentative(); // || !checkFlipScaleS->getTentative();
if (valid || align_planar)
{
- value = ctrlTexScaleS->get();
- if (comboTexGen &&
- comboTexGen->getCurrentIndex() == 1)
+ F32 value = ctrlTexScaleS->get();
+ if (mPanel->mComboTexGen->getCurrentIndex() == 1)
{
value *= 0.5f;
}
@@ -680,20 +669,19 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (ctrlTexScaleT)
{
- valid = !ctrlTexScaleT->getTentative(); // || !checkFlipScaleT->getTentative();
+ bool valid = !ctrlTexScaleT->getTentative(); // || !checkFlipScaleT->getTentative();
if (valid || align_planar)
{
- value = ctrlTexScaleT->get();
- //if( checkFlipScaleT->get() )
+ F32 value = ctrlTexScaleT->get();
+ //if (checkFlipScaleT->get())
//{
// value = -value;
//}
- if (comboTexGen &&
- comboTexGen->getCurrentIndex() == 1)
+ if (mPanel->mComboTexGen->getCurrentIndex() == 1)
{
value *= 0.5f;
}
- object->setTEScaleT( te, value );
+ object->setTEScaleT(te, value);
if (align_planar)
{
@@ -705,11 +693,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (ctrlTexOffsetS)
{
- valid = !ctrlTexOffsetS->getTentative();
+ bool valid = !ctrlTexOffsetS->getTentative();
if (valid || align_planar)
{
- value = ctrlTexOffsetS->get();
- object->setTEOffsetS( te, value );
+ F32 value = ctrlTexOffsetS->get();
+ object->setTEOffsetS(te, value);
if (align_planar)
{
@@ -721,11 +709,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (ctrlTexOffsetT)
{
- valid = !ctrlTexOffsetT->getTentative();
+ bool valid = !ctrlTexOffsetT->getTentative();
if (valid || align_planar)
{
- value = ctrlTexOffsetT->get();
- object->setTEOffsetT( te, value );
+ F32 value = ctrlTexOffsetT->get();
+ object->setTEOffsetT(te, value);
if (align_planar)
{
@@ -737,11 +725,11 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
if (ctrlTexRotation)
{
- valid = !ctrlTexRotation->getTentative();
+ bool valid = !ctrlTexRotation->getTentative();
if (valid || align_planar)
{
- value = ctrlTexRotation->get() * DEG_TO_RAD;
- object->setTERotation( te, value );
+ F32 value = ctrlTexRotation->get() * DEG_TO_RAD;
+ object->setTERotation(te, value);
if (align_planar)
{
@@ -750,6 +738,7 @@ struct LLPanelFaceSetTEFunctor : public LLSelectedTEFunctor
}
}
}
+
return true;
}
private:
@@ -906,7 +895,7 @@ struct LLPanelFaceGetIsAlignedTEFunctor : public LLSelectedTEFunctor
LLVector2 aligned_st_offset, aligned_st_scale;
F32 aligned_st_rot;
- if ( facep->calcAlignedPlanarTE(mCenterFace, &aligned_st_offset, &aligned_st_scale, &aligned_st_rot) )
+ if (facep->calcAlignedPlanarTE(mCenterFace, &aligned_st_offset, &aligned_st_scale, &aligned_st_rot))
{
const LLTextureEntry* tep = facep->getTextureEntry();
LLVector2 st_offset, st_scale;
@@ -947,7 +936,7 @@ struct LLPanelFaceSendFunctor : public LLSelectedObjectFunctor
void LLPanelFace::sendTextureInfo()
{
- if ((bool)childGetValue("checkbox planar align").asBoolean())
+ if (mPlanarAlign->getValue().asBoolean())
{
LLFace* last_face = NULL;
bool identical_face =false;
@@ -999,7 +988,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
const bool has_material = !has_pbr_material;
// only turn on auto-adjust button if there is a media renderer and the media is loaded
- childSetEnabled("button align", editable);
+ mBtnAlign->setEnabled(editable);
if (mComboMatMedia->getCurrentIndex() < MATMEDIA_MATERIAL)
{
@@ -1100,30 +1089,23 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
const bool pbr_selected = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR;
const bool texture_info_selected = pbr_selected && mRadioPbrType->getSelectedIndex() != PBRTYPE_RENDER_MATERIAL_ID;
- getChildView("checkbox_sync_settings")->setEnabled(editable);
- childSetValue("checkbox_sync_settings", gSavedSettings.getBOOL("SyncMaterialSettings"));
+ mCheckSyncSettings->setEnabled(editable);
+ mCheckSyncSettings->setValue(gSavedSettings.getBOOL("SyncMaterialSettings"));
updateVisibility(objectp);
// Color swatch
- {
- getChildView("color label")->setEnabled(editable);
- }
-
+ mLabelColor->setEnabled(editable);
LLColor4 color = LLColor4::white;
bool identical_color = false;
- {
- LLSelectedTE::getColor(color, identical_color);
- LLColor4 prev_color = mColorSwatch->get();
-
- mColorSwatch->setOriginal(color);
- mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable);
-
- mColorSwatch->setValid(editable && !has_pbr_material);
- mColorSwatch->setEnabled( editable && !has_pbr_material);
- mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material);
- }
+ LLSelectedTE::getColor(color, identical_color);
+ LLColor4 prev_color = mColorSwatch->get();
+ mColorSwatch->setOriginal(color);
+ mColorSwatch->set(color, force_set_values || (prev_color != color) || !editable);
+ mColorSwatch->setValid(editable && !has_pbr_material);
+ mColorSwatch->setEnabled( editable && !has_pbr_material);
+ mColorSwatch->setCanApplyImmediately( editable && !has_pbr_material);
// Color transparency
mLabelColorTransp->setEnabled(editable);
@@ -1132,65 +1114,51 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mCtrlColorTransp->setValue(editable ? transparency : 0);
mCtrlColorTransp->setEnabled(editable && has_material);
+ // Shiny
U8 shiny = 0;
- bool identical_shiny = false;
+ {
+ bool identical_shiny = false;
- // Shiny
- LLSelectedTE::getShiny(shiny, identical_shiny);
- identical = identical && identical_shiny;
+ LLSelectedTE::getShiny(shiny, identical_shiny);
+ identical = identical && identical_shiny;
- shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE;
+ shiny = specmap_id.isNull() ? shiny : SHINY_TEXTURE;
- LLCtrlSelectionInterface* combobox_shininess = childGetSelectionInterface("combobox shininess");
- if (combobox_shininess)
- {
- combobox_shininess->selectNthItem((S32)shiny);
- }
+ mComboShininess->getSelectionInterface()->selectNthItem((S32)shiny);
- getChildView("label shininess")->setEnabled(editable);
- getChildView("combobox shininess")->setEnabled(editable);
+ mLabelShininess->setEnabled(editable);
+ mComboShininess->setEnabled(editable);
- getChildView("label glossiness")->setEnabled(editable);
- getChildView("glossiness")->setEnabled(editable);
+ mLabelGlossiness->setEnabled(editable);
+ mGlossiness->setEnabled(editable);
- getChildView("label environment")->setEnabled(editable);
- getChildView("environment")->setEnabled(editable);
- getChildView("label shinycolor")->setEnabled(editable);
+ mLabelEnvironment->setEnabled(editable);
+ mEnvironment->setEnabled(editable);
+ mLabelShiniColor->setEnabled(editable);
- getChild<LLUICtrl>("combobox shininess")->setTentative(!identical_spec);
- getChild<LLUICtrl>("glossiness")->setTentative(!identical_spec);
- getChild<LLUICtrl>("environment")->setTentative(!identical_spec);
- mShinyColorSwatch->setTentative(!identical_spec);
+ mComboShininess->setTentative(!identical_spec);
+ mGlossiness->setTentative(!identical_spec);
+ mEnvironment->setTentative(!identical_spec);
+ mShinyColorSwatch->setTentative(!identical_spec);
- {
mShinyColorSwatch->setValid(editable);
- mShinyColorSwatch->setEnabled( editable );
- mShinyColorSwatch->setCanApplyImmediately( editable );
+ mShinyColorSwatch->setEnabled(editable);
+ mShinyColorSwatch->setCanApplyImmediately(editable);
}
- U8 bumpy = 0;
// Bumpy
+ U8 bumpy = 0;
{
bool identical_bumpy = false;
- LLSelectedTE::getBumpmap(bumpy,identical_bumpy);
+ LLSelectedTE::getBumpmap(bumpy, identical_bumpy);
LLUUID norm_map_id = getCurrentNormalMap();
- LLCtrlSelectionInterface* combobox_bumpiness = childGetSelectionInterface("combobox bumpiness");
-
bumpy = norm_map_id.isNull() ? bumpy : BUMPY_TEXTURE;
+ mComboBumpiness->getSelectionInterface()->selectNthItem((S32)bumpy);
- if (combobox_bumpiness)
- {
- combobox_bumpiness->selectNthItem((S32)bumpy);
- }
- else
- {
- LL_WARNS() << "failed childGetSelectionInterface for 'combobox bumpiness'" << LL_ENDL;
- }
-
- getChildView("combobox bumpiness")->setEnabled(editable);
- getChild<LLUICtrl>("combobox bumpiness")->setTentative(!identical_bumpy);
- getChildView("label bumpiness")->setEnabled(editable);
+ mComboBumpiness->setEnabled(editable);
+ mComboBumpiness->setTentative(!identical_bumpy);
+ mLabelBumpiness->setEnabled(editable);
}
// Texture
@@ -1228,7 +1196,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (LLViewerMedia::getInstance()->textureHasMedia(id))
{
- getChildView("button align")->setEnabled(editable);
+ mBtnAlign->setEnabled(editable);
}
// Diffuse Alpha Mode
@@ -1243,22 +1211,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
//
LLSelectedTEMaterial::getCurrentDiffuseAlphaMode(alpha_mode, identical_alpha_mode, mIsAlpha);
- LLCtrlSelectionInterface* combobox_alphamode = childGetSelectionInterface("combobox alphamode");
- if (combobox_alphamode)
- {
- //it is invalid to have any alpha mode other than blend if transparency is greater than zero ...
- // Want masking? Want emissive? Tough! You get BLEND!
- alpha_mode = (transparency > 0.f) ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : alpha_mode;
+ // it is invalid to have any alpha mode other than blend if transparency is greater than zero ...
+ // Want masking? Want emissive? Tough! You get BLEND!
+ alpha_mode = (transparency > 0.f) ? LLMaterial::DIFFUSE_ALPHA_MODE_BLEND : alpha_mode;
- // ... unless there is no alpha channel in the texture, in which case alpha mode MUST be none
- alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
+ // ... unless there is no alpha channel in the texture, in which case alpha mode MUST be none
+ alpha_mode = mIsAlpha ? alpha_mode : LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- combobox_alphamode->selectNthItem(alpha_mode);
- }
- else
- {
- LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
- }
+ mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
updateAlphaControls();
@@ -1271,10 +1231,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mTextureCtrl->setImageAssetID(id);
bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
- getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
- getChildView("label alphamode")->setEnabled(can_change_alpha);
- getChildView("maskcutoff")->setEnabled(can_change_alpha);
- getChildView("label maskcutoff")->setEnabled(can_change_alpha);
+ mComboAlphaMode->setEnabled(can_change_alpha && transparency <= 0.f);
+ mLabelAlphaMode->setEnabled(can_change_alpha);
+ mMaskCutoff->setEnabled(can_change_alpha);
+ mLabelMaskCutoff->setEnabled(can_change_alpha);
mTextureCtrl->setBakeTextureEnabled(true);
}
@@ -1284,10 +1244,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mTextureCtrl->setTentative(false);
mTextureCtrl->setEnabled(false);
mTextureCtrl->setImageAssetID(LLUUID::null);
- getChildView("combobox alphamode")->setEnabled(false);
- getChildView("label alphamode")->setEnabled(false);
- getChildView("maskcutoff")->setEnabled(false);
- getChildView("label maskcutoff")->setEnabled(false);
+ mComboAlphaMode->setEnabled(false);
+ mLabelAlphaMode->setEnabled(false);
+ mMaskCutoff->setEnabled(false);
+ mLabelMaskCutoff->setEnabled(false);
mTextureCtrl->setBakeTextureEnabled(false);
}
@@ -1299,10 +1259,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mTextureCtrl->setImageAssetID(id);
bool can_change_alpha = editable && mIsAlpha && !missing_asset && !has_pbr_material;
- getChildView("combobox alphamode")->setEnabled(can_change_alpha && transparency <= 0.f);
- getChildView("label alphamode")->setEnabled(can_change_alpha);
- getChildView("maskcutoff")->setEnabled(can_change_alpha);
- getChildView("label maskcutoff")->setEnabled(can_change_alpha);
+ mComboAlphaMode->setEnabled(can_change_alpha && transparency <= 0.f);
+ mLabelAlphaMode->setEnabled(can_change_alpha);
+ mMaskCutoff->setEnabled(can_change_alpha);
+ mLabelMaskCutoff->setEnabled(can_change_alpha);
mTextureCtrl->setBakeTextureEnabled(true);
}
@@ -1322,9 +1282,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (mShinyTextureCtrl)
{
- mShinyTextureCtrl->setTentative( !identical_spec );
- mShinyTextureCtrl->setEnabled( editable && !has_pbr_material);
- mShinyTextureCtrl->setImageAssetID( specmap_id );
+ mShinyTextureCtrl->setTentative(!identical_spec);
+ mShinyTextureCtrl->setEnabled(editable && !has_pbr_material);
+ mShinyTextureCtrl->setImageAssetID(specmap_id);
if (attachment)
{
@@ -1338,9 +1298,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (mBumpyTextureCtrl)
{
- mBumpyTextureCtrl->setTentative( !identical_norm );
- mBumpyTextureCtrl->setEnabled( editable && !has_pbr_material);
- mBumpyTextureCtrl->setImageAssetID( normmap_id );
+ mBumpyTextureCtrl->setTentative(!identical_norm);
+ mBumpyTextureCtrl->setEnabled(editable && !has_pbr_material);
+ mBumpyTextureCtrl->setImageAssetID(normmap_id);
if (attachment)
{
@@ -1354,28 +1314,24 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
// planar align
- bool align_planar = false;
+ bool align_planar = mPlanarAlign->get();
bool identical_planar_aligned = false;
- {
- LLCheckBoxCtrl* cb_planar_align = getChild<LLCheckBoxCtrl>("checkbox planar align");
- align_planar = (cb_planar_align && cb_planar_align->get());
- bool enabled = (editable && isIdenticalPlanarTexgen() && !texture_info_selected);
- childSetValue("checkbox planar align", align_planar && enabled);
- childSetVisible("checkbox planar align", enabled);
- childSetEnabled("checkbox planar align", enabled);
- childSetEnabled("button align textures", enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
+ bool enabled = (editable && isIdenticalPlanarTexgen() && !texture_info_selected);
+ mPlanarAlign->setValue(align_planar && enabled);
+ mPlanarAlign->setVisible(enabled);
+ mPlanarAlign->setEnabled(enabled);
+ mBtnAlignTex->setEnabled(enabled && LLSelectMgr::getInstance()->getSelection()->getObjectCount() > 1);
- if (align_planar && enabled)
- {
- LLFace* last_face = NULL;
- bool identical_face = false;
- LLSelectedTE::getFace(last_face, identical_face);
+ if (align_planar && enabled)
+ {
+ LLFace* last_face = NULL;
+ bool identical_face = false;
+ LLSelectedTE::getFace(last_face, identical_face);
- LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face);
- // this will determine if the texture param controls are tentative:
- identical_planar_aligned = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&get_is_aligend_func);
- }
+ LLPanelFaceGetIsAlignedTEFunctor get_is_aligend_func(last_face);
+ // this will determine if the texture param controls are tentative:
+ identical_planar_aligned = LLSelectMgr::getInstance()->getSelection()->applyToTEs(&get_is_aligend_func);
}
// Needs to be public and before tex scale settings below to properly reflect
@@ -1386,10 +1342,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool identical_texgen = true;
bool identical_planar_texgen = false;
- {
- LLSelectedTE::getTexGen(selected_texgen, identical_texgen);
- identical_planar_texgen = (identical_texgen && (selected_texgen == LLTextureEntry::TEX_GEN_PLANAR));
- }
+ LLSelectedTE::getTexGen(selected_texgen, identical_texgen);
+ identical_planar_texgen = (identical_texgen && (selected_texgen == LLTextureEntry::TEX_GEN_PLANAR));
// Texture scale
{
@@ -1416,21 +1370,21 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
spec_scale_s = editable ? spec_scale_s : 1.0f;
spec_scale_s *= identical_planar_texgen ? 2.0f : 1.0f;
- getChild<LLUICtrl>("TexScaleU")->setValue(diff_scale_s);
- getChild<LLUICtrl>("shinyScaleU")->setValue(spec_scale_s);
- getChild<LLUICtrl>("bumpyScaleU")->setValue(norm_scale_s);
+ mTexScaleU->setValue(diff_scale_s);
+ mShinyScaleU->setValue(spec_scale_s);
+ mBumpyScaleU->setValue(norm_scale_s);
- getChildView("TexScaleU")->setEnabled(editable && has_material);
- getChildView("shinyScaleU")->setEnabled(editable && has_material && specmap_id.notNull());
- getChildView("bumpyScaleU")->setEnabled(editable && has_material && normmap_id.notNull());
+ mTexScaleU->setEnabled(editable && has_material);
+ mShinyScaleU->setEnabled(editable && has_material && specmap_id.notNull());
+ mBumpyScaleU->setEnabled(editable && has_material && normmap_id.notNull());
bool diff_scale_tentative = !(identical && identical_diff_scale_s);
bool norm_scale_tentative = !(identical && identical_norm_scale_s);
bool spec_scale_tentative = !(identical && identical_spec_scale_s);
- getChild<LLUICtrl>("TexScaleU")->setTentative( LLSD(diff_scale_tentative));
- getChild<LLUICtrl>("shinyScaleU")->setTentative(LLSD(spec_scale_tentative));
- getChild<LLUICtrl>("bumpyScaleU")->setTentative(LLSD(norm_scale_tentative));
+ mTexScaleU->setTentative(LLSD(diff_scale_tentative));
+ mShinyScaleU->setTentative(LLSD(spec_scale_tentative));
+ mBumpyScaleU->setTentative(LLSD(norm_scale_tentative));
}
{
@@ -1459,24 +1413,24 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool norm_scale_tentative = !identical_norm_scale_t;
bool spec_scale_tentative = !identical_spec_scale_t;
- getChildView("TexScaleV")->setEnabled(editable && has_material);
- getChildView("shinyScaleV")->setEnabled(editable && has_material && specmap_id.notNull());
- getChildView("bumpyScaleV")->setEnabled(editable && has_material && normmap_id.notNull());
+ mTexScaleV->setEnabled(editable && has_material);
+ mShinyScaleV->setEnabled(editable && has_material && specmap_id.notNull());
+ mBumpyScaleV->setEnabled(editable && has_material && normmap_id.notNull());
if (force_set_values)
{
- getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(diff_scale_t);
+ mTexScaleV->forceSetValue(diff_scale_t);
}
else
{
- getChild<LLSpinCtrl>("TexScaleV")->setValue(diff_scale_t);
+ mTexScaleV->setValue(diff_scale_t);
}
- getChild<LLUICtrl>("shinyScaleV")->setValue(norm_scale_t);
- getChild<LLUICtrl>("bumpyScaleV")->setValue(spec_scale_t);
+ mShinyScaleV->setValue(spec_scale_t);
+ mBumpyScaleV->setValue(norm_scale_t);
- getChild<LLUICtrl>("TexScaleV")->setTentative(LLSD(diff_scale_tentative));
- getChild<LLUICtrl>("shinyScaleV")->setTentative(LLSD(norm_scale_tentative));
- getChild<LLUICtrl>("bumpyScaleV")->setTentative(LLSD(spec_scale_tentative));
+ mTexScaleV->setTentative(LLSD(diff_scale_tentative));
+ mShinyScaleV->setTentative(LLSD(spec_scale_tentative));
+ mBumpyScaleV->setTentative(LLSD(norm_scale_tentative));
}
// Texture offset
@@ -1497,17 +1451,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool norm_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_s);
bool spec_offset_u_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_s);
- getChild<LLUICtrl>("TexOffsetU")->setValue( editable ? diff_offset_s : 0.0f);
- getChild<LLUICtrl>("bumpyOffsetU")->setValue(editable ? norm_offset_s : 0.0f);
- getChild<LLUICtrl>("shinyOffsetU")->setValue(editable ? spec_offset_s : 0.0f);
+ mTexOffsetU->setValue(editable ? diff_offset_s : 0.0f);
+ mBumpyOffsetU->setValue(editable ? norm_offset_s : 0.0f);
+ mShinyOffsetU->setValue(editable ? spec_offset_s : 0.0f);
- getChild<LLUICtrl>("TexOffsetU")->setTentative(LLSD(diff_offset_u_tentative));
- getChild<LLUICtrl>("shinyOffsetU")->setTentative(LLSD(norm_offset_u_tentative));
- getChild<LLUICtrl>("bumpyOffsetU")->setTentative(LLSD(spec_offset_u_tentative));
+ mTexOffsetU->setTentative(LLSD(diff_offset_u_tentative));
+ mShinyOffsetU->setTentative(LLSD(spec_offset_u_tentative));
+ mBumpyOffsetU->setTentative(LLSD(norm_offset_u_tentative));
- getChildView("TexOffsetU")->setEnabled(editable && has_material);
- getChildView("shinyOffsetU")->setEnabled(editable && has_material && specmap_id.notNull());
- getChildView("bumpyOffsetU")->setEnabled(editable && has_material && normmap_id.notNull());
+ mTexOffsetU->setEnabled(editable && has_material);
+ mShinyOffsetU->setEnabled(editable && has_material && specmap_id.notNull());
+ mBumpyOffsetU->setEnabled(editable && has_material && normmap_id.notNull());
}
{
@@ -1527,17 +1481,17 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool norm_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_norm_offset_t);
bool spec_offset_v_tentative = !(align_planar ? identical_planar_aligned : identical_spec_offset_t);
- getChild<LLUICtrl>("TexOffsetV")->setValue( editable ? diff_offset_t : 0.0f);
- getChild<LLUICtrl>("bumpyOffsetV")->setValue(editable ? norm_offset_t : 0.0f);
- getChild<LLUICtrl>("shinyOffsetV")->setValue(editable ? spec_offset_t : 0.0f);
+ mTexOffsetV->setValue( editable ? diff_offset_t : 0.0f);
+ mBumpyOffsetV->setValue(editable ? norm_offset_t : 0.0f);
+ mShinyOffsetV->setValue(editable ? spec_offset_t : 0.0f);
- getChild<LLUICtrl>("TexOffsetV")->setTentative(LLSD(diff_offset_v_tentative));
- getChild<LLUICtrl>("shinyOffsetV")->setTentative(LLSD(norm_offset_v_tentative));
- getChild<LLUICtrl>("bumpyOffsetV")->setTentative(LLSD(spec_offset_v_tentative));
+ mTexOffsetV->setTentative(LLSD(diff_offset_v_tentative));
+ mBumpyOffsetV->setTentative(LLSD(norm_offset_v_tentative));
+ mShinyOffsetV->setTentative(LLSD(spec_offset_v_tentative));
- getChildView("TexOffsetV")->setEnabled(editable && has_material);
- getChildView("shinyOffsetV")->setEnabled(editable && has_material && specmap_id.notNull());
- getChildView("bumpyOffsetV")->setEnabled(editable && has_material && normmap_id.notNull());
+ mTexOffsetV->setEnabled(editable && has_material);
+ mShinyOffsetV->setEnabled(editable && has_material && specmap_id.notNull());
+ mBumpyOffsetV->setEnabled(editable && has_material && normmap_id.notNull());
}
// Texture rotation
@@ -1550,9 +1504,9 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
F32 norm_rotation = 0.f;
F32 spec_rotation = 0.f;
- LLSelectedTE::getRotation(diff_rotation,identical_diff_rotation);
- LLSelectedTEMaterial::getSpecularRotation(spec_rotation,identical_spec_rotation);
- LLSelectedTEMaterial::getNormalRotation(norm_rotation,identical_norm_rotation);
+ LLSelectedTE::getRotation(diff_rotation, identical_diff_rotation);
+ LLSelectedTEMaterial::getSpecularRotation(spec_rotation, identical_spec_rotation);
+ LLSelectedTEMaterial::getNormalRotation(norm_rotation, identical_norm_rotation);
bool diff_rot_tentative = !(align_planar ? identical_planar_aligned : identical_diff_rotation);
bool norm_rot_tentative = !(align_planar ? identical_planar_aligned : identical_norm_rotation);
@@ -1562,27 +1516,27 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
F32 norm_rot_deg = norm_rotation * RAD_TO_DEG;
F32 spec_rot_deg = spec_rotation * RAD_TO_DEG;
- getChildView("TexRot")->setEnabled(editable && has_material);
- getChildView("shinyRot")->setEnabled(editable && has_material && specmap_id.notNull());
- getChildView("bumpyRot")->setEnabled(editable && has_material && normmap_id.notNull());
+ mTexRotate->setEnabled(editable && has_material);
+ mShinyRotate->setEnabled(editable && has_material && specmap_id.notNull());
+ mBumpyRotate->setEnabled(editable && has_material && normmap_id.notNull());
- getChild<LLUICtrl>("TexRot")->setTentative(diff_rot_tentative);
- getChild<LLUICtrl>("shinyRot")->setTentative(LLSD(norm_rot_tentative));
- getChild<LLUICtrl>("bumpyRot")->setTentative(LLSD(spec_rot_tentative));
+ mTexRotate->setTentative(LLSD(diff_rot_tentative));
+ mShinyRotate->setTentative(LLSD(spec_rot_tentative));
+ mBumpyRotate->setTentative(LLSD(norm_rot_tentative));
- getChild<LLUICtrl>("TexRot")->setValue( editable ? diff_rot_deg : 0.0f);
- getChild<LLUICtrl>("shinyRot")->setValue(editable ? spec_rot_deg : 0.0f);
- getChild<LLUICtrl>("bumpyRot")->setValue(editable ? norm_rot_deg : 0.0f);
+ mTexRotate->setValue(editable ? diff_rot_deg : 0.0f);
+ mShinyRotate->setValue(editable ? spec_rot_deg : 0.0f);
+ mBumpyRotate->setValue(editable ? norm_rot_deg : 0.0f);
}
{
F32 glow = 0.f;
bool identical_glow = false;
- LLSelectedTE::getGlow(glow,identical_glow);
+ LLSelectedTE::getGlow(glow, identical_glow);
mCtrlGlow->setValue(glow);
mCtrlGlow->setTentative(!identical_glow);
mCtrlGlow->setEnabled(editable);
- getChildView("glow label")->setEnabled(editable);
+ mLabelGlow->setEnabled(editable);
}
{
@@ -1591,14 +1545,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mComboTexGen->setEnabled(editable);
mComboTexGen->setTentative(!identical);
- getChildView("tex gen")->setEnabled(editable);
+ mLabelTexGen->setEnabled(editable);
}
{
U8 fullbright_flag = 0;
bool identical_fullbright = false;
- LLSelectedTE::getFullbright(fullbright_flag,identical_fullbright);
+ LLSelectedTE::getFullbright(fullbright_flag, identical_fullbright);
mCheckFullbright->setValue((S32)(fullbright_flag != 0));
mCheckFullbright->setEnabled(editable && !has_pbr_material);
@@ -1625,7 +1579,7 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
bool enabled = editable && (index != 1);
bool identical_repeats = true;
S32 material_selection = mComboMatMedia->getCurrentIndex();
- F32 repeats = 1.0f;
+ F32 repeats = 1.0f;
U32 material_type = MATTYPE_DIFFUSE;
if (material_selection == MATMEDIA_MATERIAL)
@@ -1642,53 +1596,44 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
{
default:
case MATTYPE_DIFFUSE:
- {
if (material_selection != MATMEDIA_PBR)
{
enabled = editable && !id.isNull();
}
identical_repeats = identical_diff_repeats;
repeats = repeats_diff;
- }
- break;
-
+ break;
case MATTYPE_SPECULAR:
- {
if (material_selection != MATMEDIA_PBR)
{
enabled = (editable && ((shiny == SHINY_TEXTURE) && !specmap_id.isNull()));
}
identical_repeats = identical_spec_repeats;
repeats = repeats_spec;
- }
- break;
-
+ break;
case MATTYPE_NORMAL:
- {
if (material_selection != MATMEDIA_PBR)
{
enabled = (editable && ((bumpy == BUMPY_TEXTURE) && !normmap_id.isNull()));
}
identical_repeats = identical_norm_repeats;
repeats = repeats_norm;
- }
- break;
+ break;
}
bool repeats_tentative = !identical_repeats;
- LLSpinCtrl* rpt_ctrl = getChild<LLSpinCtrl>("rptctrl");
if (force_set_values)
{
- //onCommit, previosly edited element updates related ones
- rpt_ctrl->forceSetValue(editable ? repeats : 1.0f);
+ // onCommit, previosly edited element updates related ones
+ mTexRepeat->forceSetValue(editable ? repeats : 1.0f);
}
else
{
- rpt_ctrl->setValue(editable ? repeats : 1.0f);
+ mTexRepeat->setValue(editable ? repeats : 1.0f);
}
- rpt_ctrl->setTentative(LLSD(repeats_tentative));
- rpt_ctrl->setEnabled(has_material && !identical_planar_texgen && enabled);
+ mTexRepeat->setTentative(LLSD(repeats_tentative));
+ mTexRepeat->setEnabled(has_material && !identical_planar_texgen && enabled);
}
}
@@ -1702,9 +1647,6 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
LL_DEBUGS("Materials") << material->asLLSD() << LL_ENDL;
// Alpha
- LLCtrlSelectionInterface* combobox_alphamode =
- childGetSelectionInterface("combobox alphamode");
- if (combobox_alphamode)
{
U32 alpha_mode = material->getDiffuseAlphaMode();
@@ -1718,13 +1660,10 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
}
- combobox_alphamode->selectNthItem(alpha_mode);
- }
- else
- {
- LL_WARNS() << "failed childGetSelectionInterface for 'combobox alphamode'" << LL_ENDL;
+ mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
}
- getChild<LLUICtrl>("maskcutoff")->setValue(material->getAlphaMaskCutoff());
+
+ mMaskCutoff->setValue(material->getAlphaMaskCutoff());
updateAlphaControls();
identical_planar_texgen = isIdenticalPlanarTexgen();
@@ -1735,8 +1674,8 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
if (!material->getSpecularID().isNull() && (shiny == SHINY_TEXTURE))
{
- material->getSpecularOffset(offset_x,offset_y);
- material->getSpecularRepeat(repeat_x,repeat_y);
+ material->getSpecularOffset(offset_x, offset_y);
+ material->getSpecularRepeat(repeat_x, repeat_y);
if (identical_planar_texgen)
{
@@ -1745,13 +1684,13 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
rot = material->getSpecularRotation();
- getChild<LLUICtrl>("shinyScaleU")->setValue(repeat_x);
- getChild<LLUICtrl>("shinyScaleV")->setValue(repeat_y);
- getChild<LLUICtrl>("shinyRot")->setValue(rot*RAD_TO_DEG);
- getChild<LLUICtrl>("shinyOffsetU")->setValue(offset_x);
- getChild<LLUICtrl>("shinyOffsetV")->setValue(offset_y);
- getChild<LLUICtrl>("glossiness")->setValue(material->getSpecularLightExponent());
- getChild<LLUICtrl>("environment")->setValue(material->getEnvironmentIntensity());
+ mShinyScaleU->setValue(repeat_x);
+ mShinyScaleV->setValue(repeat_y);
+ mShinyRotate->setValue(rot * RAD_TO_DEG);
+ mShinyOffsetU->setValue(offset_x);
+ mShinyOffsetV->setValue(offset_y);
+ mGlossiness->setValue(material->getSpecularLightExponent());
+ mEnvironment->setValue(material->getEnvironmentIntensity());
updateShinyControls(!material->getSpecularID().isNull(), true);
}
@@ -1783,27 +1722,28 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
}
rot = material->getNormalRotation();
- getChild<LLUICtrl>("bumpyScaleU")->setValue(repeat_x);
- getChild<LLUICtrl>("bumpyScaleV")->setValue(repeat_y);
- getChild<LLUICtrl>("bumpyRot")->setValue(rot*RAD_TO_DEG);
- getChild<LLUICtrl>("bumpyOffsetU")->setValue(offset_x);
- getChild<LLUICtrl>("bumpyOffsetV")->setValue(offset_y);
+ mBumpyScaleU->setValue(repeat_x);
+ mBumpyScaleV->setValue(repeat_y);
+ mBumpyRotate->setValue(rot*RAD_TO_DEG);
+ mBumpyOffsetU->setValue(offset_x);
+ mBumpyOffsetV->setValue(offset_y);
updateBumpyControls(!material->getNormalID().isNull(), true);
}
}
}
+
S32 selected_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount();
bool single_volume = (selected_count == 1);
mMenuClipboardColor->setEnabled(editable && single_volume);
// Set variable values for numeric expressions
LLCalc* calcp = LLCalc::getInstance();
- calcp->setVar(LLCalc::TEX_U_SCALE, (F32)childGetValue("TexScaleU").asReal());
- calcp->setVar(LLCalc::TEX_V_SCALE, (F32)childGetValue("TexScaleV").asReal());
- calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)childGetValue("TexOffsetU").asReal());
- calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)childGetValue("TexOffsetV").asReal());
- calcp->setVar(LLCalc::TEX_ROTATION, (F32)childGetValue("TexRot").asReal());
+ calcp->setVar(LLCalc::TEX_U_SCALE, (F32)mTexScaleU->getValue().asReal());
+ calcp->setVar(LLCalc::TEX_V_SCALE, (F32)mTexScaleV->getValue().asReal());
+ calcp->setVar(LLCalc::TEX_U_OFFSET, (F32)mTexOffsetU->getValue().asReal());
+ calcp->setVar(LLCalc::TEX_V_OFFSET, (F32)mTexOffsetV->getValue().asReal());
+ calcp->setVar(LLCalc::TEX_ROTATION, (F32)mTexRotate->getValue().asReal());
calcp->setVar(LLCalc::TEX_TRANSPARENCY, (F32)mCtrlColorTransp->getValue().asReal());
calcp->setVar(LLCalc::TEX_GLOW, (F32)mCtrlGlow->getValue().asReal());
}
@@ -1838,14 +1778,14 @@ void LLPanelFace::updateUI(bool force_set_values /*false*/)
mRadioMaterialType->setSelectedIndex(0);
}
mLabelColorTransp->setEnabled(false);
- getChildView("rptctrl")->setEnabled(false);
- getChildView("tex gen")->setEnabled(false);
- getChildView("label shininess")->setEnabled(false);
- getChildView("label bumpiness")->setEnabled(false);
- getChildView("button align")->setEnabled(false);
- getChildView("pbr_from_inventory")->setEnabled(false);
- getChildView("edit_selected_pbr")->setEnabled(false);
- getChildView("save_selected_pbr")->setEnabled(false);
+ mTexRepeat->setEnabled(false);
+ mLabelTexGen->setEnabled(false);
+ mLabelShininess->setEnabled(false);
+ mLabelBumpiness->setEnabled(false);
+ mBtnAlign->setEnabled(false);
+ mBtnPbrFromInv->setEnabled(false);
+ mBtnEditBbr->setEnabled(false);
+ mBtnSaveBbr->setEnabled(false);
updateVisibility();
@@ -1968,9 +1908,9 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
}
}
- getChildView("pbr_from_inventory")->setEnabled(settable);
- getChildView("edit_selected_pbr")->setEnabled(editable && !has_faces_without_pbr);
- getChildView("save_selected_pbr")->setEnabled(saveable && identical_pbr);
+ mBtnPbrFromInv->setEnabled(settable);
+ mBtnEditBbr->setEnabled(editable && !has_faces_without_pbr);
+ mBtnSaveBbr->setEnabled(saveable && identical_pbr);
if (objectp->isInventoryPending())
{
// Reuse the same listener when possible
@@ -2000,17 +1940,11 @@ void LLPanelFace::updateUIGLTF(LLViewerObject* objectp, bool& has_pbr_material,
{
const bool new_state = has_pbr_capabilities && has_pbr_material && !has_faces_without_pbr;
- LLUICtrl* gltfCtrlTextureScaleU = getChild<LLUICtrl>("gltfTextureScaleU");
- LLUICtrl* gltfCtrlTextureScaleV = getChild<LLUICtrl>("gltfTextureScaleV");
- LLUICtrl* gltfCtrlTextureRotation = getChild<LLUICtrl>("gltfTextureRotation");
- LLUICtrl* gltfCtrlTextureOffsetU = getChild<LLUICtrl>("gltfTextureOffsetU");
- LLUICtrl* gltfCtrlTextureOffsetV = getChild<LLUICtrl>("gltfTextureOffsetV");
-
- gltfCtrlTextureScaleU->setEnabled(new_state);
- gltfCtrlTextureScaleV->setEnabled(new_state);
- gltfCtrlTextureRotation->setEnabled(new_state);
- gltfCtrlTextureOffsetU->setEnabled(new_state);
- gltfCtrlTextureOffsetV->setEnabled(new_state);
+ mPBRScaleU->setEnabled(new_state);
+ mPBRScaleV->setEnabled(new_state);
+ mPBRRotate->setEnabled(new_state);
+ mPBROffsetU->setEnabled(new_state);
+ mPBROffsetV->setEnabled(new_state);
// Control values will be set once per frame in
// setMaterialOverridesFromSelection
@@ -2030,16 +1964,16 @@ void LLPanelFace::updateVisibilityGLTF(LLViewerObject* objectp /*= nullptr */)
mPBRTextureCtrl->setVisible(show_pbr_render_material_id);
- getChildView("pbr_from_inventory")->setVisible(show_pbr_render_material_id);
- getChildView("edit_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending);
- getChildView("save_selected_pbr")->setVisible(show_pbr_render_material_id && !inventory_pending);
- getChildView("material_permissions_loading_label")->setVisible(show_pbr_render_material_id && inventory_pending);
+ mBtnPbrFromInv->setVisible(show_pbr_render_material_id);
+ mBtnEditBbr->setVisible(show_pbr_render_material_id && !inventory_pending);
+ mBtnSaveBbr->setVisible(show_pbr_render_material_id && !inventory_pending);
+ mLabelMatPermLoading->setVisible(show_pbr_render_material_id && inventory_pending);
- getChildView("gltfTextureScaleU")->setVisible(show_pbr);
- getChildView("gltfTextureScaleV")->setVisible(show_pbr);
- getChildView("gltfTextureRotation")->setVisible(show_pbr);
- getChildView("gltfTextureOffsetU")->setVisible(show_pbr);
- getChildView("gltfTextureOffsetV")->setVisible(show_pbr);
+ mPBRScaleU->setVisible(show_pbr);
+ mPBRScaleV->setVisible(show_pbr);
+ mPBRRotate->setVisible(show_pbr);
+ mPBROffsetU->setVisible(show_pbr);
+ mPBROffsetV->setVisible(show_pbr);
}
void LLPanelFace::updateCopyTexButton()
@@ -2069,7 +2003,7 @@ void LLPanelFace::refreshMedia()
&& first_object->permModify()
))
{
- getChildView("add_media")->setEnabled(false);
+ mAddMedia->setEnabled(false);
mTitleMediaText->clear();
clearMediaSettings();
return;
@@ -2080,7 +2014,7 @@ void LLPanelFace::refreshMedia()
if (!has_media_capability)
{
- getChildView("add_media")->setEnabled(false);
+ mAddMedia->setEnabled(false);
LL_WARNS("LLFloaterToolsMedia") << "Media not enabled (no capability) in this region!" << LL_ENDL;
clearMediaSettings();
return;
@@ -2162,7 +2096,7 @@ void LLPanelFace::refreshMedia()
// update UI depending on whether "object" (prim or face) has media
// and whether or not you are allowed to edit it.
- getChildView("add_media")->setEnabled(editable);
+ mAddMedia->setEnabled(editable);
// IF all the faces have media (or all dont have media)
if (LLFloaterMediaSettings::getInstance()->mIdenticalHasMediaInfo)
{
@@ -2184,7 +2118,7 @@ void LLPanelFace::refreshMedia()
media_title = multi_media_info_str;
}
- getChildView("delete_media")->setEnabled(bool_has_media && editable);
+ mDelMedia->setEnabled(bool_has_media && editable);
// TODO: display a list of all media on the face - use 'identical' flag
}
else // not all face has media but at least one does.
@@ -2206,7 +2140,7 @@ void LLPanelFace::refreshMedia()
}
}
- getChildView("delete_media")->setEnabled(true);
+ mDelMedia->setEnabled(true);
}
U32 materials_media = mComboMatMedia->getCurrentIndex();
@@ -2247,7 +2181,7 @@ void LLPanelFace::onMaterialOverrideReceived(const LLUUID& object_id, S32 side)
//////////////////////////////////////////////////////////////////////////////
//
-void LLPanelFace::navigateToTitleMedia( const std::string url )
+void LLPanelFace::navigateToTitleMedia(const std::string& url)
{
std::string multi_media_info_str = LLTrans::getString("Multiple Media");
if (url.empty() || multi_media_info_str == url)
@@ -2259,9 +2193,9 @@ void LLPanelFace::navigateToTitleMedia( const std::string url )
{
LLPluginClassMedia* media_plugin = mTitleMedia->getMediaPlugin();
// check if url changed or if we need a new media source
- if (mTitleMedia->getCurrentNavUrl() != url || media_plugin == NULL)
+ if (mTitleMedia->getCurrentNavUrl() != url || media_plugin == nullptr)
{
- mTitleMedia->navigateTo( url );
+ mTitleMedia->navigateTo(url);
LLViewerMediaImpl* impl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(mTitleMedia->getTextureID());
if (impl)
@@ -2814,72 +2748,63 @@ void LLPanelFace::updateMediaTitle()
};
}
-//
-// Static functions
-//
-
// static
F32 LLPanelFace::valueGlow(LLViewerObject* object, S32 face)
{
return (F32)(object->getTE(face)->getGlow());
}
-
-void LLPanelFace::onCommitColor(const LLSD& data)
+void LLPanelFace::onCommitColor()
{
sendColor();
}
-void LLPanelFace::onCommitShinyColor(const LLSD& data)
+void LLPanelFace::onCommitShinyColor()
{
LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
}
-void LLPanelFace::onCommitAlpha(const LLSD& data)
+void LLPanelFace::onCommitAlpha()
{
sendAlpha();
}
-void LLPanelFace::onCancelColor(const LLSD& data)
+void LLPanelFace::onCancelColor()
{
LLSelectMgr::getInstance()->selectionRevertColors();
}
-void LLPanelFace::onCancelShinyColor(const LLSD& data)
+void LLPanelFace::onCancelShinyColor()
{
LLSelectMgr::getInstance()->selectionRevertShinyColors();
}
-void LLPanelFace::onSelectColor(const LLSD& data)
+void LLPanelFace::onSelectColor()
{
LLSelectMgr::getInstance()->saveSelectedObjectColors();
sendColor();
}
-void LLPanelFace::onSelectShinyColor(const LLSD& data)
+void LLPanelFace::onSelectShinyColor()
{
LLSelectedTEMaterial::setSpecularLightColor(this, mShinyColorSwatch->get());
LLSelectMgr::getInstance()->saveSelectedShinyColors();
}
-// static
-void LLPanelFace::onCommitMaterialsMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialsMedia()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
// Force to default states to side-step problems with menu contents
// and generally reflecting old state when switching tabs or objects
//
- self->updateShinyControls(false,true);
- self->updateBumpyControls(false,true);
- self->updateUI();
- self->refreshMedia();
+ updateShinyControls(false, true);
+ updateBumpyControls(false, true);
+ updateUI();
+ refreshMedia();
}
void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
{
- LLComboBox* combo_shininess = findChild<LLComboBox>("combobox shininess");
- LLComboBox* combo_bumpiness = findChild<LLComboBox>("combobox bumpiness");
- if (!mRadioMaterialType || !mRadioPbrType || !mComboMatMedia || !combo_shininess || !combo_bumpiness)
+ if (!mRadioMaterialType || !mRadioPbrType)
{
LL_WARNS("Materials") << "Combo box not found...exiting." << LL_ENDL;
return;
@@ -2892,60 +2817,59 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
bool show_bumpiness = show_material && (material_type == MATTYPE_NORMAL) && mComboMatMedia->getEnabled();
bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
const bool show_pbr = mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR && mComboMatMedia->getEnabled();
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+ const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
const bool show_pbr_asset = show_pbr && texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
mRadioMaterialType->setVisible(show_material);
// Shared material controls
- getChildView("checkbox_sync_settings")->setVisible(show_material || show_media);
- getChildView("tex gen")->setVisible(show_material || show_media || show_pbr_asset);
+ mCheckSyncSettings->setVisible(show_material || show_media);
+ mLabelTexGen->setVisible(show_material || show_media || show_pbr_asset);
mComboTexGen->setVisible(show_material || show_media || show_pbr_asset);
- getChildView("button align textures")->setVisible(show_material || show_media);
+ mBtnAlignTex->setVisible(show_material || show_media);
// Media controls
mTitleMediaText->setVisible(show_media);
- getChildView("add_media")->setVisible(show_media);
- getChildView("delete_media")->setVisible(show_media);
- getChildView("button align")->setVisible(show_media);
+ mAddMedia->setVisible(show_media);
+ mDelMedia->setVisible(show_media);
+ mBtnAlign->setVisible(show_media);
// Diffuse texture controls
mTextureCtrl->setVisible(show_texture && show_material);
- getChildView("label alphamode")->setVisible(show_texture && show_material);
- getChildView("combobox alphamode")->setVisible(show_texture && show_material);
- getChildView("label maskcutoff")->setVisible(false);
- getChildView("maskcutoff")->setVisible(false);
+ mLabelAlphaMode->setVisible(show_texture && show_material);
+ mComboAlphaMode->setVisible(show_texture && show_material);
+ mLabelMaskCutoff->setVisible(false);
+ mMaskCutoff->setVisible(false);
if (show_texture && show_material)
{
updateAlphaControls();
}
// texture scale and position controls
- getChildView("TexScaleU")->setVisible(show_texture);
- getChildView("TexScaleV")->setVisible(show_texture);
- getChildView("TexRot")->setVisible(show_texture);
- getChildView("TexOffsetU")->setVisible(show_texture);
- getChildView("TexOffsetV")->setVisible(show_texture);
+ mTexScaleU->setVisible(show_texture);
+ mTexScaleV->setVisible(show_texture);
+ mTexRotate->setVisible(show_texture);
+ mTexOffsetU->setVisible(show_texture);
+ mTexOffsetV->setVisible(show_texture);
// Specular map controls
mShinyTextureCtrl->setVisible(show_shininess);
- getChildView("combobox shininess")->setVisible(show_shininess);
- getChildView("label shininess")->setVisible(show_shininess);
- getChildView("label glossiness")->setVisible(false);
- getChildView("glossiness")->setVisible(false);
- getChildView("label environment")->setVisible(false);
- getChildView("environment")->setVisible(false);
- getChildView("label shinycolor")->setVisible(false);
+ mComboShininess->setVisible(show_shininess);
+ mLabelShininess->setVisible(show_shininess);
+ mLabelGlossiness->setVisible(false);
+ mGlossiness->setVisible(false);
+ mLabelEnvironment->setVisible(false);
+ mEnvironment->setVisible(false);
+ mLabelShiniColor->setVisible(false);
mShinyColorSwatch->setVisible(false);
if (show_shininess)
{
updateShinyControls();
}
- getChildView("shinyScaleU")->setVisible(show_shininess);
- getChildView("shinyScaleV")->setVisible(show_shininess);
- getChildView("shinyRot")->setVisible(show_shininess);
- getChildView("shinyOffsetU")->setVisible(show_shininess);
- getChildView("shinyOffsetV")->setVisible(show_shininess);
+ mShinyScaleU->setVisible(show_shininess);
+ mShinyScaleV->setVisible(show_shininess);
+ mShinyRotate->setVisible(show_shininess);
+ mShinyOffsetU->setVisible(show_shininess);
+ mShinyOffsetV->setVisible(show_shininess);
// Normal map controls
if (show_bumpiness)
@@ -2953,99 +2877,78 @@ void LLPanelFace::updateVisibility(LLViewerObject* objectp /* = nullptr */)
updateBumpyControls();
}
mBumpyTextureCtrl->setVisible(show_bumpiness);
- getChildView("combobox bumpiness")->setVisible(show_bumpiness);
- getChildView("label bumpiness")->setVisible(show_bumpiness);
- getChildView("bumpyScaleU")->setVisible(show_bumpiness);
- getChildView("bumpyScaleV")->setVisible(show_bumpiness);
- getChildView("bumpyRot")->setVisible(show_bumpiness);
- getChildView("bumpyOffsetU")->setVisible(show_bumpiness);
- getChildView("bumpyOffsetV")->setVisible(show_bumpiness);
+ mComboBumpiness->setVisible(show_bumpiness);
+ mLabelBumpiness->setVisible(show_bumpiness);
+ mBumpyScaleU->setVisible(show_bumpiness);
+ mBumpyScaleV->setVisible(show_bumpiness);
+ mBumpyRotate->setVisible(show_bumpiness);
+ mBumpyOffsetU->setVisible(show_bumpiness);
+ mBumpyOffsetV->setVisible(show_bumpiness);
- getChild<LLSpinCtrl>("rptctrl")->setVisible(show_material || show_media);
+ mTexRepeat->setVisible(show_material || show_media);
// PBR controls
updateVisibilityGLTF(objectp);
}
-// static
-void LLPanelFace::onCommitMaterialType(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialType()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
// Force to default states to side-step problems with menu contents
// and generally reflecting old state when switching tabs or objects
//
- self->updateShinyControls(false,true);
- self->updateBumpyControls(false,true);
- self->updateUI();
+ updateShinyControls(false, true);
+ updateBumpyControls(false, true);
+ updateUI();
}
-// static
-void LLPanelFace::onCommitPbrType(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitPbrType()
{
- LLPanelFace* self = (LLPanelFace*)userdata;
// Force to default states to side-step problems with menu contents
// and generally reflecting old state when switching tabs or objects
//
- self->updateUI();
+ updateUI();
}
-// static
-void LLPanelFace::onCommitBump(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitBump()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
-
- LLComboBox* mComboBumpiness = self->getChild<LLComboBox>("combobox bumpiness");
- if(!mComboBumpiness)
- return;
-
- U32 bumpiness = mComboBumpiness->getCurrentIndex();
-
- self->sendBump(bumpiness);
+ sendBump(mComboBumpiness->getCurrentIndex());
}
-// static
-void LLPanelFace::onCommitTexGen(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitTexGen()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->sendTexGen();
+ sendTexGen();
}
-// static
void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_shiny_combobox)
{
LLUUID shiny_texture_ID = mShinyTextureCtrl->getImageAssetID();
LL_DEBUGS("Materials") << "Shiny texture selected: " << shiny_texture_ID << LL_ENDL;
- LLComboBox* comboShiny = getChild<LLComboBox>("combobox shininess");
- if(mess_with_shiny_combobox)
+ if (mess_with_shiny_combobox)
{
- if (!comboShiny)
- {
- return;
- }
if (!shiny_texture_ID.isNull() && is_setting_texture)
{
- if (!comboShiny->itemExists(USE_TEXTURE))
+ if (!mComboShininess->itemExists(USE_TEXTURE))
{
- comboShiny->add(USE_TEXTURE);
+ mComboShininess->add(USE_TEXTURE);
}
- comboShiny->setSimple(USE_TEXTURE);
+ mComboShininess->setSimple(USE_TEXTURE);
}
else
{
- if (comboShiny->itemExists(USE_TEXTURE))
+ if (mComboShininess->itemExists(USE_TEXTURE))
{
- comboShiny->remove(SHINY_TEXTURE);
- comboShiny->selectFirstItem();
+ mComboShininess->remove(SHINY_TEXTURE);
+ mComboShininess->selectFirstItem();
}
}
}
else
{
- if (shiny_texture_ID.isNull() && comboShiny && comboShiny->itemExists(USE_TEXTURE))
+ if (shiny_texture_ID.isNull() && mComboShininess->itemExists(USE_TEXTURE))
{
- comboShiny->remove(SHINY_TEXTURE);
- comboShiny->selectFirstItem();
+ mComboShininess->remove(SHINY_TEXTURE);
+ mComboShininess->selectFirstItem();
}
}
@@ -3053,117 +2956,79 @@ void LLPanelFace::updateShinyControls(bool is_setting_texture, bool mess_with_sh
U32 material_type = mRadioMaterialType->getSelectedIndex();
bool show_material = (materials_media == MATMEDIA_MATERIAL);
bool show_shininess = show_material && (material_type == MATTYPE_SPECULAR) && mComboMatMedia->getEnabled();
- U32 shiny_value = comboShiny->getCurrentIndex();
+ U32 shiny_value = mComboShininess->getCurrentIndex();
bool show_shinyctrls = (shiny_value == SHINY_TEXTURE) && show_shininess; // Use texture
- getChildView("label glossiness")->setVisible(show_shinyctrls);
- getChildView("glossiness")->setVisible(show_shinyctrls);
- getChildView("label environment")->setVisible(show_shinyctrls);
- getChildView("environment")->setVisible(show_shinyctrls);
- getChildView("label shinycolor")->setVisible(show_shinyctrls);
+ mLabelGlossiness->setVisible(show_shinyctrls);
+ mGlossiness->setVisible(show_shinyctrls);
+ mLabelEnvironment->setVisible(show_shinyctrls);
+ mEnvironment->setVisible(show_shinyctrls);
+ mLabelShiniColor->setVisible(show_shinyctrls);
mShinyColorSwatch->setVisible(show_shinyctrls);
}
-// static
void LLPanelFace::updateBumpyControls(bool is_setting_texture, bool mess_with_combobox)
{
LLUUID bumpy_texture_ID = mBumpyTextureCtrl->getImageAssetID();
LL_DEBUGS("Materials") << "texture: " << bumpy_texture_ID << (mess_with_combobox ? "" : " do not") << " update combobox" << LL_ENDL;
- LLComboBox* comboBumpy = getChild<LLComboBox>("combobox bumpiness");
- if (!comboBumpy)
- {
- return;
- }
if (mess_with_combobox)
{
if (!bumpy_texture_ID.isNull() && is_setting_texture)
{
- if (!comboBumpy->itemExists(USE_TEXTURE))
+ if (!mComboBumpiness->itemExists(USE_TEXTURE))
{
- comboBumpy->add(USE_TEXTURE);
+ mComboBumpiness->add(USE_TEXTURE);
}
- comboBumpy->setSimple(USE_TEXTURE);
+ mComboBumpiness->setSimple(USE_TEXTURE);
}
else
{
- if (comboBumpy->itemExists(USE_TEXTURE))
+ if (mComboBumpiness->itemExists(USE_TEXTURE))
{
- comboBumpy->remove(BUMPY_TEXTURE);
- comboBumpy->selectFirstItem();
+ mComboBumpiness->remove(BUMPY_TEXTURE);
+ mComboBumpiness->selectFirstItem();
}
}
}
}
-// static
-void LLPanelFace::onCommitShiny(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitShiny()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
-
-
- LLComboBox* mComboShininess = self->getChild<LLComboBox>("combobox shininess");
- if(!mComboShininess)
- return;
-
- U32 shininess = mComboShininess->getCurrentIndex();
-
- self->sendShiny(shininess);
+ sendShiny(mComboShininess->getCurrentIndex());
}
-// static
void LLPanelFace::updateAlphaControls()
{
- LLComboBox* comboAlphaMode = getChild<LLComboBox>("combobox alphamode");
- if (!comboAlphaMode)
- {
- return;
- }
- U32 alpha_value = comboAlphaMode->getCurrentIndex();
+ U32 alpha_value = mComboAlphaMode->getCurrentIndex();
bool show_alphactrls = (alpha_value == ALPHAMODE_MASK); // Alpha masking
- U32 mat_media = MATMEDIA_MATERIAL;
- if (mComboMatMedia)
- {
- mat_media = mComboMatMedia->getCurrentIndex();
- }
-
- U32 mat_type = MATTYPE_DIFFUSE;
- if(mRadioMaterialType)
- {
- mat_type = mRadioMaterialType->getSelectedIndex();
- }
+ U32 mat_media = mComboMatMedia->getCurrentIndex();
+ U32 mat_type = mRadioMaterialType->getSelectedIndex();
show_alphactrls = show_alphactrls && (mat_media == MATMEDIA_MATERIAL);
show_alphactrls = show_alphactrls && (mat_type == MATTYPE_DIFFUSE);
- getChildView("label maskcutoff")->setVisible(show_alphactrls);
- getChildView("maskcutoff")->setVisible(show_alphactrls);
+ mLabelMaskCutoff->setVisible(show_alphactrls);
+ mMaskCutoff->setVisible(show_alphactrls);
}
-// static
-void LLPanelFace::onCommitAlphaMode(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitAlphaMode()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->updateAlphaControls();
- LLSelectedTEMaterial::setDiffuseAlphaMode(self,self->getCurrentDiffuseAlphaMode());
+ updateAlphaControls();
+ LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode());
}
-// static
-void LLPanelFace::onCommitFullbright(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitFullbright()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->sendFullbright();
+ sendFullbright();
}
-// static
-void LLPanelFace::onCommitGlow(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitGlow()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->sendGlow();
+ sendGlow();
}
-// static
-bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragPbr(LLInventoryItem* item)
{
bool accept = true;
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -3180,9 +3045,8 @@ bool LLPanelFace::onDragPbr(LLUICtrl*, LLInventoryItem* item)
return accept;
}
-void LLPanelFace::onCommitPbr(const LLSD& data)
+void LLPanelFace::onCommitPbr()
{
- if (!mPBRTextureCtrl) return;
if (!mPBRTextureCtrl->getTentative())
{
// we grab the item id first, because we want to do a
@@ -3200,16 +3064,15 @@ void LLPanelFace::onCommitPbr(const LLSD& data)
}
}
-void LLPanelFace::onCancelPbr(const LLSD& data)
+void LLPanelFace::onCancelPbr()
{
LLSelectMgr::getInstance()->selectionRevertGLTFMaterials();
}
-void LLPanelFace::onSelectPbr(const LLSD& data)
+void LLPanelFace::onSelectPbr()
{
LLSelectMgr::getInstance()->saveSelectedObjectTextures();
- if (!mPBRTextureCtrl) return;
if (!mPBRTextureCtrl->getTentative())
{
// we grab the item id first, because we want to do a
@@ -3226,8 +3089,7 @@ void LLPanelFace::onSelectPbr(const LLSD& data)
}
}
-// static
-bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
+bool LLPanelFace::onDragTexture(LLInventoryItem* item)
{
bool accept = true;
for (LLObjectSelection::root_iterator iter = LLSelectMgr::getInstance()->getSelection()->root_begin();
@@ -3244,18 +3106,18 @@ bool LLPanelFace::onDragTexture(LLUICtrl*, LLInventoryItem* item)
return accept;
}
-void LLPanelFace::onCommitTexture( const LLSD& data )
+void LLPanelFace::onCommitTexture()
{
add(LLStatViewer::EDIT_TEXTURE, 1);
sendTexture();
}
-void LLPanelFace::onCancelTexture(const LLSD& data)
+void LLPanelFace::onCancelTexture()
{
LLSelectMgr::getInstance()->selectionRevertTextures();
}
-void LLPanelFace::onSelectTexture(const LLSD& data)
+void LLPanelFace::onSelectTexture()
{
LLSelectMgr::getInstance()->saveSelectedObjectTextures();
sendTexture();
@@ -3265,31 +3127,25 @@ void LLPanelFace::onSelectTexture(const LLSD& data)
bool missing_asset = false;
LLSelectedTE::getImageFormat(image_format, identical_image_format, missing_asset);
- LLCtrlSelectionInterface* combobox_alphamode =
- childGetSelectionInterface("combobox alphamode");
-
U32 alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_NONE;
- if (combobox_alphamode && !missing_asset)
+ if (!missing_asset)
{
switch (image_format)
{
case GL_RGBA:
case GL_ALPHA:
- {
- alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
- }
+ alpha_mode = LLMaterial::DIFFUSE_ALPHA_MODE_BLEND;
+ break;
+ case GL_RGB:
break;
-
- case GL_RGB: break;
default:
- {
- LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
- }
+ LL_WARNS() << "Unexpected tex format in LLPanelFace...resorting to no alpha" << LL_ENDL;
break;
}
- combobox_alphamode->selectNthItem(alpha_mode);
+ mComboAlphaMode->getSelectionInterface()->selectNthItem(alpha_mode);
}
+
LLSelectedTEMaterial::setDiffuseAlphaMode(this, getCurrentDiffuseAlphaMode());
}
@@ -3299,13 +3155,13 @@ void LLPanelFace::onCloseTexturePicker(const LLSD& data)
updateUI();
}
-void LLPanelFace::onCommitSpecularTexture( const LLSD& data )
+void LLPanelFace::onCommitSpecularTexture(const LLSD& data)
{
LL_DEBUGS("Materials") << data << LL_ENDL;
sendShiny(SHINY_TEXTURE);
}
-void LLPanelFace::onCommitNormalTexture( const LLSD& data )
+void LLPanelFace::onCommitNormalTexture(const LLSD& data)
{
LL_DEBUGS("Materials") << data << LL_ENDL;
LLUUID nmap_id = getCurrentNormalMap();
@@ -3348,34 +3204,32 @@ void LLPanelFace::onSelectNormalTexture(const LLSD& data)
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to edit existing media settings on a prim or prim face
// TODO: test if there is media on the item and only allow editing if present
-void LLPanelFace::onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnEditMedia()
{
- LLPanelFace* self = (LLPanelFace*)userdata;
- self->refreshMedia();
+ refreshMedia();
LLFloaterReg::showInstance("media_settings");
}
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to delete media from a prim or prim face
-void LLPanelFace::onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnDeleteMedia()
{
LLNotificationsUtil::add("DeleteMedia", LLSD(), LLSD(), deleteMediaConfirm);
}
//////////////////////////////////////////////////////////////////////////////
// called when a user wants to add media to a prim or prim face
-void LLPanelFace::onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onClickBtnAddMedia()
{
// check if multiple faces are selected
if (LLSelectMgr::getInstance()->getSelection()->isMultipleTESelected())
{
- LLPanelFace* self = (LLPanelFace*)userdata;
- self->refreshMedia();
+ refreshMedia();
LLNotificationsUtil::add("MultipleFacesSelected", LLSD(), LLSD(), multipleFacesSelectedConfirm);
}
else
{
- onClickBtnEditMedia(ctrl, userdata);
+ onClickBtnEditMedia();
}
}
@@ -3416,396 +3270,316 @@ bool LLPanelFace::multipleFacesSelectedConfirm(const LLSD& notification, const L
return false;
}
-//static
-void LLPanelFace::syncOffsetX(LLPanelFace* self, F32 offsetU)
+void LLPanelFace::syncOffsetX(F32 offsetU)
{
- LLSelectedTEMaterial::setNormalOffsetX(self,offsetU);
- LLSelectedTEMaterial::setSpecularOffsetX(self,offsetU);
- self->getChild<LLSpinCtrl>("TexOffsetU")->forceSetValue(offsetU);
- self->sendTextureInfo();
+ LLSelectedTEMaterial::setNormalOffsetX(this, offsetU);
+ LLSelectedTEMaterial::setSpecularOffsetX(this, offsetU);
+ mTexOffsetU->forceSetValue(LLSD(offsetU));
+ sendTextureInfo();
}
-//static
-void LLPanelFace::syncOffsetY(LLPanelFace* self, F32 offsetV)
+void LLPanelFace::syncOffsetY(F32 offsetV)
{
- LLSelectedTEMaterial::setNormalOffsetY(self,offsetV);
- LLSelectedTEMaterial::setSpecularOffsetY(self,offsetV);
- self->getChild<LLSpinCtrl>("TexOffsetV")->forceSetValue(offsetV);
- self->sendTextureInfo();
+ LLSelectedTEMaterial::setNormalOffsetY(this, offsetV);
+ LLSelectedTEMaterial::setSpecularOffsetY(this, offsetV);
+ mTexOffsetV->forceSetValue(LLSD(offsetV));
+ sendTextureInfo();
}
-//static
-void LLPanelFace::onCommitMaterialBumpyOffsetX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyOffsetX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetX(self,self->getCurrentBumpyOffsetU());
+ syncOffsetX(getCurrentBumpyOffsetU());
}
else
{
- LLSelectedTEMaterial::setNormalOffsetX(self,self->getCurrentBumpyOffsetU());
+ LLSelectedTEMaterial::setNormalOffsetX(this, getCurrentBumpyOffsetU());
}
-
}
-//static
-void LLPanelFace::onCommitMaterialBumpyOffsetY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyOffsetY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetY(self,self->getCurrentBumpyOffsetV());
+ syncOffsetY(getCurrentBumpyOffsetV());
}
else
{
- LLSelectedTEMaterial::setNormalOffsetY(self,self->getCurrentBumpyOffsetV());
+ LLSelectedTEMaterial::setNormalOffsetY(this, getCurrentBumpyOffsetV());
}
}
-//static
-void LLPanelFace::onCommitMaterialShinyOffsetX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyOffsetX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetX(self, self->getCurrentShinyOffsetU());
+ syncOffsetX(getCurrentShinyOffsetU());
}
else
{
- LLSelectedTEMaterial::setSpecularOffsetX(self,self->getCurrentShinyOffsetU());
+ LLSelectedTEMaterial::setSpecularOffsetX(this, getCurrentShinyOffsetU());
}
}
-//static
-void LLPanelFace::onCommitMaterialShinyOffsetY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyOffsetY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetY(self,self->getCurrentShinyOffsetV());
+ syncOffsetY(getCurrentShinyOffsetV());
}
else
{
- LLSelectedTEMaterial::setSpecularOffsetY(self,self->getCurrentShinyOffsetV());
+ LLSelectedTEMaterial::setSpecularOffsetY(this, getCurrentShinyOffsetV());
}
}
-//static
-void LLPanelFace::syncRepeatX(LLPanelFace* self, F32 scaleU)
+void LLPanelFace::syncRepeatX(F32 scaleU)
{
- LLSelectedTEMaterial::setNormalRepeatX(self,scaleU);
- LLSelectedTEMaterial::setSpecularRepeatX(self,scaleU);
- self->sendTextureInfo();
+ LLSelectedTEMaterial::setNormalRepeatX(this, scaleU);
+ LLSelectedTEMaterial::setSpecularRepeatX(this, scaleU);
+ sendTextureInfo();
}
-//static
-void LLPanelFace::syncRepeatY(LLPanelFace* self, F32 scaleV)
+void LLPanelFace::syncRepeatY(F32 scaleV)
{
- LLSelectedTEMaterial::setNormalRepeatY(self,scaleV);
- LLSelectedTEMaterial::setSpecularRepeatY(self,scaleV);
- self->sendTextureInfo();
+ LLSelectedTEMaterial::setNormalRepeatY(this, scaleV);
+ LLSelectedTEMaterial::setSpecularRepeatY(this, scaleV);
+ sendTextureInfo();
}
-//static
-void LLPanelFace::onCommitMaterialBumpyScaleX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyScaleX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- F32 bumpy_scale_u = self->getCurrentBumpyScaleU();
- if (self->isIdenticalPlanarTexgen())
+ F32 bumpy_scale_u = getCurrentBumpyScaleU();
+ if (isIdenticalPlanarTexgen())
{
bumpy_scale_u *= 0.5f;
}
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(self->getCurrentBumpyScaleU());
- syncRepeatX(self, bumpy_scale_u);
+ mTexScaleU->forceSetValue(LLSD(getCurrentBumpyScaleU()));
+ syncRepeatX(bumpy_scale_u);
}
else
{
- LLSelectedTEMaterial::setNormalRepeatX(self,bumpy_scale_u);
+ LLSelectedTEMaterial::setNormalRepeatX(this, bumpy_scale_u);
}
}
-//static
-void LLPanelFace::onCommitMaterialBumpyScaleY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyScaleY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- F32 bumpy_scale_v = self->getCurrentBumpyScaleV();
- if (self->isIdenticalPlanarTexgen())
+ F32 bumpy_scale_v = getCurrentBumpyScaleV();
+ if (isIdenticalPlanarTexgen())
{
bumpy_scale_v *= 0.5f;
}
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(self->getCurrentBumpyScaleV());
- syncRepeatY(self, bumpy_scale_v);
+ mTexScaleV->forceSetValue(LLSD(getCurrentBumpyScaleV()));
+ syncRepeatY(bumpy_scale_v);
}
else
{
- LLSelectedTEMaterial::setNormalRepeatY(self,bumpy_scale_v);
+ LLSelectedTEMaterial::setNormalRepeatY(this, bumpy_scale_v);
}
}
-//static
-void LLPanelFace::onCommitMaterialShinyScaleX(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyScaleX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- F32 shiny_scale_u = self->getCurrentShinyScaleU();
- if (self->isIdenticalPlanarTexgen())
+ F32 shiny_scale_u = getCurrentShinyScaleU();
+ if (isIdenticalPlanarTexgen())
{
shiny_scale_u *= 0.5f;
}
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexScaleU")->forceSetValue(self->getCurrentShinyScaleU());
- syncRepeatX(self, shiny_scale_u);
+ mTexScaleU->forceSetValue(LLSD(getCurrentShinyScaleU()));
+ syncRepeatX(shiny_scale_u);
}
else
{
- LLSelectedTEMaterial::setSpecularRepeatX(self,shiny_scale_u);
+ LLSelectedTEMaterial::setSpecularRepeatX(this, shiny_scale_u);
}
}
-//static
-void LLPanelFace::onCommitMaterialShinyScaleY(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyScaleY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- F32 shiny_scale_v = self->getCurrentShinyScaleV();
- if (self->isIdenticalPlanarTexgen())
+ F32 shiny_scale_v = getCurrentShinyScaleV();
+ if (isIdenticalPlanarTexgen())
{
shiny_scale_v *= 0.5f;
}
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexScaleV")->forceSetValue(self->getCurrentShinyScaleV());
- syncRepeatY(self, shiny_scale_v);
+ mTexScaleV->forceSetValue(LLSD(getCurrentShinyScaleV()));
+ syncRepeatY(shiny_scale_v);
}
else
{
- LLSelectedTEMaterial::setSpecularRepeatY(self,shiny_scale_v);
+ LLSelectedTEMaterial::setSpecularRepeatY(this, shiny_scale_v);
}
}
-//static
-void LLPanelFace::syncMaterialRot(LLPanelFace* self, F32 rot, int te)
+void LLPanelFace::syncMaterialRot(F32 rot, int te)
{
- LLSelectedTEMaterial::setNormalRotation(self,rot * DEG_TO_RAD, te);
- LLSelectedTEMaterial::setSpecularRotation(self,rot * DEG_TO_RAD, te);
- self->sendTextureInfo();
+ LLSelectedTEMaterial::setNormalRotation(this, rot * DEG_TO_RAD, te);
+ LLSelectedTEMaterial::setSpecularRotation(this, rot * DEG_TO_RAD, te);
+ sendTextureInfo();
}
-//static
-void LLPanelFace::onCommitMaterialBumpyRot(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialBumpyRot()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexRot")->forceSetValue(self->getCurrentBumpyRot());
- syncMaterialRot(self, self->getCurrentBumpyRot());
+ mTexRotate->forceSetValue(LLSD(getCurrentBumpyRot()));
+ syncMaterialRot(getCurrentBumpyRot());
}
else
{
- if ((bool)self->childGetValue("checkbox planar align").asBoolean())
+ if (mPlanarAlign->getValue().asBoolean())
{
LLFace* last_face = NULL;
bool identical_face = false;
LLSelectedTE::getFace(last_face, identical_face);
- LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
+ LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
else
{
- LLSelectedTEMaterial::setNormalRotation(self, self->getCurrentBumpyRot() * DEG_TO_RAD);
+ LLSelectedTEMaterial::setNormalRotation(this, getCurrentBumpyRot() * DEG_TO_RAD);
}
}
}
-//static
-void LLPanelFace::onCommitMaterialShinyRot(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialShinyRot()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- self->getChild<LLSpinCtrl>("TexRot")->forceSetValue(self->getCurrentShinyRot());
- syncMaterialRot(self, self->getCurrentShinyRot());
+ mTexRotate->forceSetValue(LLSD(getCurrentShinyRot()));
+ syncMaterialRot(getCurrentShinyRot());
}
else
{
- if ((bool)self->childGetValue("checkbox planar align").asBoolean())
+ if (mPlanarAlign->getValue().asBoolean())
{
LLFace* last_face = NULL;
bool identical_face = false;
LLSelectedTE::getFace(last_face, identical_face);
- LLPanelFaceSetAlignedTEFunctor setfunc(self, last_face);
+ LLPanelFaceSetAlignedTEFunctor setfunc(this, last_face);
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
}
else
{
- LLSelectedTEMaterial::setSpecularRotation(self, self->getCurrentShinyRot() * DEG_TO_RAD);
+ LLSelectedTEMaterial::setSpecularRotation(this, getCurrentShinyRot() * DEG_TO_RAD);
}
}
}
-//static
-void LLPanelFace::onCommitMaterialGloss(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialGloss()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- LLSelectedTEMaterial::setSpecularLightExponent(self,self->getCurrentGlossiness());
+ LLSelectedTEMaterial::setSpecularLightExponent(this, getCurrentGlossiness());
}
-//static
-void LLPanelFace::onCommitMaterialEnv(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialEnv()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- llassert_always(self);
- LLSelectedTEMaterial::setEnvironmentIntensity(self,self->getCurrentEnvIntensity());
+ LLSelectedTEMaterial::setEnvironmentIntensity(this, getCurrentEnvIntensity());
}
-//static
-void LLPanelFace::onCommitMaterialMaskCutoff(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitMaterialMaskCutoff()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- LLSelectedTEMaterial::setAlphaMaskCutoff(self,self->getCurrentAlphaMaskCutoff());
+ LLSelectedTEMaterial::setAlphaMaskCutoff(this, getCurrentAlphaMaskCutoff());
}
-// static
-void LLPanelFace::onCommitTextureInfo( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureInfo()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->sendTextureInfo();
+ sendTextureInfo();
// vertical scale and repeats per meter depends on each other, so force set on changes
- self->updateUI(true);
+ updateUI(true);
}
-// static
-void LLPanelFace::onCommitTextureScaleX( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureScaleX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- F32 bumpy_scale_u = (F32)self->getChild<LLUICtrl>("TexScaleU")->getValue().asReal();
- if (self->isIdenticalPlanarTexgen())
+ F32 bumpy_scale_u = (F32)mTexScaleU->getValue().asReal();
+ if (isIdenticalPlanarTexgen())
{
bumpy_scale_u *= 0.5f;
}
- syncRepeatX(self, bumpy_scale_u);
+ syncRepeatX(bumpy_scale_u);
}
else
{
- self->sendTextureInfo();
+ sendTextureInfo();
}
- self->updateUI(true);
+ updateUI(true);
}
-// static
-void LLPanelFace::onCommitTextureScaleY( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureScaleY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- F32 bumpy_scale_v = (F32)self->getChild<LLUICtrl>("TexScaleV")->getValue().asReal();
- if (self->isIdenticalPlanarTexgen())
+ F32 bumpy_scale_v = (F32)mTexScaleV->getValue().asReal();
+ if (isIdenticalPlanarTexgen())
{
bumpy_scale_v *= 0.5f;
}
- syncRepeatY(self, bumpy_scale_v);
+ syncRepeatY(bumpy_scale_v);
}
else
{
- self->sendTextureInfo();
+ sendTextureInfo();
}
- self->updateUI(true);
+ updateUI(true);
}
-// static
-void LLPanelFace::onCommitTextureRot( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureRot()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncMaterialRot(self, (F32)self->getChild<LLUICtrl>("TexRot")->getValue().asReal());
+ syncMaterialRot((F32)mTexRotate->getValue().asReal());
}
else
{
- self->sendTextureInfo();
+ sendTextureInfo();
}
- self->updateUI(true);
+ updateUI(true);
}
-// static
-void LLPanelFace::onCommitTextureOffsetX( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureOffsetX()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetX(self, (F32)self->getChild<LLUICtrl>("TexOffsetU")->getValue().asReal());
+ syncOffsetX((F32)mTexOffsetU->getValue().asReal());
}
else
{
- self->sendTextureInfo();
+ sendTextureInfo();
}
- self->updateUI(true);
+ updateUI(true);
}
-// static
-void LLPanelFace::onCommitTextureOffsetY( LLUICtrl* ctrl, void* userdata )
+void LLPanelFace::onCommitTextureOffsetY()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- syncOffsetY(self, (F32)self->getChild<LLUICtrl>("TexOffsetV")->getValue().asReal());
+ syncOffsetY((F32)mTexOffsetV->getValue().asReal());
}
else
{
- self->sendTextureInfo();
+ sendTextureInfo();
}
- self->updateUI(true);
+ updateUI(true);
}
// Commit the number of repeats per meter
-// static
-void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitRepeatsPerMeter()
{
- LLPanelFace *self = (LLPanelFace *) userdata;
-
- LLUICtrl *repeats_ctrl = self->getChild<LLUICtrl>("rptctrl");
-
- U32 materials_media = self->mComboMatMedia->getCurrentIndex();
- U32 material_type = 0;
- if (materials_media == MATMEDIA_PBR)
- {
- material_type = self->mRadioPbrType->getSelectedIndex();
- }
- if (materials_media == MATMEDIA_MATERIAL)
- {
- material_type = self->mRadioMaterialType->getSelectedIndex();
- }
-
- F32 repeats_per_meter = (F32) repeats_ctrl->getValue().asReal();
+ F32 repeats_per_meter = (F32)mTexRepeat->getValue().asReal();
F32 obj_scale_s = 1.0f;
F32 obj_scale_t = 1.0f;
@@ -3816,64 +3590,51 @@ void LLPanelFace::onCommitRepeatsPerMeter(LLUICtrl* ctrl, void* userdata)
LLSelectedTE::getObjectScaleS(obj_scale_s, identical_scale_s);
LLSelectedTE::getObjectScaleS(obj_scale_t, identical_scale_t);
- LLUICtrl *bumpy_scale_u = self->getChild<LLUICtrl>("bumpyScaleU");
- LLUICtrl *bumpy_scale_v = self->getChild<LLUICtrl>("bumpyScaleV");
- LLUICtrl *shiny_scale_u = self->getChild<LLUICtrl>("shinyScaleU");
- LLUICtrl *shiny_scale_v = self->getChild<LLUICtrl>("shinyScaleV");
-
if (gSavedSettings.getBOOL("SyncMaterialSettings"))
{
- LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
+ LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
- bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
- bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
+ mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+ mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
- LLSelectedTEMaterial::setNormalRepeatX(self,obj_scale_s * repeats_per_meter);
- LLSelectedTEMaterial::setNormalRepeatY(self,obj_scale_t * repeats_per_meter);
+ LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
+ LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
- shiny_scale_u->setValue(obj_scale_s * repeats_per_meter);
- shiny_scale_v->setValue(obj_scale_t * repeats_per_meter);
+ mShinyScaleU->setValue(obj_scale_s * repeats_per_meter);
+ mShinyScaleV->setValue(obj_scale_t * repeats_per_meter);
- LLSelectedTEMaterial::setSpecularRepeatX(self,obj_scale_s * repeats_per_meter);
- LLSelectedTEMaterial::setSpecularRepeatY(self,obj_scale_t * repeats_per_meter);
+ LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
+ LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
}
else
{
+ U32 material_type = mRadioMaterialType->getSelectedIndex();
switch (material_type)
{
- case MATTYPE_DIFFUSE:
- {
- LLSelectMgr::getInstance()->selectionTexScaleAutofit( repeats_per_meter );
- }
+ case MATTYPE_DIFFUSE:
+ LLSelectMgr::getInstance()->selectionTexScaleAutofit(repeats_per_meter);
break;
+ case MATTYPE_NORMAL:
+ mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+ mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
- case MATTYPE_NORMAL:
- {
- bumpy_scale_u->setValue(obj_scale_s * repeats_per_meter);
- bumpy_scale_v->setValue(obj_scale_t * repeats_per_meter);
-
- LLSelectedTEMaterial::setNormalRepeatX(self,obj_scale_s * repeats_per_meter);
- LLSelectedTEMaterial::setNormalRepeatY(self,obj_scale_t * repeats_per_meter);
- }
+ LLSelectedTEMaterial::setNormalRepeatX(this, obj_scale_s * repeats_per_meter);
+ LLSelectedTEMaterial::setNormalRepeatY(this, obj_scale_t * repeats_per_meter);
break;
+ case MATTYPE_SPECULAR:
+ mBumpyScaleU->setValue(obj_scale_s * repeats_per_meter);
+ mBumpyScaleV->setValue(obj_scale_t * repeats_per_meter);
- case MATTYPE_SPECULAR:
- {
- shiny_scale_u->setValue(obj_scale_s * repeats_per_meter);
- shiny_scale_v->setValue(obj_scale_t * repeats_per_meter);
-
- LLSelectedTEMaterial::setSpecularRepeatX(self,obj_scale_s * repeats_per_meter);
- LLSelectedTEMaterial::setSpecularRepeatY(self,obj_scale_t * repeats_per_meter);
- }
+ LLSelectedTEMaterial::setSpecularRepeatX(this, obj_scale_s * repeats_per_meter);
+ LLSelectedTEMaterial::setSpecularRepeatY(this, obj_scale_t * repeats_per_meter);
+ break;
+ default:
+ llassert(false);
break;
-
- default:
- llassert(false);
- break;
}
}
// vertical scale and repeats per meter depends on each other, so force set on changes
- self->updateUI(true);
+ updateUI(true);
}
struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
@@ -3883,22 +3644,20 @@ struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
viewer_media_t pMediaImpl;
const LLTextureEntry* tep = object->getTE(te);
- const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL;
- if ( mep )
+ if (const LLMediaEntry* mep = tep->hasMedia() ? tep->getMediaData() : NULL)
{
pMediaImpl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(mep->getMediaID());
}
- if ( pMediaImpl.isNull())
+ if (pMediaImpl.isNull())
{
// If we didn't find face media for this face, check whether this face is showing parcel media.
pMediaImpl = LLViewerMedia::getInstance()->getMediaImplFromTextureID(tep->getID());
}
- if ( pMediaImpl.notNull())
+ if (pMediaImpl.notNull())
{
- LLPluginClassMedia *media = pMediaImpl->getMediaPlugin();
- if(media)
+ if (LLPluginClassMedia* media = pMediaImpl->getMediaPlugin())
{
S32 media_width = media->getWidth();
S32 media_height = media->getHeight();
@@ -3908,17 +3667,17 @@ struct LLPanelFaceSetMediaFunctor : public LLSelectedTEFunctor
F32 scale_t = (F32)media_height / (F32)texture_height;
// set scale and adjust offset
- object->setTEScaleS( te, scale_s );
- object->setTEScaleT( te, scale_t ); // don't need to flip Y anymore since QT does this for us now.
- object->setTEOffsetS( te, -( 1.0f - scale_s ) / 2.0f );
- object->setTEOffsetT( te, -( 1.0f - scale_t ) / 2.0f );
+ object->setTEScaleS(te, scale_s);
+ object->setTEScaleT(te, scale_t); // don't need to flip Y anymore since QT does this for us now.
+ object->setTEOffsetS(te, -( 1.0f - scale_s ) / 2.0f);
+ object->setTEOffsetT(te, -( 1.0f - scale_t ) / 2.0f);
}
}
return true;
};
};
-void LLPanelFace::onClickAutoFix(void* userdata)
+void LLPanelFace::onClickAutoFix()
{
LLPanelFaceSetMediaFunctor setfunc;
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&setfunc);
@@ -3927,25 +3686,23 @@ void LLPanelFace::onClickAutoFix(void* userdata)
LLSelectMgr::getInstance()->getSelection()->applyToObjects(&sendfunc);
}
-void LLPanelFace::onAlignTexture(void* userdata)
+void LLPanelFace::onAlignTexture()
{
- LLPanelFace* self = (LLPanelFace*)userdata;
- self->alignTextureLayer();
+ alignTextureLayer();
}
-void LLPanelFace::onClickBtnLoadInvPBR(void* userdata)
+void LLPanelFace::onClickBtnLoadInvPBR()
{
// Shouldn't this be "save to inventory?"
- LLPanelFace* self = (LLPanelFace*)userdata;
- self->mPBRTextureCtrl->showPicker(true);
+ mPBRTextureCtrl->showPicker(true);
}
-void LLPanelFace::onClickBtnEditPBR(void* userdata)
+void LLPanelFace::onClickBtnEditPBR()
{
LLMaterialEditor::loadLive();
}
-void LLPanelFace::onClickBtnSavePBR(void* userdata)
+void LLPanelFace::onClickBtnSavePBR()
{
LLMaterialEditor::saveObjectsMaterialAs();
}
@@ -4806,44 +4563,39 @@ bool LLPanelFace::menuEnableItem(const LLSD& userdata)
return false;
}
-
-// static
-void LLPanelFace::onCommitPlanarAlign(LLUICtrl* ctrl, void* userdata)
+void LLPanelFace::onCommitPlanarAlign()
{
- LLPanelFace* self = (LLPanelFace*) userdata;
- self->getState();
- self->sendTextureInfo();
+ getState();
+ sendTextureInfo();
}
-void LLPanelFace::updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit)
+void LLPanelFace::updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit)
{
- U32 texture_info_start;
- U32 texture_info_end;
- const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+ const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
if (texture_info == LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT)
{
- texture_info_start = 0;
- texture_info_end = LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT;
+ updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
+ {
+ for (U32 i = 0; i < LLGLTFMaterial::GLTF_TEXTURE_INFO_COUNT; ++i)
+ {
+ LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[(LLGLTFMaterial::TextureInfo)i];
+ edit(&new_transform);
+ }
+ });
}
else
{
- texture_info_start = texture_info_from_pbrtype(pbr_type);
- texture_info_end = texture_info_start + 1;
+ updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
+ {
+ LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[texture_info];
+ edit(&new_transform);
+ });
}
- updateSelectedGLTFMaterials([&](LLGLTFMaterial* new_override)
- {
- for (U32 ti = texture_info_start; ti < texture_info_end; ++ti)
- {
- LLGLTFMaterial::TextureTransform& new_transform = new_override->mTextureTransform[(LLGLTFMaterial::TextureInfo)ti];
- edit(&new_transform);
- }
- });
}
void LLPanelFace::setMaterialOverridesFromSelection()
{
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- const LLGLTFMaterial::TextureInfo texture_info = texture_info_from_pbrtype(pbr_type);
+ const LLGLTFMaterial::TextureInfo texture_info = getPBRTextureInfo();
U32 texture_info_start;
U32 texture_info_end;
if (texture_info == LLGLTFMaterial::TextureInfo::GLTF_TEXTURE_INFO_COUNT)
@@ -4916,23 +4668,17 @@ void LLPanelFace::setMaterialOverridesFromSelection()
}
}
- LLUICtrl* gltfCtrlTextureScaleU = getChild<LLUICtrl>("gltfTextureScaleU");
- LLUICtrl* gltfCtrlTextureScaleV = getChild<LLUICtrl>("gltfTextureScaleV");
- LLUICtrl* gltfCtrlTextureRotation = getChild<LLUICtrl>("gltfTextureRotation");
- LLUICtrl* gltfCtrlTextureOffsetU = getChild<LLUICtrl>("gltfTextureOffsetU");
- LLUICtrl* gltfCtrlTextureOffsetV = getChild<LLUICtrl>("gltfTextureOffsetV");
+ mPBRScaleU->setValue(transform.mScale[VX]);
+ mPBRScaleV->setValue(transform.mScale[VY]);
+ mPBRRotate->setValue(transform.mRotation * RAD_TO_DEG);
+ mPBROffsetU->setValue(transform.mOffset[VX]);
+ mPBROffsetV->setValue(transform.mOffset[VY]);
- gltfCtrlTextureScaleU->setValue(transform.mScale[VX]);
- gltfCtrlTextureScaleV->setValue(transform.mScale[VY]);
- gltfCtrlTextureRotation->setValue(transform.mRotation * RAD_TO_DEG);
- gltfCtrlTextureOffsetU->setValue(transform.mOffset[VX]);
- gltfCtrlTextureOffsetV->setValue(transform.mOffset[VY]);
-
- gltfCtrlTextureScaleU->setTentative(!scale_u_same);
- gltfCtrlTextureScaleV->setTentative(!scale_v_same);
- gltfCtrlTextureRotation->setTentative(!rotation_same);
- gltfCtrlTextureOffsetU->setTentative(!offset_u_same);
- gltfCtrlTextureOffsetV->setTentative(!offset_v_same);
+ mPBRScaleU->setTentative(!scale_u_same);
+ mPBRScaleV->setTentative(!scale_v_same);
+ mPBRRotate->setTentative(!rotation_same);
+ mPBROffsetU->setTentative(!offset_u_same);
+ mPBROffsetV->setTentative(!offset_v_same);
}
void LLPanelFace::Selection::connect()
@@ -5009,51 +4755,46 @@ bool LLPanelFace::Selection::compareSelection()
return selection_changed;
}
-void LLPanelFace::onCommitGLTFTextureScaleU(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureScaleU()
{
- const float value = (F32)ctrl->getValue().asReal();
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+ F32 value = (F32)mPBRScaleU->getValue().asReal();
+ updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
{
new_transform->mScale.mV[VX] = value;
});
}
-void LLPanelFace::onCommitGLTFTextureScaleV(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureScaleV()
{
- const float value = (F32)ctrl->getValue().asReal();
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+ F32 value = (F32)mPBRScaleV->getValue().asReal();
+ updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
{
new_transform->mScale.mV[VY] = value;
});
}
-void LLPanelFace::onCommitGLTFRotation(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFRotation()
{
- const float value = (F32)ctrl->getValue().asReal() * DEG_TO_RAD;
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+ F32 value = (F32)mPBRRotate->getValue().asReal() * DEG_TO_RAD;
+ updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
{
new_transform->mRotation = value;
});
}
-void LLPanelFace::onCommitGLTFTextureOffsetU(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureOffsetU()
{
- const float value = (F32)ctrl->getValue().asReal();
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+ F32 value = (F32)mPBROffsetU->getValue().asReal();
+ updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
{
new_transform->mOffset.mV[VX] = value;
});
}
-void LLPanelFace::onCommitGLTFTextureOffsetV(LLUICtrl* ctrl)
+void LLPanelFace::onCommitGLTFTextureOffsetV()
{
- const float value = (F32)ctrl->getValue().asReal();
- const U32 pbr_type = mRadioPbrType->getSelectedIndex();
- updateGLTFTextureTransform(value, pbr_type, [&](LLGLTFMaterial::TextureTransform* new_transform)
+ F32 value = (F32)mPBROffsetV->getValue().asReal();
+ updateGLTFTextureTransform([&](LLGLTFMaterial::TextureTransform* new_transform)
{
new_transform->mOffset.mV[VY] = value;
});
@@ -5063,47 +4804,44 @@ void LLPanelFace::onTextureSelectionChanged(LLInventoryItem* itemp)
{
LL_DEBUGS("Materials") << "item asset " << itemp->getAssetUUID() << LL_ENDL;
+ LLTextureCtrl* texture_ctrl;
U32 mattype = mRadioMaterialType->getSelectedIndex();
- std::string which_control="texture control";
switch (mattype)
{
case MATTYPE_SPECULAR:
- which_control = "shinytexture control";
+ texture_ctrl = mShinyTextureCtrl;
break;
case MATTYPE_NORMAL:
- which_control = "bumpytexture control";
+ texture_ctrl = mBumpyTextureCtrl;
break;
- // no default needed
+ default:
+ texture_ctrl = mTextureCtrl;
}
- LL_DEBUGS("Materials") << "control " << which_control << LL_ENDL;
- LLTextureCtrl* texture_ctrl = getChild<LLTextureCtrl>(which_control);
- if (texture_ctrl)
- {
- LLUUID obj_owner_id;
- std::string obj_owner_name;
- LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name);
- LLSaleInfo sale_info;
- LLSelectMgr::instance().selectGetSaleInfo(sale_info);
+ LLUUID obj_owner_id;
+ std::string obj_owner_name;
+ LLSelectMgr::instance().selectGetOwner(obj_owner_id, obj_owner_name);
- bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture?
- bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture?
- bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent?
- bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale?
+ LLSaleInfo sale_info;
+ LLSelectMgr::instance().selectGetSaleInfo(sale_info);
- if (can_copy && can_transfer)
- {
- texture_ctrl->setCanApply(true, true);
- return;
- }
+ bool can_copy = itemp->getPermissions().allowCopyBy(gAgentID); // do we have perm to copy this texture?
+ bool can_transfer = itemp->getPermissions().allowOperationBy(PERM_TRANSFER, gAgentID); // do we have perm to transfer this texture?
+ bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply texture belong to the agent?
+ bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply texture not for sale?
- // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale
- texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
+ if (can_copy && can_transfer)
+ {
+ texture_ctrl->setCanApply(true, true);
+ return;
+ }
- if (gSavedSettings.getBOOL("TextureLivePreview"))
- {
- LLNotificationsUtil::add("LivePreviewUnavailable");
- }
+ // if texture has (no-transfer) attribute it can be applied only for object which we own and is not for sale
+ texture_ctrl->setCanApply(false, can_transfer ? true : is_object_owner && not_for_sale);
+
+ if (gSavedSettings.getBOOL("TextureLivePreview"))
+ {
+ LLNotificationsUtil::add("LivePreviewUnavailable");
}
}
diff --git a/indra/newview/llpanelface.h b/indra/newview/llpanelface.h
index 6e88116a2d..dfd3201533 100644
--- a/indra/newview/llpanelface.h
+++ b/indra/newview/llpanelface.h
@@ -125,59 +125,62 @@ public:
return new_material;
}
+ LLGLTFMaterial::TextureInfo getPBRTextureInfo();
LLRender::eTexIndex getTextureChannelToEdit();
+ LLRender::eTexIndex getMatTextureChannel();
+ LLRender::eTexIndex getPBRTextureChannel();
LLRender::eTexIndex getTextureDropChannel();
LLGLTFMaterial::TextureInfo getPBRDropChannel();
protected:
- void navigateToTitleMedia(const std::string url);
- bool selectedMediaEditable();
- void clearMediaSettings();
- void updateMediaSettings();
- void updateMediaTitle();
-
- void getState();
-
- void sendTexture(); // applies and sends texture
- void sendTextureInfo(); // applies and sends texture scale, offset, etc.
- void sendColor(); // applies and sends color
- void sendAlpha(); // applies and sends transparency
- void sendBump(U32 bumpiness); // applies and sends bump map
- void sendTexGen(); // applies and sends bump map
- void sendShiny(U32 shininess); // applies and sends shininess
- void sendFullbright(); // applies and sends full bright
-
- void sendGlow();
- void alignTextureLayer();
-
- void updateCopyTexButton();
-
- void onCommitPbr(const LLSD& data);
- void onCancelPbr(const LLSD& data);
- void onSelectPbr(const LLSD& data);
- static bool onDragPbr(LLUICtrl* ctrl, LLInventoryItem* item);
-
- // this function is to return true if the drag should succeed.
- static bool onDragTexture(LLUICtrl* ctrl, LLInventoryItem* item);
-
- void onCommitTexture(const LLSD& data);
- void onCancelTexture(const LLSD& data);
- void onSelectTexture(const LLSD& data);
- void onCommitSpecularTexture(const LLSD& data);
- void onCancelSpecularTexture(const LLSD& data);
- void onSelectSpecularTexture(const LLSD& data);
- void onCommitNormalTexture(const LLSD& data);
- void onCancelNormalTexture(const LLSD& data);
- void onSelectNormalTexture(const LLSD& data);
- void onCommitColor(const LLSD& data);
- void onCommitShinyColor(const LLSD& data);
- void onCommitAlpha(const LLSD& data);
- void onCancelColor(const LLSD& data);
- void onCancelShinyColor(const LLSD& data);
- void onSelectColor(const LLSD& data);
- void onSelectShinyColor(const LLSD& data);
-
- void onCloseTexturePicker(const LLSD& data);
+ void navigateToTitleMedia(const std::string& url);
+ bool selectedMediaEditable();
+ void clearMediaSettings();
+ void updateMediaSettings();
+ void updateMediaTitle();
+
+ void getState();
+
+ void sendTexture(); // applies and sends texture
+ void sendTextureInfo(); // applies and sends texture scale, offset, etc.
+ void sendColor(); // applies and sends color
+ void sendAlpha(); // applies and sends transparency
+ void sendBump(U32 bumpiness); // applies and sends bump map
+ void sendTexGen(); // applies and sends bump map
+ void sendShiny(U32 shininess); // applies and sends shininess
+ void sendFullbright(); // applies and sends full bright
+
+ void sendGlow();
+ void alignTextureLayer();
+
+ void updateCopyTexButton();
+
+ void onCommitPbr();
+ void onCancelPbr();
+ void onSelectPbr();
+
+ // These functions are to return true if the drag should succeed
+ bool onDragPbr(LLInventoryItem* item);
+ bool onDragTexture(LLInventoryItem* item);
+
+ void onCommitTexture();
+ void onCancelTexture();
+ void onSelectTexture();
+ void onCommitSpecularTexture(const LLSD& data);
+ void onCancelSpecularTexture(const LLSD& data);
+ void onSelectSpecularTexture(const LLSD& data);
+ void onCommitNormalTexture(const LLSD& data);
+ void onCancelNormalTexture(const LLSD& data);
+ void onSelectNormalTexture(const LLSD& data);
+ void onCommitColor();
+ void onCommitShinyColor();
+ void onCommitAlpha();
+ void onCancelColor();
+ void onCancelShinyColor();
+ void onSelectColor();
+ void onSelectShinyColor();
+
+ void onCloseTexturePicker(const LLSD& data);
static bool deleteMediaConfirm(const LLSD& notification, const LLSD& response);
static bool multipleFacesSelectedConfirm(const LLSD& notification, const LLSD& response);
@@ -195,81 +198,78 @@ protected:
// Callback funcs for individual controls
//
- static void onCommitTextureInfo(LLUICtrl* ctrl, void* userdata);
- static void onCommitTextureScaleX(LLUICtrl* ctrl, void* userdata);
- static void onCommitTextureScaleY(LLUICtrl* ctrl, void* userdata);
- static void onCommitTextureRot(LLUICtrl* ctrl, void* userdata);
- static void onCommitTextureOffsetX(LLUICtrl* ctrl, void* userdata);
- static void onCommitTextureOffsetY(LLUICtrl* ctrl, void* userdata);
-
- static void onCommitMaterialBumpyScaleX( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialBumpyScaleY( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialBumpyRot( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialBumpyOffsetX( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialBumpyOffsetY( LLUICtrl* ctrl, void* userdata);
-
- static void syncRepeatX(LLPanelFace* self, F32 scaleU);
- static void syncRepeatY(LLPanelFace* self, F32 scaleV);
- static void syncOffsetX(LLPanelFace* self, F32 offsetU);
- static void syncOffsetY(LLPanelFace* self, F32 offsetV);
- static void syncMaterialRot(LLPanelFace* self, F32 rot, int te = -1);
-
- static void onCommitMaterialShinyScaleX( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialShinyScaleY( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialShinyRot( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialShinyOffsetX( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialShinyOffsetY( LLUICtrl* ctrl, void* userdata);
-
- static void onCommitMaterialGloss( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialEnv( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialMaskCutoff( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialID( LLUICtrl* ctrl, void* userdata);
-
- static void onCommitMaterialsMedia( LLUICtrl* ctrl, void* userdata);
- static void onCommitMaterialType( LLUICtrl* ctrl, void* userdata);
- static void onCommitPbrType(LLUICtrl* ctrl, void* userdata);
- static void onClickBtnEditMedia(LLUICtrl* ctrl, void* userdata);
- static void onClickBtnDeleteMedia(LLUICtrl* ctrl, void* userdata);
- static void onClickBtnAddMedia(LLUICtrl* ctrl, void* userdata);
- static void onCommitBump( LLUICtrl* ctrl, void* userdata);
- static void onCommitTexGen( LLUICtrl* ctrl, void* userdata);
- static void onCommitShiny( LLUICtrl* ctrl, void* userdata);
- static void onCommitAlphaMode( LLUICtrl* ctrl, void* userdata);
- static void onCommitFullbright( LLUICtrl* ctrl, void* userdata);
- static void onCommitGlow( LLUICtrl* ctrl, void *userdata);
- static void onCommitPlanarAlign( LLUICtrl* ctrl, void* userdata);
- static void onCommitRepeatsPerMeter( LLUICtrl* ctrl, void* userinfo);
-
- void onCommitGLTFTextureScaleU(LLUICtrl* ctrl);
- void onCommitGLTFTextureScaleV(LLUICtrl* ctrl);
- void onCommitGLTFRotation(LLUICtrl* ctrl);
- void onCommitGLTFTextureOffsetU(LLUICtrl* ctrl);
- void onCommitGLTFTextureOffsetV(LLUICtrl* ctrl);
-
- static void onClickAutoFix(void*);
- static void onAlignTexture(void*);
- static void onClickBtnLoadInvPBR(void* userdata);
- static void onClickBtnEditPBR(void* userdata);
- static void onClickBtnSavePBR(void* userdata);
+ void onCommitTextureInfo();
+ void onCommitTextureScaleX();
+ void onCommitTextureScaleY();
+ void onCommitTextureRot();
+ void onCommitTextureOffsetX();
+ void onCommitTextureOffsetY();
+
+ void onCommitMaterialBumpyScaleX();
+ void onCommitMaterialBumpyScaleY();
+ void onCommitMaterialBumpyRot();
+ void onCommitMaterialBumpyOffsetX();
+ void onCommitMaterialBumpyOffsetY();
+
+ void syncRepeatX(F32 scaleU);
+ void syncRepeatY(F32 scaleV);
+ void syncOffsetX(F32 offsetU);
+ void syncOffsetY(F32 offsetV);
+ void syncMaterialRot(F32 rot, int te = -1);
+
+ void onCommitMaterialShinyScaleX();
+ void onCommitMaterialShinyScaleY();
+ void onCommitMaterialShinyRot();
+ void onCommitMaterialShinyOffsetX();
+ void onCommitMaterialShinyOffsetY();
+
+ void onCommitMaterialGloss();
+ void onCommitMaterialEnv();
+ void onCommitMaterialMaskCutoff();
+
+ void onCommitMaterialsMedia();
+ void onCommitMaterialType();
+ void onCommitPbrType();
+ void onClickBtnEditMedia();
+ void onClickBtnDeleteMedia();
+ void onClickBtnAddMedia();
+ void onCommitBump();
+ void onCommitTexGen();
+ void onCommitShiny();
+ void onCommitAlphaMode();
+ void onCommitFullbright();
+ void onCommitGlow();
+ void onCommitPlanarAlign();
+ void onCommitRepeatsPerMeter();
+
+ void onCommitGLTFTextureScaleU();
+ void onCommitGLTFTextureScaleV();
+ void onCommitGLTFRotation();
+ void onCommitGLTFTextureOffsetU();
+ void onCommitGLTFTextureOffsetV();
+
+ void onClickAutoFix();
+ void onAlignTexture();
+ void onClickBtnLoadInvPBR();
+ void onClickBtnEditPBR();
+ void onClickBtnSavePBR();
public: // needs to be accessible to selection manager
- void onCopyColor(); // records all selected faces
- void onPasteColor(); // to specific face
- void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
- void onCopyTexture();
- void onPasteTexture();
- void onPasteTexture(LLViewerObject* objectp, S32 te);
+ void onCopyColor(); // records all selected faces
+ void onPasteColor(); // to specific face
+ void onPasteColor(LLViewerObject* objectp, S32 te); // to specific face
+ void onCopyTexture();
+ void onPasteTexture();
+ void onPasteTexture(LLViewerObject* objectp, S32 te);
protected:
- void menuDoToSelected(const LLSD& userdata);
- bool menuEnableItem(const LLSD& userdata);
-
- static F32 valueGlow(LLViewerObject* object, S32 face);
-
+ void menuDoToSelected(const LLSD& userdata);
+ bool menuEnableItem(const LLSD& userdata);
+ static F32 valueGlow(LLViewerObject* object, S32 face);
private:
- bool isAlpha() { return mIsAlpha; }
+ bool isAlpha() const { return mIsAlpha; }
// Convenience funcs to keep the visual flack to a minimum
//
@@ -292,27 +292,77 @@ private:
F32 getCurrentShinyOffsetU();
F32 getCurrentShinyOffsetV();
- LLTextureCtrl* mPBRTextureCtrl = nullptr;
- LLTextureCtrl* mTextureCtrl = nullptr;
- LLTextureCtrl* mShinyTextureCtrl = nullptr;
- LLTextureCtrl* mBumpyTextureCtrl = nullptr;
- LLColorSwatchCtrl* mColorSwatch = nullptr;
- LLColorSwatchCtrl* mShinyColorSwatch = nullptr;
-
- LLComboBox* mComboTexGen = nullptr;
-
- LLRadioGroup* mRadioMaterialType = nullptr;
- LLRadioGroup* mRadioPbrType = nullptr;
-
- LLCheckBoxCtrl* mCheckFullbright = nullptr;
-
- LLTextBox* mLabelColorTransp = nullptr;
- LLSpinCtrl* mCtrlColorTransp = nullptr; // transparency = 1 - alpha
-
- LLSpinCtrl* mCtrlGlow = nullptr;
- LLComboBox *mComboMatMedia = nullptr;
- LLMediaCtrl *mTitleMedia = nullptr;
- LLTextBox *mTitleMediaText = nullptr;
+ LLTextureCtrl* mPBRTextureCtrl { nullptr };
+ LLTextureCtrl* mTextureCtrl { nullptr };
+ LLTextureCtrl* mShinyTextureCtrl { nullptr };
+ LLTextureCtrl* mBumpyTextureCtrl { nullptr };
+ LLTextBox* mLabelColor { nullptr };
+ LLColorSwatchCtrl* mColorSwatch { nullptr };
+ LLTextBox* mLabelShiniColor { nullptr };
+ LLColorSwatchCtrl* mShinyColorSwatch { nullptr };
+
+ LLTextBox* mLabelTexGen { nullptr };
+ LLComboBox* mComboTexGen { nullptr };
+
+ LLRadioGroup* mRadioMaterialType { nullptr };
+ LLRadioGroup* mRadioPbrType { nullptr };
+
+ LLCheckBoxCtrl* mCheckFullbright { nullptr };
+
+ LLTextBox* mLabelColorTransp { nullptr };
+ LLSpinCtrl* mCtrlColorTransp { nullptr }; // transparency = 1 - alpha
+
+ LLTextBox* mLabelGlow { nullptr };
+ LLSpinCtrl* mCtrlGlow { nullptr };
+ LLComboBox* mComboMatMedia { nullptr };
+ LLMediaCtrl* mTitleMedia { nullptr };
+ LLTextBox* mTitleMediaText { nullptr };
+
+ LLTextBox* mLabelMatPermLoading { nullptr };
+ LLCheckBoxCtrl* mCheckSyncSettings { nullptr };
+
+ LLTextBox* mLabelBumpiness { nullptr };
+ LLComboBox* mComboBumpiness { nullptr };
+ LLTextBox* mLabelShininess { nullptr };
+ LLComboBox* mComboShininess { nullptr };
+ LLTextBox* mLabelAlphaMode { nullptr };
+ LLComboBox* mComboAlphaMode { nullptr };
+ LLSpinCtrl* mTexScaleU { nullptr };
+ LLSpinCtrl* mTexScaleV { nullptr };
+ LLSpinCtrl* mTexRotate { nullptr };
+ LLSpinCtrl* mTexRepeat { nullptr };
+ LLSpinCtrl* mTexOffsetU { nullptr };
+ LLSpinCtrl* mTexOffsetV { nullptr };
+ LLCheckBoxCtrl* mPlanarAlign{ nullptr };
+ LLSpinCtrl* mBumpyScaleU { nullptr };
+ LLSpinCtrl* mBumpyScaleV { nullptr };
+ LLSpinCtrl* mBumpyRotate { nullptr };
+ LLSpinCtrl* mBumpyOffsetU { nullptr };
+ LLSpinCtrl* mBumpyOffsetV { nullptr };
+ LLSpinCtrl* mShinyScaleU { nullptr };
+ LLSpinCtrl* mShinyScaleV { nullptr };
+ LLSpinCtrl* mShinyRotate { nullptr };
+ LLSpinCtrl* mShinyOffsetU { nullptr };
+ LLSpinCtrl* mShinyOffsetV { nullptr };
+ LLTextBox* mLabelGlossiness { nullptr };
+ LLSpinCtrl* mGlossiness { nullptr };
+ LLTextBox* mLabelEnvironment { nullptr };
+ LLSpinCtrl* mEnvironment { nullptr };
+ LLTextBox* mLabelMaskCutoff { nullptr };
+ LLSpinCtrl* mMaskCutoff { nullptr };
+ LLButton* mAddMedia { nullptr };
+ LLButton* mDelMedia { nullptr };
+ LLSpinCtrl* mPBRScaleU { nullptr };
+ LLSpinCtrl* mPBRScaleV { nullptr };
+ LLSpinCtrl* mPBRRotate { nullptr };
+ LLSpinCtrl* mPBROffsetU { nullptr };
+ LLSpinCtrl* mPBROffsetV { nullptr };
+
+ LLButton* mBtnAlign { nullptr };
+ LLButton* mBtnAlignTex { nullptr };
+ LLButton* mBtnPbrFromInv { nullptr };
+ LLButton* mBtnEditBbr { nullptr };
+ LLButton* mBtnSaveBbr { nullptr };
// Update visibility of controls to match current UI mode
// (e.g. materials vs media editing)
@@ -324,6 +374,20 @@ private:
// Hey look everyone, a type-safe alternative to copy and paste! :)
//
+ template<class T>
+ void getChildSetCommitCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
+ {
+ ctrl = this->getChild<T>(name);
+ ctrl->setCommitCallback(cb);
+ }
+
+ template<class T>
+ void getChildSetClickedCallback(T*& ctrl, std::string_view name, std::function<void(LLUICtrl*, const LLSD&)> cb)
+ {
+ ctrl = this->getChild<T>(name);
+ ctrl->setClickedCallback(cb);
+ }
+
// Update material parameters by applying 'edit_func' to selected TEs
//
template<
@@ -483,7 +547,7 @@ private:
void updateVisibilityGLTF(LLViewerObject* objectp = nullptr);
void updateSelectedGLTFMaterials(std::function<void(LLGLTFMaterial*)> func);
- void updateGLTFTextureTransform(float value, U32 pbr_type, std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
+ void updateGLTFTextureTransform(std::function<void(LLGLTFMaterial::TextureTransform*)> edit);
void setMaterialOverridesFromSelection();
@@ -578,41 +642,41 @@ public:
static void getMaxNormalRepeats(F32& repeats, bool& identical);
static void getCurrentDiffuseAlphaMode(U8& diffuse_alpha_mode, bool& identical, bool diffuse_texture_has_alpha);
- DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getNormalID,LLUUID::null, false, LLUUID::null)
- DEF_GET_MAT_STATE(LLUUID,const LLUUID&,getSpecularID,LLUUID::null, false, LLUUID::null)
- DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatX,1.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getSpecularRepeatY,1.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetX,0.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getSpecularOffsetY,0.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getSpecularRotation,0.0f, true, 0.001f)
-
- DEF_GET_MAT_STATE(F32,F32,getNormalRepeatX,1.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getNormalRepeatY,1.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getNormalOffsetX,0.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getNormalOffsetY,0.0f, true, 0.001f)
- DEF_GET_MAT_STATE(F32,F32,getNormalRotation,0.0f, true, 0.001f)
-
- DEF_EDIT_MAT_STATE(U8,U8,setDiffuseAlphaMode);
- DEF_EDIT_MAT_STATE(U8,U8,setAlphaMaskCutoff);
-
- DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetX);
- DEF_EDIT_MAT_STATE(F32,F32,setNormalOffsetY);
- DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatX);
- DEF_EDIT_MAT_STATE(F32,F32,setNormalRepeatY);
- DEF_EDIT_MAT_STATE(F32,F32,setNormalRotation);
-
- DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetX);
- DEF_EDIT_MAT_STATE(F32,F32,setSpecularOffsetY);
- DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatX);
- DEF_EDIT_MAT_STATE(F32,F32,setSpecularRepeatY);
- DEF_EDIT_MAT_STATE(F32,F32,setSpecularRotation);
-
- DEF_EDIT_MAT_STATE(U8,U8,setEnvironmentIntensity);
- DEF_EDIT_MAT_STATE(U8,U8,setSpecularLightExponent);
-
- DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setNormalID);
- DEF_EDIT_MAT_STATE(LLUUID,const LLUUID&,setSpecularID);
- DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&,setSpecularLightColor);
+ DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getNormalID, LLUUID::null, false, LLUUID::null);
+ DEF_GET_MAT_STATE(LLUUID, const LLUUID&, getSpecularID, LLUUID::null, false, LLUUID::null);
+ DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatX, 1.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getSpecularRepeatY, 1.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetX, 0.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getSpecularOffsetY, 0.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getSpecularRotation, 0.0f, true, 0.001f);
+
+ DEF_GET_MAT_STATE(F32, F32, getNormalRepeatX, 1.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getNormalRepeatY, 1.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getNormalOffsetX, 0.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getNormalOffsetY, 0.0f, true, 0.001f);
+ DEF_GET_MAT_STATE(F32, F32, getNormalRotation, 0.0f, true, 0.001f);
+
+ DEF_EDIT_MAT_STATE(U8, U8, setDiffuseAlphaMode);
+ DEF_EDIT_MAT_STATE(U8, U8, setAlphaMaskCutoff);
+
+ DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetX);
+ DEF_EDIT_MAT_STATE(F32, F32, setNormalOffsetY);
+ DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatX);
+ DEF_EDIT_MAT_STATE(F32, F32, setNormalRepeatY);
+ DEF_EDIT_MAT_STATE(F32, F32, setNormalRotation);
+
+ DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetX);
+ DEF_EDIT_MAT_STATE(F32, F32, setSpecularOffsetY);
+ DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatX);
+ DEF_EDIT_MAT_STATE(F32, F32, setSpecularRepeatY);
+ DEF_EDIT_MAT_STATE(F32, F32, setSpecularRotation);
+
+ DEF_EDIT_MAT_STATE(U8, U8, setEnvironmentIntensity);
+ DEF_EDIT_MAT_STATE(U8, U8, setSpecularLightExponent);
+
+ DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setNormalID);
+ DEF_EDIT_MAT_STATE(LLUUID, const LLUUID&,setSpecularID);
+ DEF_EDIT_MAT_STATE(LLColor4U, const LLColor4U&, setSpecularLightColor);
};
class LLSelectedTE
@@ -638,6 +702,8 @@ public:
DEF_GET_TE_STATE(LLTextureEntry::e_texgen,LLTextureEntry::e_texgen,getTexGen,LLTextureEntry::TEX_GEN_DEFAULT, false, LLTextureEntry::TEX_GEN_DEFAULT)
DEF_GET_TE_STATE(LLColor4,const LLColor4&,getColor,LLColor4::white, false, LLColor4::black);
};
+
+ friend struct LLPanelFaceSetTEFunctor;
};
#endif
diff --git a/indra/newview/llpanelpermissions.cpp b/indra/newview/llpanelpermissions.cpp
index aa35335ad9..0ce1f0f9d3 100644
--- a/indra/newview/llpanelpermissions.cpp
+++ b/indra/newview/llpanelpermissions.cpp
@@ -399,7 +399,7 @@ void LLPanelPermissions::refresh()
// Style for creator and owner links (both group and agent)
LLStyle::Params style_params;
- LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
style_params.color = link_color;
style_params.readonly_color = link_color;
style_params.is_link = true; // link will be added later
diff --git a/indra/newview/llreflectionmap.cpp b/indra/newview/llreflectionmap.cpp
index 31fd6f3f07..8d164b6883 100644
--- a/indra/newview/llreflectionmap.cpp
+++ b/indra/newview/llreflectionmap.cpp
@@ -220,7 +220,7 @@ F32 LLReflectionMap::getNearClip()
if (mViewerObject && mViewerObject->getVolume())
{
- ret = ((LLVOVolume*)mViewerObject)->getReflectionProbeNearClip();
+ ret = mViewerObject->getReflectionProbeNearClip();
}
else if (mGroup)
{
@@ -240,7 +240,7 @@ bool LLReflectionMap::getIsDynamic()
mViewerObject &&
mViewerObject->getVolume())
{
- return ((LLVOVolume*)mViewerObject)->getReflectionProbeIsDynamic();
+ return mViewerObject->getReflectionProbeIsDynamic();
}
return false;
diff --git a/indra/newview/llscripteditor.cpp b/indra/newview/llscripteditor.cpp
index 6f23477415..59cf3ac02b 100644
--- a/indra/newview/llscripteditor.cpp
+++ b/indra/newview/llscripteditor.cpp
@@ -122,7 +122,7 @@ void LLScriptEditor::drawLineNumbers()
const LLWString ltext = utf8str_to_wstring(llformat("%d", line.mLineNum ));
bool is_cur_line = cursor_line == line.mLineNum;
const U8 style = is_cur_line ? LLFontGL::BOLD : LLFontGL::NORMAL;
- const LLColor4 fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
+ const LLColor4& fg_color = is_cur_line ? mCursorColor : mReadOnlyFgColor;
getScriptFont()->render(
ltext, // string to draw
0, // begin offset
diff --git a/indra/newview/llsculptidsize.cpp b/indra/newview/llsculptidsize.cpp
index 3bc5ad7616..6be05fb003 100644
--- a/indra/newview/llsculptidsize.cpp
+++ b/indra/newview/llsculptidsize.cpp
@@ -29,8 +29,6 @@
#include "llvovolume.h"
#include "lldrawable.h"
#include "llvoavatar.h"
-//boost
-#include "boost/make_shared.hpp"
//...........
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index fcd1c84ba4..342048252f 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -128,12 +128,12 @@ F32 LLSelectMgr::sHighlightAlpha = 0.f;
F32 LLSelectMgr::sHighlightAlphaTest = 0.f;
F32 LLSelectMgr::sHighlightUAnim = 0.f;
F32 LLSelectMgr::sHighlightVAnim = 0.f;
-LLColor4 LLSelectMgr::sSilhouetteParentColor;
-LLColor4 LLSelectMgr::sSilhouetteChildColor;
-LLColor4 LLSelectMgr::sHighlightInspectColor;
-LLColor4 LLSelectMgr::sHighlightParentColor;
-LLColor4 LLSelectMgr::sHighlightChildColor;
-LLColor4 LLSelectMgr::sContextSilhouetteColor;
+LLUIColor LLSelectMgr::sSilhouetteParentColor;
+LLUIColor LLSelectMgr::sSilhouetteChildColor;
+LLUIColor LLSelectMgr::sHighlightInspectColor;
+LLUIColor LLSelectMgr::sHighlightParentColor;
+LLUIColor LLSelectMgr::sHighlightChildColor;
+LLUIColor LLSelectMgr::sContextSilhouetteColor;
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// struct LLDeRezInfo
@@ -6437,8 +6437,10 @@ void LLSelectMgr::renderSilhouettes(bool for_hud)
bool wireframe_selection = (gFloaterTools && gFloaterTools->getVisible()) || LLSelectMgr::sRenderHiddenSelections;
F32 fogCfx = (F32)llclamp((LLSelectMgr::getInstance()->getSelectionCenterGlobal() - gAgentCamera.getCameraPositionGlobal()).magVec() / (LLSelectMgr::getInstance()->getBBoxOfSelection().getExtentLocal().magVec() * 4), 0.0, 1.0);
- static LLColor4 sParentColor = LLColor4(sSilhouetteParentColor[VRED], sSilhouetteParentColor[VGREEN], sSilhouetteParentColor[VBLUE], LLSelectMgr::sHighlightAlpha);
- static LLColor4 sChildColor = LLColor4(sSilhouetteChildColor[VRED], sSilhouetteChildColor[VGREEN], sSilhouetteChildColor[VBLUE], LLSelectMgr::sHighlightAlpha);
+ LLColor4 sParentColor = sSilhouetteParentColor;
+ sParentColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
+ LLColor4 sChildColor = sSilhouetteChildColor;
+ sChildColor.mV[VALPHA] = LLSelectMgr::sHighlightAlpha;
auto renderMeshSelection_f = [fogCfx, wireframe_selection](LLSelectNode* node, LLViewerObject* objectp, LLColor4 hlColor)
{
@@ -8006,12 +8008,9 @@ S32 LLObjectSelection::getSelectedObjectRenderCost()
cost += object->getRenderCost(textures);
computed_objects.insert(object->getID());
- const_child_list_t children = object->getChildren();
- for (const_child_list_t::const_iterator child_iter = children.begin();
- child_iter != children.end();
- ++child_iter)
+ const const_child_list_t& children = object->getChildren();
+ for (LLViewerObject* child_obj : children)
{
- LLViewerObject* child_obj = *child_iter;
LLVOVolume *child = dynamic_cast<LLVOVolume*>( child_obj );
if (child)
{
diff --git a/indra/newview/llselectmgr.h b/indra/newview/llselectmgr.h
index 355e28595b..f8242675dc 100644
--- a/indra/newview/llselectmgr.h
+++ b/indra/newview/llselectmgr.h
@@ -44,11 +44,11 @@
#include "llcontrol.h"
#include "llviewerobject.h" // LLObjectSelection::getSelectedTEValue template
#include "llmaterial.h"
+#include "lluicolor.h"
#include <deque>
#include <boost/iterator/filter_iterator.hpp>
#include <boost/signals2.hpp>
-#include <boost/make_shared.hpp> // boost::make_shared
class LLMessageSystem;
class LLViewerTexture;
@@ -450,12 +450,12 @@ public:
static F32 sHighlightAlphaTest;
static F32 sHighlightUAnim;
static F32 sHighlightVAnim;
- static LLColor4 sSilhouetteParentColor;
- static LLColor4 sSilhouetteChildColor;
- static LLColor4 sHighlightParentColor;
- static LLColor4 sHighlightChildColor;
- static LLColor4 sHighlightInspectColor;
- static LLColor4 sContextSilhouetteColor;
+ static LLUIColor sSilhouetteParentColor;
+ static LLUIColor sSilhouetteChildColor;
+ static LLUIColor sHighlightParentColor;
+ static LLUIColor sHighlightChildColor;
+ static LLUIColor sHighlightInspectColor;
+ static LLUIColor sContextSilhouetteColor;
LLCachedControl<bool> mHideSelectedObjects;
LLCachedControl<bool> mRenderHighlightSelections;
diff --git a/indra/newview/llsettingsvo.cpp b/indra/newview/llsettingsvo.cpp
index fdb73efa14..5152570786 100644
--- a/indra/newview/llsettingsvo.cpp
+++ b/indra/newview/llsettingsvo.cpp
@@ -33,7 +33,6 @@
#include <algorithm>
#include <cstdio>
-#include <boost/make_shared.hpp>
#include "lltrace.h"
#include "llfasttimer.h"
#include "v3colorutil.h"
diff --git a/indra/newview/llsidepaneliteminfo.cpp b/indra/newview/llsidepaneliteminfo.cpp
index 7775e3d9f6..fccf745a74 100644
--- a/indra/newview/llsidepaneliteminfo.cpp
+++ b/indra/newview/llsidepaneliteminfo.cpp
@@ -351,7 +351,7 @@ void LLSidepanelItemInfo::refreshFromItem(LLViewerInventoryItem* item)
// Style for creator and owner links
LLStyle::Params style_params;
- LLColor4 link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
+ LLUIColor link_color = LLUIColorTable::instance().getColor("HTMLLinkColor");
style_params.color = link_color;
style_params.readonly_color = link_color;
style_params.is_link = true; // link will be added later
diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp
index ffe5fa394f..b1f80e48af 100644
--- a/indra/newview/llspatialpartition.cpp
+++ b/indra/newview/llspatialpartition.cpp
@@ -1051,7 +1051,8 @@ public:
LLSpatialGroup* group = (LLSpatialGroup*)base_group;
group->checkOcclusion();
- if (group->getOctreeNode()->getParent() && //never occlusion cull the root node
+ if (group->getOctreeNode() &&
+ group->getOctreeNode()->getParent() && //never occlusion cull the root node
LLPipeline::sUseOcclusion && //ignore occlusion if disabled
group->isOcclusionState(LLSpatialGroup::OCCLUDED))
{
diff --git a/indra/newview/llspeakers.cpp b/indra/newview/llspeakers.cpp
index 81002139be..4956c188fb 100644
--- a/indra/newview/llspeakers.cpp
+++ b/indra/newview/llspeakers.cpp
@@ -368,8 +368,8 @@ void LLSpeakerMgr::update(bool resort_ok)
return;
}
- LLColor4 speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
- LLColor4 overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
+ static const LLUIColor speaking_color = LLUIColorTable::instance().getColor("SpeakingColor");
+ static const LLUIColor overdriven_color = LLUIColorTable::instance().getColor("OverdrivenColor");
if(resort_ok) // only allow list changes when user is not interacting with it
{
@@ -377,16 +377,17 @@ void LLSpeakerMgr::update(bool resort_ok)
}
// update status of all current speakers
- bool voice_channel_active = (!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
+ LLVoiceClient* voice_client = LLVoiceClient::getInstance();
+ bool voice_channel_active = (!mVoiceChannel && voice_client->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive());
for (speaker_map_t::iterator speaker_it = mSpeakers.begin(); speaker_it != mSpeakers.end(); speaker_it++)
{
LLUUID speaker_id = speaker_it->first;
LLSpeaker* speakerp = speaker_it->second;
- if (voice_channel_active && LLVoiceClient::getInstance()->getVoiceEnabled(speaker_id))
+ if (voice_channel_active && voice_client->getVoiceEnabled(speaker_id))
{
- speakerp->mSpeechVolume = LLVoiceClient::getInstance()->getCurrentPower(speaker_id);
- bool moderator_muted_voice = LLVoiceClient::getInstance()->getIsModeratorMuted(speaker_id);
+ speakerp->mSpeechVolume = voice_client->getCurrentPower(speaker_id);
+ bool moderator_muted_voice = voice_client->getIsModeratorMuted(speaker_id);
if (moderator_muted_voice != speakerp->mModeratorMutedVoice)
{
speakerp->mModeratorMutedVoice = moderator_muted_voice;
@@ -394,11 +395,11 @@ void LLSpeakerMgr::update(bool resort_ok)
speakerp->fireEvent(new LLSpeakerVoiceModerationEvent(speakerp));
}
- if (LLVoiceClient::getInstance()->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice)
+ if (voice_client->getOnMuteList(speaker_id) || speakerp->mModeratorMutedVoice)
{
speakerp->mStatus = LLSpeaker::STATUS_MUTED;
}
- else if (LLVoiceClient::getInstance()->getIsSpeaking(speaker_id))
+ else if (voice_client->getIsSpeaking(speaker_id))
{
// reset inactivity expiration
if (speakerp->mStatus != LLSpeaker::STATUS_SPEAKING)
@@ -481,17 +482,18 @@ void LLSpeakerMgr::update(bool resort_ok)
void LLSpeakerMgr::updateSpeakerList()
{
// Are we bound to the currently active voice channel?
- if ((!mVoiceChannel && LLVoiceClient::getInstance()->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
+ LLVoiceClient* vocie_client = LLVoiceClient::getInstance();
+ if ((!mVoiceChannel && vocie_client->inProximalChannel()) || (mVoiceChannel && mVoiceChannel->isActive()))
{
std::set<LLUUID> participants;
- LLVoiceClient::getInstance()->getParticipantList(participants);
+ vocie_client->getParticipantList(participants);
// If we are, add all voice client participants to our list of known speakers
for (std::set<LLUUID>::iterator participant_it = participants.begin(); participant_it != participants.end(); ++participant_it)
{
setSpeaker(*participant_it,
- LLVoiceClient::getInstance()->getDisplayName(*participant_it),
+ vocie_client->getDisplayName(*participant_it),
LLSpeaker::STATUS_VOICE_ACTIVE,
- (LLVoiceClient::getInstance()->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
+ (vocie_client->isParticipantAvatar(*participant_it)?LLSpeaker::SPEAKER_AGENT:LLSpeaker::SPEAKER_EXTERNAL));
}
}
else if (mVoiceChannel)
diff --git a/indra/newview/lltexturefetch.cpp b/indra/newview/lltexturefetch.cpp
index 689c555998..69c40066b4 100644
--- a/indra/newview/lltexturefetch.cpp
+++ b/indra/newview/lltexturefetch.cpp
@@ -467,14 +467,6 @@ private:
// Locks: Mw (ctor invokes without lock)
void setDesiredDiscard(S32 discard, S32 size);
- // Threads: T*
- // Locks: Mw
- bool insertPacket(S32 index, U8* data, S32 size);
-
- // Locks: Mw
- void clearPackets();
-
-
// Locks: Mw
void removeFromCache();
@@ -592,21 +584,6 @@ private:
// Work Data
LLMutex mWorkMutex;
- struct PacketData
- {
- PacketData(U8* data, S32 size)
- : mData(data), mSize(size)
- {}
- ~PacketData() { clearData(); }
- void clearData() { delete[] mData; mData = NULL; }
-
- U8* mData;
- U32 mSize;
- };
- std::vector<PacketData*> mPackets;
- S32 mFirstPacket;
- S32 mLastPacket;
- U16 mTotalPackets;
U8 mImageCodec;
LLViewerAssetStats::duration_t mMetricsStartTime;
@@ -922,9 +899,6 @@ LLTextureFetchWorker::LLTextureFetchWorker(LLTextureFetch* fetcher,
mRetryAttempt(0),
mActiveCount(0),
mWorkMutex(),
- mFirstPacket(0),
- mLastPacket(-1),
- mTotalPackets(0),
mImageCodec(IMG_CODEC_INVALID),
mMetricsStartTime(0),
mHttpHandle(LLCORE_HTTP_HANDLE_INVALID),
@@ -980,7 +954,6 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
mFetcher->mTextureCache->writeComplete(mCacheWriteHandle, true);
}
mFormattedImage = NULL;
- clearPackets();
if (mHttpBufferArray)
{
mHttpBufferArray->release();
@@ -992,16 +965,6 @@ LLTextureFetchWorker::~LLTextureFetchWorker()
mFetcher->updateStateStats(mCacheReadCount, mCacheWriteCount, mResourceWaitCount);
}
-// Locks: Mw
-void LLTextureFetchWorker::clearPackets()
-{
- for_each(mPackets.begin(), mPackets.end(), DeletePointer());
- mPackets.clear();
- mTotalPackets = 0;
- mLastPacket = -1;
- mFirstPacket = 0;
-}
-
// Locks: Mw (ctor invokes without lock)
void LLTextureFetchWorker::setDesiredDiscard(S32 discard, S32 size)
{
@@ -1164,7 +1127,6 @@ bool LLTextureFetchWorker::doWork(S32 param)
mHttpReplySize = 0;
mHttpReplyOffset = 0;
mHaveAllData = false;
- clearPackets(); // TODO: Shouldn't be necessary
mCacheReadHandle = LLTextureCache::nullHandle();
mCacheWriteHandle = LLTextureCache::nullHandle();
setState(LOAD_FROM_TEXTURE_CACHE);
@@ -2441,8 +2403,6 @@ LLTextureFetch::LLTextureFetch(LLTextureCache* cache, bool threaded, bool qa_mod
: LLWorkerThread("TextureFetch", threaded, true),
mDebugCount(0),
mDebugPause(false),
- mPacketCount(0),
- mBadPacketCount(0),
mQueueMutex(),
mNetworkQueueMutex(),
mTextureCache(cache),
@@ -3066,43 +3026,6 @@ void LLTextureFetch::threadedUpdate()
#endif
}
-//////////////////////////////////////////////////////////////////////////////
-
-// Threads: T*
-// Locks: Mw
-bool LLTextureFetchWorker::insertPacket(S32 index, U8* data, S32 size)
-{
- LL_PROFILE_ZONE_SCOPED;
- mRequestedDeltaTimer.reset();
- if (index >= mTotalPackets)
- {
-// LL_WARNS(LOG_TXT) << "Received Image Packet " << index << " > max: " << mTotalPackets << " for image: " << mID << LL_ENDL;
- return false;
- }
- if (index > 0 && index < mTotalPackets-1 && size != MAX_IMG_PACKET_SIZE)
- {
-// LL_WARNS(LOG_TXT) << "Received bad sized packet: " << index << ", " << size << " != " << MAX_IMG_PACKET_SIZE << " for image: " << mID << LL_ENDL;
- return false;
- }
-
- if (index >= (S32)mPackets.size())
- {
- mPackets.resize(index+1, (PacketData*)NULL); // initializes v to NULL pointers
- }
- else if (mPackets[index] != NULL)
- {
-// LL_WARNS(LOG_TXT) << "Received duplicate packet: " << index << " for image: " << mID << LL_ENDL;
- return false;
- }
-
- mPackets[index] = new PacketData(data, size);
- while (mLastPacket+1 < (S32)mPackets.size() && mPackets[mLastPacket+1] != NULL)
- {
- ++mLastPacket;
- }
- return true;
-}
-
void LLTextureFetchWorker::setState(e_state new_state)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
diff --git a/indra/newview/lltexturefetch.h b/indra/newview/lltexturefetch.h
index aebd2f8f95..3405f76e37 100644
--- a/indra/newview/lltexturefetch.h
+++ b/indra/newview/lltexturefetch.h
@@ -293,8 +293,6 @@ public:
LLUUID mDebugID;
S32 mDebugCount;
bool mDebugPause;
- S32 mPacketCount;
- S32 mBadPacketCount;
static LLTrace::CountStatHandle<F64> sCacheHit;
static LLTrace::CountStatHandle<F64> sCacheAttempt;
diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp
index 92527fc3a9..e5a61b359d 100644
--- a/indra/newview/lltextureview.cpp
+++ b/indra/newview/lltextureview.cpp
@@ -323,13 +323,6 @@ void LLTextureBar::draw()
{
LLGLSUIDefault gls_ui;
- // draw the packet data
-// {
-// std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets);
-// LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color,
-// LLFontGL::LEFT, LLFontGL::TOP);
-// }
-
// draw the image size at the end
{
std::string num_str = llformat("%3dx%3d (%2d) %7d", mImagep->getWidth(), mImagep->getHeight(),
@@ -620,10 +613,9 @@ void LLGLTexMemBar::draw()
//----------------------------------------------------------------------------
- text = llformat("Textures: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
+ text = llformat("Textures: %d Fetch: %d(%d) Cache R/W: %d/%d LFS:%d RAW:%d HTP:%d DEC:%d CRE:%d ",
gTextureList.getNumImages(),
LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(),
- LLAppViewer::getTextureFetch()->mPacketCount, LLAppViewer::getTextureFetch()->mBadPacketCount,
LLAppViewer::getTextureCache()->getNumReads(), LLAppViewer::getTextureCache()->getNumWrites(),
LLLFSThread::sLocal->getPending(),
LLImageRaw::sRawImageCount,
diff --git a/indra/newview/lltoolbarview.cpp b/indra/newview/lltoolbarview.cpp
index 5180b1808c..0063e0b7fd 100644
--- a/indra/newview/lltoolbarview.cpp
+++ b/indra/newview/lltoolbarview.cpp
@@ -566,7 +566,7 @@ void LLToolBarView::draw()
// Draw drop zones if drop of a tool is active
if (isToolDragged())
{
- LLColor4 drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
+ static const LLUIColor drop_color = LLUIColorTable::instance().getColor( "ToolbarDropZoneColor" );
for (S32 i = LLToolBarEnums::TOOLBAR_FIRST; i <= LLToolBarEnums::TOOLBAR_LAST; i++)
{
diff --git a/indra/newview/llviewerchat.cpp b/indra/newview/llviewerchat.cpp
index 597cf3c98c..8b01c4ef88 100644
--- a/indra/newview/llviewerchat.cpp
+++ b/indra/newview/llviewerchat.cpp
@@ -41,7 +41,7 @@
LLViewerChat::font_change_signal_t LLViewerChat::sChatFontChangedSignal;
//static
-void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
+void LLViewerChat::getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha)
{
if(chat.mMuted)
{
@@ -90,7 +90,7 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
}
break;
default:
- r_color.setToWhite();
+ r_color = LLUIColorTable::instance().getColor("White");
}
if (!chat.mPosAgent.isExactlyZero())
@@ -101,7 +101,11 @@ void LLViewerChat::getChatColor(const LLChat& chat, LLColor4& r_color)
if (distance_squared > dist_near_chat * dist_near_chat)
{
// diminish far-off chat
- r_color.mV[VALPHA] = 0.8f;
+ r_color_alpha = 0.8f;
+ }
+ else
+ {
+ r_color_alpha = 1.0f;
}
}
}
diff --git a/indra/newview/llviewerchat.h b/indra/newview/llviewerchat.h
index a84d7dbc5d..6138358caf 100644
--- a/indra/newview/llviewerchat.h
+++ b/indra/newview/llviewerchat.h
@@ -29,15 +29,14 @@
#include "llchat.h"
#include "llfontgl.h"
-#include "v4color.h"
-
+#include "lluicolor.h"
class LLViewerChat
{
public:
typedef boost::signals2::signal<void (LLFontGL*)> font_change_signal_t;
- static void getChatColor(const LLChat& chat, LLColor4& r_color);
+ static void getChatColor(const LLChat& chat, LLUIColor& r_color, F32& r_color_alpha);
static void getChatColor(const LLChat& chat, std::string& r_color_name, F32& r_color_alpha);
static LLFontGL* getChatFont();
static S32 getChatFontSize();
diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp
index c97a512a57..9bdd246129 100644
--- a/indra/newview/llviewerfloaterreg.cpp
+++ b/indra/newview/llviewerfloaterreg.cpp
@@ -134,6 +134,7 @@
#include "llfloaterscriptlimits.h"
#include "llfloatersearch.h"
#include "llfloatersellland.h"
+#include "llfloatersettingscolor.h"
#include "llfloatersettingsdebug.h"
#include "llfloatersidepanelcontainer.h"
#include "llfloatersnapshot.h"
@@ -486,6 +487,7 @@ void LLViewerFloaterReg::registerFloaters()
LLFloaterReg::add("script_limits", "floater_script_limits.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterScriptLimits>);
LLFloaterReg::add("my_scripts", "floater_my_scripts.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterMyScripts>);
LLFloaterReg::add("sell_land", "floater_sell_land.xml", &LLFloaterSellLand::buildFloater);
+ LLFloaterReg::add("settings_color", "floater_settings_color.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsColor>);
LLFloaterReg::add("settings_debug", "floater_settings_debug.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSettingsDebug>);
LLFloaterReg::add("sound_devices", "floater_sound_devices.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundDevices>);
LLFloaterReg::add("stats", "floater_stats.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloater>);
diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp
index aa14820d55..529d6f97ca 100644
--- a/indra/newview/llviewermenu.cpp
+++ b/indra/newview/llviewermenu.cpp
@@ -539,9 +539,7 @@ void init_menus()
///
/// set up the colors
///
- LLColor4 color;
-
- LLColor4 context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
+ LLUIColor context_menu_color = LLUIColorTable::instance().getColor("MenuPopupBgColor");
gMenuAvatarSelf->setBackgroundColor( context_menu_color );
gMenuAvatarOther->setBackgroundColor( context_menu_color );
@@ -551,7 +549,7 @@ void init_menus()
gMenuLand->setBackgroundColor( context_menu_color );
- color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
+ LLUIColor color = LLUIColorTable::instance().getColor( "MenuPopupBgColor" );
gPopupMenuView->setBackgroundColor( color );
// If we are not in production, use a different color to make it apparent.
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index c4fecf8dff..83f8e96f9a 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -547,9 +547,11 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
{
LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
- if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+ if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
{
- expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
+ S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ expected_upload_cost = LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
resource_upload = true;
}
}
@@ -643,16 +645,15 @@ bool get_bulk_upload_expected_cost(
if (asset_type == LLAssetType::AT_TEXTURE && allow_2k)
{
LLPointer<LLImageFormatted> image_frmted = LLImageFormatted::createFromType(codec);
- if (gDirUtilp->fileExists(filename) && image_frmted->load(filename))
+ if (gDirUtilp->fileExists(filename) && image_frmted && image_frmted->load(filename))
{
- total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(image_frmted);
- if (image_frmted)
+ S32 biased_width = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getWidth(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ S32 biased_height = LLImageRaw::biasedDimToPowerOfTwo(image_frmted->getHeight(), LLViewerFetchedTexture::MAX_IMAGE_SIZE_DEFAULT);
+ total_cost += LLAgentBenefitsMgr::current().getTextureUploadCost(biased_width, biased_height);
+ S32 area = biased_width * biased_height;
+ if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
{
- S32 area = image_frmted->getHeight() * image_frmted->getWidth();
- if (area >= LLAgentBenefits::MIN_2K_TEXTURE_AREA)
- {
- textures_2k_count++;
- }
+ textures_2k_count++;
}
file_count++;
}
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index fd85d75d98..a2abd1d930 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -5753,7 +5753,8 @@ LLBBox LLViewerObject::getBoundingBoxAgent() const
}
if (avatar_parent && avatar_parent->isAvatar() &&
- root_edit && root_edit->mDrawable.notNull() && root_edit->mDrawable->getXform()->getParent())
+ root_edit && root_edit->mDrawable.notNull() && !root_edit->mDrawable->isDead() &&
+ root_edit->mDrawable->getXform()->getParent())
{
LLXform* parent_xform = root_edit->mDrawable->getXform()->getParent();
position_agent = (getPositionEdit() * parent_xform->getWorldRotation()) + parent_xform->getWorldPosition();
diff --git a/indra/newview/llviewerobject.h b/indra/newview/llviewerobject.h
index 09584d22a8..b6846c6716 100644
--- a/indra/newview/llviewerobject.h
+++ b/indra/newview/llviewerobject.h
@@ -266,7 +266,11 @@ public:
virtual bool isRiggedMesh() const { return false; }
virtual bool hasLightTexture() const { return false; }
virtual bool isReflectionProbe() const { return false; }
+ virtual F32 getReflectionProbeAmbiance() const { return 0.f; }
+ virtual F32 getReflectionProbeNearClip() const { return 0.f; }
virtual bool getReflectionProbeIsBox() const { return false; }
+ virtual bool getReflectionProbeIsDynamic() const { return false; };
+ virtual bool getReflectionProbeIsMirror() const { return false; };
// This method returns true if the object is over land owned by
// the agent, one of its groups, or it encroaches and
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp
index cda8c99594..435bd60917 100644
--- a/indra/newview/llviewerobjectlist.cpp
+++ b/indra/newview/llviewerobjectlist.cpp
@@ -889,6 +889,7 @@ void LLViewerObjectList::update(LLAgent &agent)
static std::vector<LLViewerObject*> idle_list;
U32 idle_count = 0;
+ mNumAvatars = 0;
{
for (std::vector<LLPointer<LLViewerObject> >::iterator active_iter = mActiveObjects.begin();
@@ -906,6 +907,10 @@ void LLViewerObjectList::update(LLAgent &agent)
idle_list[idle_count] = objectp;
}
++idle_count;
+ if (objectp->isAvatar())
+ {
+ mNumAvatars++;
+ }
}
else
{ // There shouldn't be any NULL pointers in the list, but they have caused
@@ -1715,15 +1720,15 @@ void LLViewerObjectList::clearAllMapObjectsInRegion(LLViewerRegion* regionp)
void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
- LLColor4 above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
- LLColor4 below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
- LLColor4 you_own_above_water_color =
+ static const LLUIColor above_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnAboveWater" );
+ static const LLUIColor below_water_color = LLUIColorTable::instance().getColor( "NetMapOtherOwnBelowWater" );
+ static const LLUIColor you_own_above_water_color =
LLUIColorTable::instance().getColor( "NetMapYouOwnAboveWater" );
- LLColor4 you_own_below_water_color =
+ static const LLUIColor you_own_below_water_color =
LLUIColorTable::instance().getColor( "NetMapYouOwnBelowWater" );
- LLColor4 group_own_above_water_color =
+ static const LLUIColor group_own_above_water_color =
LLUIColorTable::instance().getColor( "NetMapGroupOwnAboveWater" );
- LLColor4 group_own_below_water_color =
+ static const LLUIColor group_own_below_water_color =
LLUIColorTable::instance().getColor( "NetMapGroupOwnBelowWater" );
F32 max_radius = gSavedSettings.getF32("MiniMapPrimMaxRadius");
@@ -1753,7 +1758,7 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
// See DEV-17370 and DEV-29869/SNOW-79 for details.
approx_radius = llmin(approx_radius, max_radius);
- LLColor4U color = above_water_color;
+ LLColor4U color = above_water_color.get();
if( objectp->permYouOwner() )
{
const F32 MIN_RADIUS_FOR_OWNED_OBJECTS = 2.f;
@@ -1766,29 +1771,29 @@ void LLViewerObjectList::renderObjectsForMap(LLNetMap &netmap)
{
if ( objectp->permGroupOwner() )
{
- color = group_own_above_water_color;
+ color = group_own_above_water_color.get();
}
else
{
- color = you_own_above_water_color;
+ color = you_own_above_water_color.get();
}
}
else
{
if ( objectp->permGroupOwner() )
{
- color = group_own_below_water_color;
+ color = group_own_below_water_color.get();
}
else
{
- color = you_own_below_water_color;
+ color = you_own_below_water_color.get();
}
}
}
else
if( pos.mdV[VZ] < water_height )
{
- color = below_water_color;
+ color = below_water_color.get();
}
netmap.renderScaledPointGlobal(
diff --git a/indra/newview/llviewerobjectlist.h b/indra/newview/llviewerobjectlist.h
index ebdfd0d369..7dfa94b99f 100644
--- a/indra/newview/llviewerobjectlist.h
+++ b/indra/newview/llviewerobjectlist.h
@@ -145,6 +145,7 @@ public:
S32 getOrphanParentCount() const { return (S32) mOrphanParents.size(); }
S32 getOrphanCount() const { return mNumOrphans; }
+ S32 getAvatarCount() const { return mNumAvatars; }
void orphanize(LLViewerObject *childp, U32 parent_id, U32 ip, U32 port);
void findOrphans(LLViewerObject* objectp, U32 ip, U32 port);
@@ -191,6 +192,7 @@ protected:
std::vector<U64> mOrphanParents; // LocalID/ip,port of orphaned objects
std::vector<OrphanInfo> mOrphanChildren; // UUID's of orphaned objects
S32 mNumOrphans;
+ S32 mNumAvatars;
typedef std::vector<LLPointer<LLViewerObject> > vobj_list_t;
diff --git a/indra/newview/llviewerparceloverlay.cpp b/indra/newview/llviewerparceloverlay.cpp
index 58b8a5b677..2e9b5de72b 100755
--- a/indra/newview/llviewerparceloverlay.cpp
+++ b/indra/newview/llviewerparceloverlay.cpp
@@ -53,6 +53,14 @@
static const U8 OVERLAY_IMG_COMPONENTS = 4;
static const F32 LINE_WIDTH = 0.0625f;
+bool LLViewerParcelOverlay::sColorSetInitialized = false;
+LLUIColor LLViewerParcelOverlay::sAvailColor;
+LLUIColor LLViewerParcelOverlay::sOwnedColor;
+LLUIColor LLViewerParcelOverlay::sGroupColor;
+LLUIColor LLViewerParcelOverlay::sSelfColor;
+LLUIColor LLViewerParcelOverlay::sForSaleColor;
+LLUIColor LLViewerParcelOverlay::sAuctionColor;
+
LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_width_meters)
: mRegion( region ),
mParcelGridsPerEdge( S32( region_width_meters / PARCEL_GRID_STEP_METERS ) ),
@@ -60,6 +68,17 @@ LLViewerParcelOverlay::LLViewerParcelOverlay(LLViewerRegion* region, F32 region_
mTimeSinceLastUpdate(),
mOverlayTextureIdx(-1)
{
+ if (!sColorSetInitialized)
+ {
+ sColorSetInitialized = true;
+ sAvailColor = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
+ sOwnedColor = LLUIColorTable::instance().getColor("PropertyColorOther").get();
+ sGroupColor = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
+ sSelfColor = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
+ sForSaleColor = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
+ sAuctionColor = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+ }
+
// Create a texture to hold color information.
// 4 components
// Use mipmaps = false, clamped, NEAREST filter, for sharp edges
@@ -321,12 +340,12 @@ void LLViewerParcelOverlay::updateOverlayTexture()
mOverlayTextureIdx = 0;
}
- const LLColor4U avail = LLUIColorTable::instance().getColor("PropertyColorAvail").get();
- const LLColor4U owned = LLUIColorTable::instance().getColor("PropertyColorOther").get();
- const LLColor4U group = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
- const LLColor4U self = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
- const LLColor4U for_sale = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
- const LLColor4U auction = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+ const LLColor4U avail = sAvailColor.get();
+ const LLColor4U owned = sOwnedColor.get();
+ const LLColor4U group = sGroupColor.get();
+ const LLColor4U self = sSelfColor.get();
+ const LLColor4U for_sale = sForSaleColor.get();
+ const LLColor4U auction = sAuctionColor.get();
// Create the base texture.
U8 *raw = mImageRaw->getData();
@@ -339,7 +358,7 @@ void LLViewerParcelOverlay::updateOverlayTexture()
{
U8 ownership = mOwnership[i];
- F32 r,g,b,a;
+ U8 r,g,b,a;
// Color stored in low three bits
switch( ownership & 0x7 )
@@ -433,11 +452,11 @@ void LLViewerParcelOverlay::updatePropertyLines()
return;
LLColor4U colors[PARCEL_COLOR_MASK + 1];
- colors[PARCEL_SELF] = LLUIColorTable::instance().getColor("PropertyColorSelf").get();
- colors[PARCEL_OWNED] = LLUIColorTable::instance().getColor("PropertyColorOther").get();
- colors[PARCEL_GROUP] = LLUIColorTable::instance().getColor("PropertyColorGroup").get();
- colors[PARCEL_FOR_SALE] = LLUIColorTable::instance().getColor("PropertyColorForSale").get();
- colors[PARCEL_AUCTION] = LLUIColorTable::instance().getColor("PropertyColorAuction").get();
+ colors[PARCEL_SELF] = sSelfColor.get();
+ colors[PARCEL_OWNED] = sOwnedColor.get();
+ colors[PARCEL_GROUP] = sGroupColor.get();
+ colors[PARCEL_FOR_SALE] = sForSaleColor.get();
+ colors[PARCEL_AUCTION] = sAuctionColor.get();
mEdges.clear();
diff --git a/indra/newview/llviewerparceloverlay.h b/indra/newview/llviewerparceloverlay.h
index d78005e376..03ae464cb8 100644
--- a/indra/newview/llviewerparceloverlay.h
+++ b/indra/newview/llviewerparceloverlay.h
@@ -35,6 +35,7 @@
#include "lluuid.h"
#include "llviewertexture.h"
#include "llgl.h"
+#include "lluicolor.h"
class LLViewerRegion;
class LLVector3;
@@ -123,6 +124,14 @@ private:
};
std::vector<Edge> mEdges;
+
+ static bool sColorSetInitialized;
+ static LLUIColor sAvailColor;
+ static LLUIColor sOwnedColor;
+ static LLUIColor sGroupColor;
+ static LLUIColor sSelfColor;
+ static LLUIColor sForSaleColor;
+ static LLUIColor sAuctionColor;
};
#endif
diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp
index 15902e8a87..14228b469f 100644
--- a/indra/newview/llviewertexteditor.cpp
+++ b/indra/newview/llviewertexteditor.cpp
@@ -222,15 +222,9 @@ public:
image_rect.mTop = image_rect.mBottom + mImage->getHeight();
mImage->draw(LLRect((S32)image_rect.mLeft, (S32)image_rect.mTop, (S32)image_rect.mRight, (S32)image_rect.mBottom));
- LLColor4 color;
- if (mEditor.getReadOnly())
- {
- color = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
- }
- else
- {
- color = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
- }
+ static const LLUIColor embedded_item_readonly_col = LLUIColorTable::instance().getColor("TextEmbeddedItemReadOnlyColor");
+ static const LLUIColor embedded_item_col = LLUIColorTable::instance().getColor("TextEmbeddedItemColor");
+ const LLColor4& color = mEditor.getReadOnly() ? embedded_item_readonly_col : embedded_item_col;
F32 right_x;
mStyle->getFont()->render(mLabel, 0, image_rect.mRight + EMBEDDED_ITEM_LABEL_PADDING, draw_rect.mTop, color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::UNDERLINE, LLFontGL::NO_SHADOW, static_cast<S32>(mLabel.length()), S32_MAX, &right_x);
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 1369e3d306..98da378c0d 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -540,9 +540,9 @@ void LLViewerTexture::updateClass()
LL_WARNS() << "Low system memory detected, emergency downrezzing off screen textures" << LL_ENDL;
sDesiredDiscardBias = llmax(sDesiredDiscardBias, 1.5f);
- for (auto image : gTextureList)
+ for (auto& image : gTextureList)
{
- gTextureList.updateImageDecodePriority(image);
+ gTextureList.updateImageDecodePriority(image, false /*will modify gTextureList otherwise!*/);
}
}
diff --git a/indra/newview/llviewertexturelist.cpp b/indra/newview/llviewertexturelist.cpp
index d31c53d000..7047ce7d29 100644
--- a/indra/newview/llviewertexturelist.cpp
+++ b/indra/newview/llviewertexturelist.cpp
@@ -904,7 +904,7 @@ void LLViewerTextureList::clearFetchingRequests()
extern bool gCubeSnapshot;
-void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep)
+void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images)
{
if (imagep->isInDebug() || imagep->isUnremovable())
{
@@ -938,9 +938,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
onFace = true;
F32 radius;
F32 cos_angle_to_view_dir;
- bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
static LLCachedControl<F32> bias_unimportant_threshold(gSavedSettings, "TextureBiasUnimportantFactor", 0.25f);
F32 vsize = face->getPixelArea();
+ bool in_frustum = face->calcPixelArea(cos_angle_to_view_dir, radius);
// Scale desired texture resolution higher or lower depending on texture scale
//
@@ -948,7 +948,9 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
// shows one letter at a time
//
// Maximum usage examples: huge chunk of terrain repeats texture
- const LLTextureEntry* te = face->getTextureEntry();
+ S32 te_offset = face->getTEOffset(); // offset is -1 if not inited
+ LLViewerObject* objp = face->getViewerObject();
+ const LLTextureEntry* te = (te_offset < 0 || te_offset >= objp->getNumTEs()) ? nullptr : objp->getTE(te_offset);
F32 min_scale = te ? llmin(fabsf(te->getScaleS()), fabsf(te->getScaleT())) : 1.f;
min_scale = llclamp(min_scale * min_scale, texture_scale_min(), texture_scale_max());
vsize /= min_scale;
@@ -991,7 +993,7 @@ void LLViewerTextureList::updateImageDecodePriority(LLViewerFetchedTexture* imag
// Flush formatted images using a lazy flush
//
S32 num_refs = imagep->getNumRefs();
- if (num_refs == min_refs)
+ if (num_refs == min_refs && flush_images)
{
if (imagep->getLastReferencedTimer()->getElapsedTimeF32() > lazy_flush_timeout)
{
diff --git a/indra/newview/llviewertexturelist.h b/indra/newview/llviewertexturelist.h
index 075f6ae915..b614753b4f 100644
--- a/indra/newview/llviewertexturelist.h
+++ b/indra/newview/llviewertexturelist.h
@@ -148,7 +148,7 @@ public:
// - updates decode priority
// - updates desired discard level
// - cleans up textures that haven't been referenced in awhile
- void updateImageDecodePriority(LLViewerFetchedTexture* imagep);
+ void updateImageDecodePriority(LLViewerFetchedTexture* imagep, bool flush_images = true);
private:
F32 updateImagesCreateTextures(F32 max_time);
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 4bd1b98569..b13ccda5e0 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -2190,7 +2190,7 @@ void LLViewerWindow::initWorldUI()
gStatusBar->setFollows(FOLLOWS_LEFT | FOLLOWS_TOP | FOLLOWS_RIGHT);
gStatusBar->setShape(status_bar_container->getLocalRect());
// sync bg color with menu bar
- gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ gStatusBar->setBackgroundColor(gMenuBarView->getBackgroundColor());
// add InBack so that gStatusBar won't be drawn over menu
status_bar_container->addChildInBack(gStatusBar, 2/*tab order, after menu*/);
status_bar_container->setVisible(true);
@@ -2199,7 +2199,7 @@ void LLViewerWindow::initWorldUI()
LLView* nav_bar_container = getRootView()->getChild<LLView>("nav_bar_container");
navbar->setShape(nav_bar_container->getLocalRect());
- navbar->setBackgroundColor(gMenuBarView->getBackgroundColor().get());
+ navbar->setBackgroundColor(gMenuBarView->getBackgroundColor());
nav_bar_container->addChild(navbar);
nav_bar_container->setVisible(true);
}
@@ -2583,7 +2583,7 @@ void LLViewerWindow::setNormalControlsVisible( bool visible )
void LLViewerWindow::setMenuBackgroundColor(bool god_mode, bool dev_grid)
{
LLSD args;
- LLColor4 new_bg_color;
+ LLUIColor new_bg_color;
// god more important than project, proj more important than grid
if ( god_mode )
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 6e6ad485cf..09375a6930 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -2631,6 +2631,29 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
// Update should be happening max once per frame.
+ static LLCachedControl<S32> refreshPeriod(gSavedSettings, "AvatarExtentRefreshPeriodBatch");
+ static LLCachedControl<S32> refreshMaxPerPeriod(gSavedSettings, "AvatarExtentRefreshMaxPerBatch");
+ static S32 upd_freq = refreshPeriod; // initialise to a reasonable default of 1 batch
+ static S32 lastRecalibrationFrame{ 0 };
+
+ const S32 thisFrame = LLDrawable::getCurrentFrame();
+ if (thisFrame - lastRecalibrationFrame >= upd_freq)
+ {
+ // Only update at the start of a cycle. .
+ // update frequency = ((Num_Avatars -1 / NumberPerPeriod) + 1 ) * Periodicity
+ // Given NumberPerPeriod = 5 and Periodicity = 4
+ // | NumAvatars | frequency |
+ // +-------------+-----------+
+ // | 1 | 4 |
+ // | 2 | 4 |
+ // | 5 | 4 |
+ // | 10 | 8 |
+ // | 25 | 20 |
+
+ upd_freq = (((gObjectList.getAvatarCount() - 1) / refreshMaxPerPeriod) + 1)*refreshPeriod;
+ lastRecalibrationFrame = thisFrame;
+ }
+
if ((mLastAnimExtents[0]==LLVector3())||
(mLastAnimExtents[1])==LLVector3())
{
@@ -2638,8 +2661,9 @@ void LLVOAvatar::idleUpdate(LLAgent &agent, const F64 &time)
}
else
{
- const S32 upd_freq = 4; // force update every upd_freq frames.
- mNeedsExtentUpdate = ((LLDrawable::getCurrentFrame()+mID.mData[0])%upd_freq==0);
+ // Update extent if necessary.
+ // if the frame counnter + the first byte of the UUID % upd_freq = 0 then update the extent.
+ mNeedsExtentUpdate = ((thisFrame + mID.mData[0]) % upd_freq == 0);
}
LLScopedContextString str("avatar_idle_update " + getFullname());
@@ -2818,7 +2842,7 @@ void LLVOAvatar::idleUpdateVoiceVisualizer(bool voice_enabled, const LLVector3 &
// Notice the calls to "gAwayTimer.reset()". This resets the timer that determines how long the avatar has been
// "away", so that the avatar doesn't lapse into away-mode (and slump over) while the user is still talking.
//-----------------------------------------------------------------------------------------------------------------
- if (LLVoiceClient::getInstance()->getIsSpeaking( mID ))
+ if (LLVoiceClient::getInstance()->getIsSpeaking( mID ) && (!isInMuteList() || isSelf()))
{
if (!mVoiceVisualizer->getCurrentlySpeaking())
{
@@ -3057,30 +3081,15 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
}
else
{
- F32 morph_amt = calcMorphAmount();
- LLVisualParam *param;
-
if (!isSelf())
{
+ F32 morph_amt = calcMorphAmount();
// animate only top level params for non-self avatars
- for (param = getFirstVisualParam();
- param;
- param = getNextVisualParam())
- {
- if (param->isTweakable())
- {
- param->animate(morph_amt);
- }
- }
+ animateTweakableVisualParams(morph_amt);
}
// apply all params
- for (param = getFirstVisualParam();
- param;
- param = getNextVisualParam())
- {
- param->apply(avatar_sex);
- }
+ applyAllVisualParams(avatar_sex);
mLastAppearanceBlendTime = appearance_anim_time;
}
@@ -3088,7 +3097,7 @@ void LLVOAvatar::idleUpdateAppearanceAnimation()
}
}
-F32 LLVOAvatar::calcMorphAmount()
+F32 LLVOAvatar::calcMorphAmount() const
{
F32 appearance_anim_time = mAppearanceMorphTimer.getElapsedTimeF32();
F32 blend_frac = calc_bouncy_animation(appearance_anim_time / APPEARANCE_MORPH_TIME);
@@ -3145,7 +3154,7 @@ void LLVOAvatar::idleUpdateLipSync(bool voice_enabled)
void LLVOAvatar::idleUpdateLoadingEffect()
{
// update visibility when avatar is partially loaded
- if (updateIsFullyLoaded()) // changed?
+ if (!mFullyLoaded && updateIsFullyLoaded()) // Avoid repeat calculations by checking if mFullyLoaded is true first.
{
if (isFullyLoaded())
{
@@ -3395,7 +3404,7 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
{
is_muted = isInMuteList();
}
- bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
+ bool is_friend = isBuddy();
bool is_cloud = getIsCloud();
if (is_appearance != mNameAppearance)
@@ -3531,7 +3540,9 @@ void LLVOAvatar::idleUpdateNameTagText(bool new_name)
std::deque<LLChat>::iterator chat_iter = mChats.begin();
mNameText->clearString();
- LLColor4 new_chat = LLUIColorTable::instance().getColor( isSelf() ? "UserChatColor" : "AgentChatColor" );
+ static const LLUIColor user_chat_color = LLUIColorTable::instance().getColor("UserChatColor");
+ static const LLUIColor agent_chat_color = LLUIColorTable::instance().getColor("AgentChatColor");
+ const LLColor4& new_chat = isSelf() ? user_chat_color : agent_chat_color;
LLColor4 normal_chat = lerp(new_chat, LLColor4(0.8f, 0.8f, 0.8f, 1.f), 0.7f);
LLColor4 old_chat = lerp(normal_chat, LLColor4(0.6f, 0.6f, 0.6f, 1.f), 0.7f);
if (mTyping && mChats.size() >= MAX_BUBBLE_CHAT_UTTERANCES)
@@ -8452,7 +8463,7 @@ bool LLVOAvatar::isTooComplex() const
{
bool too_complex;
static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
- bool render_friend = (LLAvatarTracker::instance().isBuddy(getID()) && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
+ bool render_friend = (isBuddy() && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY);
if (isSelf() || render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
{
@@ -8488,7 +8499,7 @@ bool LLVOAvatar::isTooSlow() const
static LLCachedControl<S32> compelxity_render_mode(gSavedSettings, "RenderAvatarComplexityMode");
static LLCachedControl<bool> friends_only(gSavedSettings, "RenderAvatarFriendsOnly", false);
- bool is_friend = LLAvatarTracker::instance().isBuddy(getID());
+ bool is_friend = isBuddy();
bool render_friend = is_friend && compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
if (render_friend || mVisuallyMuteSetting == AV_ALWAYS_RENDER)
@@ -8545,7 +8556,7 @@ void LLVOAvatar::updateTooSlow()
if(!mTooSlowWithoutShadows) // if we were not previously above the full impostor cap
{
bool always_render_friends = compelxity_render_mode > AV_RENDER_LIMIT_BY_COMPLEXITY;
- bool render_friend_or_exception = (always_render_friends && LLAvatarTracker::instance().isBuddy( id ) ) ||
+ bool render_friend_or_exception = (always_render_friends && isBuddy()) ||
( getVisualMuteSettings() == LLVOAvatar::AV_ALWAYS_RENDER );
if( (!isSelf() || allowSelfImpostor) && !render_friend_or_exception)
{
@@ -10623,18 +10634,19 @@ void showRigInfoTabExtents(LLVOAvatar *avatar, LLJointRiggingInfoTab& tab, S32&
void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_AVATAR;
- for ( LLVOAvatar::attachment_map_t::iterator iter = mAttachmentPoints.begin(); iter != mAttachmentPoints.end(); ++iter )
+ for (const auto& iter : mAttachmentPoints)
{
- LLViewerJointAttachment* attachment = iter->second;
+ LLViewerJointAttachment* attachment = iter.second;
LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_end = attachment->mAttachedObjects.end();
- for (LLViewerJointAttachment::attachedobjs_vec_t::iterator attach_iter = attachment->mAttachedObjects.begin();
- attach_iter != attach_end; ++attach_iter)
+ for (LLViewerObject* attached_object : attachment->mAttachedObjects)
{
- LLViewerObject* attached_object = attach_iter->get();
- LLVOVolume *volume = dynamic_cast<LLVOVolume*>(attached_object);
- if (volume)
+ if (attached_object->isDead())
+ continue;
+
+ if (attached_object->getPCode() == LL_PCODE_VOLUME)
{
+ LLVOVolume* volume = (LLVOVolume*)attached_object;
volumes.push_back(volume);
if (volume->isAnimatedObject())
{
@@ -10644,15 +10656,12 @@ void LLVOAvatar::getAssociatedVolumes(std::vector<LLVOVolume*>& volumes)
continue;
}
}
- LLViewerObject::const_child_list_t& children = attached_object->getChildren();
- for (LLViewerObject::const_child_list_t::const_iterator it = children.begin();
- it != children.end(); ++it)
+
+ for (LLViewerObject* childp : attached_object->getChildren())
{
- LLViewerObject *childp = *it;
- LLVOVolume *volume = dynamic_cast<LLVOVolume*>(childp);
- if (volume)
+ if (!childp->isDead() && childp->getPCode() == LL_PCODE_VOLUME)
{
- volumes.push_back(volume);
+ volumes.push_back((LLVOVolume*)childp);
}
}
}
@@ -10691,42 +10700,40 @@ void LLVOAvatar::updateRiggingInfo()
getAssociatedVolumes(volumes);
- std::map<LLUUID,S32> curr_rigging_info_key;
+ std::map<LLUUID, S32> curr_rigging_info_key;
+
+ // Get current rigging info key
+ for (LLVOVolume* vol : volumes)
{
- // Get current rigging info key
- for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); it != volumes.end(); ++it)
+ if (vol->isMesh() && vol->getVolume())
{
- LLVOVolume *vol = *it;
- if (vol->isMesh() && vol->getVolume())
- {
- const LLUUID& mesh_id = vol->getVolume()->getParams().getSculptID();
- S32 max_lod = llmax(vol->getLOD(), vol->mLastRiggingInfoLOD);
- curr_rigging_info_key[mesh_id] = max_lod;
- }
+ const LLUUID& mesh_id = vol->getVolume()->getParams().getSculptID();
+ S32 max_lod = llmax(vol->getLOD(), vol->mLastRiggingInfoLOD);
+ curr_rigging_info_key[mesh_id] = max_lod;
}
+ }
- // Check for key change, which indicates some change in volume composition or LOD.
- if (curr_rigging_info_key == mLastRiggingInfoKey)
- {
- return;
- }
+ // Check for key change, which indicates some change in volume composition or LOD.
+ if (curr_rigging_info_key == mLastRiggingInfoKey)
+ {
+ return;
}
// Something changed. Update.
mLastRiggingInfoKey = curr_rigging_info_key;
mJointRiggingInfoTab.clear();
- for (std::vector<LLVOVolume*>::iterator it = volumes.begin(); it != volumes.end(); ++it)
+ for (LLVOVolume* vol : volumes)
{
- LLVOVolume *vol = *it;
vol->updateRiggingInfo();
mJointRiggingInfoTab.merge(vol->mJointRiggingInfoTab);
}
//LL_INFOS() << "done update rig count is " << countRigInfoTab(mJointRiggingInfoTab) << LL_ENDL;
- LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
- S32 joint_count, box_count;
- showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
- LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
+ // Remove debug only stuff on hot path
+ // LL_DEBUGS("RigSpammish") << getFullname() << " after update rig tab:" << LL_ENDL;
+ // S32 joint_count, box_count;
+ // showRigInfoTabExtents(this, mJointRiggingInfoTab, joint_count, box_count);
+ // LL_DEBUGS("RigSpammish") << "uses " << joint_count << " joints " << " nonzero boxes: " << box_count << LL_ENDL;
}
// virtual
@@ -11489,7 +11496,7 @@ void LLVOAvatar::calcMutedAVColor()
new_color = LLColor4::grey4;
change_msg = " not rendered: color is grey4";
}
- else if (LLMuteList::getInstance()->isMuted(av_id)) // the user blocked them
+ else if (isInMuteList()) // the user blocked them
{
// blocked avatars are dark grey
new_color = LLColor4::grey4;
@@ -11738,6 +11745,20 @@ F32 LLVOAvatar::getAverageGPURenderTime()
bool LLVOAvatar::isBuddy() const
{
- return LLAvatarTracker::instance().isBuddy(getID());
+ bool is_friend = false;
+ F64 now = LLFrameTimer::getTotalSeconds();
+ if (now < mCachedBuddyListUpdateTime)
+ {
+ is_friend = mCachedInBuddyList;
+ }
+ else
+ {
+ is_friend = LLAvatarTracker::instance().isBuddy(getID());
+
+ const F64 SECONDS_BETWEEN_BUDDY_UPDATES = 1;
+ mCachedBuddyListUpdateTime = now + SECONDS_BETWEEN_BUDDY_UPDATES;
+ mCachedInBuddyList = is_friend;
+ }
+ return is_friend;
}
diff --git a/indra/newview/llvoavatar.h b/indra/newview/llvoavatar.h
index 1ca8b81553..aa6aee0de5 100644
--- a/indra/newview/llvoavatar.h
+++ b/indra/newview/llvoavatar.h
@@ -422,7 +422,7 @@ protected:
bool updateIsFullyLoaded();
bool processFullyLoadedChange(bool loading);
void updateRuthTimer(bool loading);
- F32 calcMorphAmount();
+ F32 calcMorphAmount() const;
private:
bool mFirstFullyVisible;
@@ -587,6 +587,8 @@ private:
mutable bool mCachedInMuteList;
mutable F64 mCachedMuteListUpdateTime;
+ mutable bool mCachedInBuddyList = false;
+ mutable F64 mCachedBuddyListUpdateTime = 0.0;
VisualMuteSettings mVisuallyMuteSetting; // Always or never visually mute this AV
diff --git a/indra/newview/llvoicechannel.cpp b/indra/newview/llvoicechannel.cpp
index b95e43da8d..5914303e80 100644
--- a/indra/newview/llvoicechannel.cpp
+++ b/indra/newview/llvoicechannel.cpp
@@ -187,13 +187,13 @@ void LLVoiceChannel::handleError(EStatusType type)
setState(STATE_ERROR);
}
-bool LLVoiceChannel::isActive()
+bool LLVoiceChannel::isActive() const
{
// only considered active when currently bound channel matches what our channel
return callStarted() && LLVoiceClient::getInstance()->isCurrentChannel(mChannelInfo);
}
-bool LLVoiceChannel::callStarted()
+bool LLVoiceChannel::callStarted() const
{
return mState >= STATE_CALL_STARTED;
}
@@ -662,7 +662,7 @@ LLVoiceChannelProximal::LLVoiceChannelProximal() :
{
}
-bool LLVoiceChannelProximal::isActive()
+bool LLVoiceChannelProximal::isActive() const
{
return callStarted() && LLVoiceClient::getInstance()->inProximalChannel();
}
@@ -768,6 +768,7 @@ LLVoiceChannelP2P::LLVoiceChannelP2P(const LLUUID &session_id,
mReceivedCall(false),
mOutgoingCallInterface(outgoing_call_interface)
{
+ mChannelInfo = LLVoiceClient::getInstance()->getP2PChannelInfoTemplate(other_user_id);
}
void LLVoiceChannelP2P::handleStatusChange(EStatusType type)
diff --git a/indra/newview/llvoicechannel.h b/indra/newview/llvoicechannel.h
index 6af1bd57a3..d50a6f589a 100644
--- a/indra/newview/llvoicechannel.h
+++ b/indra/newview/llvoicechannel.h
@@ -74,8 +74,8 @@ public:
virtual void activate();
virtual void setChannelInfo(const LLSD &channelInfo);
virtual void requestChannelInfo();
- virtual bool isActive();
- virtual bool callStarted();
+ virtual bool isActive() const;
+ virtual bool callStarted() const;
// Session name is a UI label used for feedback about which person,
// group, or phone number you are talking to
@@ -170,7 +170,7 @@ class LLVoiceChannelProximal : public LLVoiceChannel, public LLSingleton<LLVoice
void onChange(EStatusType status, const LLSD &channelInfo, bool proximal) override;
void handleStatusChange(EStatusType status) override;
void handleError(EStatusType status) override;
- bool isActive() override;
+ bool isActive() const override;
void activate() override;
void deactivate() override;
};
diff --git a/indra/newview/llvoiceclient.cpp b/indra/newview/llvoiceclient.cpp
index 4b299a51f5..21f469abb3 100644
--- a/indra/newview/llvoiceclient.cpp
+++ b/indra/newview/llvoiceclient.cpp
@@ -281,10 +281,8 @@ void LLVoiceClient::setNonSpatialVoiceModule(const std::string &voice_server_typ
void LLVoiceClient::setHidden(bool hidden)
{
- if (mSpatialVoiceModule)
- {
- mSpatialVoiceModule->setHidden(hidden);
- }
+ LLWebRTCVoiceClient::getInstance()->setHidden(hidden);
+ LLVivoxVoiceClient::getInstance()->setHidden(hidden);
}
void LLVoiceClient::terminate()
@@ -408,13 +406,13 @@ const LLVoiceDeviceList& LLVoiceClient::getRenderDevices()
//--------------------------------------------------
// participants
-void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants)
+void LLVoiceClient::getParticipantList(std::set<LLUUID> &participants) const
{
LLWebRTCVoiceClient::getInstance()->getParticipantList(participants);
LLVivoxVoiceClient::getInstance()->getParticipantList(participants);
}
-bool LLVoiceClient::isParticipant(const LLUUID &speaker_id)
+bool LLVoiceClient::isParticipant(const LLUUID &speaker_id) const
{
return LLWebRTCVoiceClient::getInstance()->isParticipant(speaker_id) ||
LLVivoxVoiceClient::getInstance()->isParticipant(speaker_id);
@@ -718,12 +716,12 @@ void LLVoiceClient::toggleUserPTTState(void)
//-------------------------------------------
// nearby speaker accessors
-bool LLVoiceClient::getVoiceEnabled(const LLUUID& id)
+bool LLVoiceClient::getVoiceEnabled(const LLUUID& id) const
{
return isParticipant(id);
}
-std::string LLVoiceClient::getDisplayName(const LLUUID& id)
+std::string LLVoiceClient::getDisplayName(const LLUUID& id) const
{
std::string result = LLWebRTCVoiceClient::getInstance()->getDisplayName(id);
if (result.empty())
@@ -826,7 +824,7 @@ void LLVoiceClient::removeObserver(LLVoiceClientParticipantObserver* observer)
LLWebRTCVoiceClient::getInstance()->removeObserver(observer);
}
-std::string LLVoiceClient::sipURIFromID(const LLUUID &id)
+std::string LLVoiceClient::sipURIFromID(const LLUUID &id) const
{
if (mNonSpatialVoiceModule)
{
@@ -842,6 +840,22 @@ std::string LLVoiceClient::sipURIFromID(const LLUUID &id)
}
}
+LLSD LLVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const
+{
+ if (mNonSpatialVoiceModule)
+ {
+ return mNonSpatialVoiceModule->getP2PChannelInfoTemplate(id);
+ }
+ else if (mSpatialVoiceModule)
+ {
+ return mSpatialVoiceModule->getP2PChannelInfoTemplate(id);
+ }
+ else
+ {
+ return LLSD();
+ }
+}
+
LLVoiceEffectInterface* LLVoiceClient::getVoiceEffectInterface() const
{
return NULL;
diff --git a/indra/newview/llvoiceclient.h b/indra/newview/llvoiceclient.h
index 9ae18b315c..2221bc6df4 100644
--- a/indra/newview/llvoiceclient.h
+++ b/indra/newview/llvoiceclient.h
@@ -133,7 +133,7 @@ class LLVoiceP2PIncomingCallInterface
virtual void declineInvite() = 0;
};
-typedef boost::shared_ptr<LLVoiceP2PIncomingCallInterface> LLVoiceP2PIncomingCallInterfacePtr;
+typedef std::shared_ptr<LLVoiceP2PIncomingCallInterface> LLVoiceP2PIncomingCallInterfacePtr;
//////////////////////////////////
/// @class LLVoiceModuleInterface
@@ -281,7 +281,8 @@ public:
virtual void removeObserver(LLVoiceClientParticipantObserver* observer)=0;
//@}
- virtual std::string sipURIFromID(const LLUUID &id)=0;
+ virtual std::string sipURIFromID(const LLUUID &id) const=0;
+ virtual LLSD getP2PChannelInfoTemplate(const LLUUID& id) const=0;
//@}
};
@@ -451,8 +452,8 @@ public:
/////////////////////////////
// Accessors for data related to nearby speakers
- bool getVoiceEnabled(const LLUUID& id); // true if we've received data for this avatar
- std::string getDisplayName(const LLUUID& id);
+ bool getVoiceEnabled(const LLUUID& id) const; // true if we've received data for this avatar
+ std::string getDisplayName(const LLUUID& id) const;
bool isOnlineSIP(const LLUUID &id);
bool isParticipantAvatar(const LLUUID &id);
bool getIsSpeaking(const LLUUID& id);
@@ -462,8 +463,8 @@ public:
F32 getUserVolume(const LLUUID& id);
/////////////////////////////
- void getParticipantList(std::set<LLUUID> &participants);
- bool isParticipant(const LLUUID& speaker_id);
+ void getParticipantList(std::set<LLUUID> &participants) const;
+ bool isParticipant(const LLUUID& speaker_id) const;
//////////////////////////
/// @name text chat
@@ -488,7 +489,8 @@ public:
void addObserver(LLVoiceClientParticipantObserver* observer);
void removeObserver(LLVoiceClientParticipantObserver* observer);
- std::string sipURIFromID(const LLUUID &id);
+ std::string sipURIFromID(const LLUUID &id) const;
+ LLSD getP2PChannelInfoTemplate(const LLUUID& id) const;
//////////////////////////
/// @name Voice effects
diff --git a/indra/newview/llvoicevivox.cpp b/indra/newview/llvoicevivox.cpp
index 060e1243ab..2358c04236 100644
--- a/indra/newview/llvoicevivox.cpp
+++ b/indra/newview/llvoicevivox.cpp
@@ -298,7 +298,6 @@ LLVivoxVoiceClient::LLVivoxVoiceClient() :
mDevicesListUpdated(false),
mAudioSession(), // TBD - should be NULL
- mAudioSessionChanged(false),
mNextAudioSession(),
mCurrentParcelLocalID(0),
@@ -1643,7 +1642,6 @@ bool LLVivoxVoiceClient::addAndJoinSession(const sessionStatePtr_t &nextSession)
LL_INFOS("Voice") << "Adding or joining voice session " << nextSession->mHandle << LL_ENDL;
mAudioSession = nextSession;
- mAudioSessionChanged = true;
if (!mAudioSession || !mAudioSession->mReconnect)
{
mNextAudioSession.reset();
@@ -1900,9 +1898,8 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
sessionStatePtr_t oldSession = mAudioSession;
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL); // needs mAudioSession for uri
mAudioSession.reset();
- // We just notified status observers about this change. Don't do it again.
- mAudioSessionChanged = false;
// The old session may now need to be deleted.
reapSession(oldSession);
@@ -1910,9 +1907,9 @@ bool LLVivoxVoiceClient::terminateAudioSession(bool wait)
else
{
LL_WARNS("Voice") << "terminateAudioSession(" << wait << ") with NULL mAudioSession" << LL_ENDL;
+ notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
}
- notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
// Always reset the terminate request flag when we get here.
// Some slower PCs have a race condition where they can switch to an incoming P2P call faster than the state machine leaves
@@ -2154,7 +2151,6 @@ bool LLVivoxVoiceClient::runSession(const sessionStatePtr_t &session)
mIsInChannel = true;
mMuteMicDirty = true;
- mSessionTerminateRequested = false;
while (!sShuttingDown
&& mVoiceEnabled
@@ -3834,7 +3830,6 @@ void LLVivoxVoiceClient::joinedAudioSession(const sessionStatePtr_t &session)
sessionStatePtr_t oldSession = mAudioSession;
mAudioSession = session;
- mAudioSessionChanged = true;
// The old session may now need to be deleted.
reapSession(oldSession);
@@ -4980,7 +4975,7 @@ void LLVivoxVoiceClient::hangup() { leaveChannel(); }
LLVoiceP2PIncomingCallInterfacePtr LLVivoxVoiceClient::getIncomingCallInterface(const LLSD &voice_call_info)
{
- return boost::make_shared<LLVivoxVoiceP2PIncomingCall>(voice_call_info);
+ return std::make_shared<LLVivoxVoiceP2PIncomingCall>(voice_call_info);
}
bool LLVivoxVoiceClient::answerInvite(const std::string &sessionHandle)
@@ -5104,7 +5099,9 @@ void LLVivoxVoiceClient::processChannels(bool process)
bool LLVivoxVoiceClient::isCurrentChannel(const LLSD &channelInfo)
{
- if (!mProcessChannels || (channelInfo.has("voice_server_type") && channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE))
+ if (!mProcessChannels
+ || (channelInfo.has("voice_server_type") && channelInfo["voice_server_type"].asString() != VIVOX_VOICE_SERVER_TYPE)
+ || mSessionTerminateRequested)
{
return false;
}
@@ -5144,7 +5141,7 @@ bool LLVivoxVoiceClient::inProximalChannel()
return result;
}
-std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id)
+std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id) const
{
std::string result;
result = "sip:";
@@ -5155,6 +5152,14 @@ std::string LLVivoxVoiceClient::sipURIFromID(const LLUUID &id)
return result;
}
+LLSD LLVivoxVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const
+{
+ LLSD result;
+ result["channel_uri"] = sipURIFromID(id);
+ result["voice_server_type"] = VIVOX_VOICE_SERVER_TYPE;
+ return result;
+}
+
std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar)
{
std::string result;
@@ -5169,7 +5174,7 @@ std::string LLVivoxVoiceClient::sipURIFromAvatar(LLVOAvatar *avatar)
return result;
}
-std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid)
+std::string LLVivoxVoiceClient::nameFromID(const LLUUID &uuid) const
{
std::string result;
@@ -5433,8 +5438,8 @@ void LLVivoxVoiceClient::leaveChannel(void)
{
LL_DEBUGS("Voice") << "leaving channel for teleport/logout" << LL_ENDL;
mChannelName.clear();
- sessionTerminate();
}
+ sessionTerminate();
}
void LLVivoxVoiceClient::setMuteMic(bool muted)
@@ -6149,7 +6154,6 @@ void LLVivoxVoiceClient::deleteSession(const sessionStatePtr_t &session)
if(mAudioSession == session)
{
mAudioSession.reset();
- mAudioSessionChanged = true;
}
// ditto for the next audio session
@@ -6258,9 +6262,10 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
}
}
+ LLSD channel_info = getAudioSessionChannelInfo();
LL_DEBUGS("Voice")
<< " " << LLVoiceClientStatusObserver::status2string(status)
- << ", session channelInfo " << getAudioSessionChannelInfo()
+ << ", session channelInfo " << channel_info
<< ", proximal is " << inSpatialChannel()
<< LL_ENDL;
@@ -6275,7 +6280,7 @@ void LLVivoxVoiceClient::notifyStatusObservers(LLVoiceClientStatusObserver::ESta
)
{
LLVoiceClientStatusObserver* observer = *it;
- observer->onChange(status, getAudioSessionChannelInfo(), inSpatialChannel());
+ observer->onChange(status, channel_info, inSpatialChannel());
// In case onError() deleted an entry.
it = mStatusObservers.upper_bound(observer);
}
diff --git a/indra/newview/llvoicevivox.h b/indra/newview/llvoicevivox.h
index 420e0aa869..7862e492b2 100644
--- a/indra/newview/llvoicevivox.h
+++ b/indra/newview/llvoicevivox.h
@@ -89,6 +89,8 @@ public:
// Returns true if vivox has successfully logged in and is not in error state
bool isVoiceWorking() const override;
+ void setHidden(bool hidden) override; // virtual
+
/////////////////////
/// @name Tuning
//@{
@@ -221,7 +223,8 @@ public:
void removeObserver(LLVoiceClientParticipantObserver* observer) override;
//@}
- std::string sipURIFromID(const LLUUID &id) override;
+ std::string sipURIFromID(const LLUUID &id) const override;
+ LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override;
//@}
/// @name LLVoiceEffectInterface virtual implementations
@@ -706,7 +709,6 @@ private:
std::string mChannelName; // Name of the channel to be looked up
sessionStatePtr_t mAudioSession; // Session state for the current audio session
- bool mAudioSessionChanged; // set to true when the above pointer gets changed, so observers can be notified.
sessionStatePtr_t mNextAudioSession; // Session state for the audio session we're trying to join
@@ -748,7 +750,7 @@ private:
bool switchChannel(std::string uri = std::string(), bool spatial = true, bool no_reconnect = false, bool is_p2p = false, std::string hash = "");
void joinSession(const sessionStatePtr_t &session);
- std::string nameFromID(const LLUUID &id);
+ std::string nameFromID(const LLUUID &id) const;
bool IDFromName(const std::string name, LLUUID &uuid);
std::string sipURIFromAvatar(LLVOAvatar *avatar);
std::string sipURIFromName(std::string &name);
@@ -760,7 +762,6 @@ private:
LLSD getAudioSessionChannelInfo();
std::string getAudioSessionHandle();
- void setHidden(bool hidden) override; //virtual
void sendPositionAndVolumeUpdate(void);
void sendCaptureAndRenderDevices();
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp
index 4f08dde6e0..35ba75138c 100644
--- a/indra/newview/llvoicewebrtc.cpp
+++ b/indra/newview/llvoicewebrtc.cpp
@@ -248,7 +248,7 @@ LLWebRTCVoiceClient::~LLWebRTCVoiceClient()
void LLWebRTCVoiceClient::init(LLPumpIO* pump)
{
// constructor will set up LLVoiceClient::getInstance()
- llwebrtc::init();
+ llwebrtc::init(this);
mWebRTCDeviceInterface = llwebrtc::getDeviceInterface();
mWebRTCDeviceInterface->setDevicesObserver(this);
@@ -279,6 +279,29 @@ void LLWebRTCVoiceClient::cleanUp()
LL_DEBUGS("Voice") << "Exiting" << LL_ENDL;
}
+void LLWebRTCVoiceClient::LogMessage(llwebrtc::LLWebRTCLogCallback::LogLevel level, const std::string& message)
+{
+ switch (level)
+ {
+ case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_VERBOSE:
+ LL_DEBUGS("Voice") << message << LL_ENDL;
+ break;
+ case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_INFO:
+ LL_INFOS("Voice") << message << LL_ENDL;
+ break;
+ case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_WARNING:
+ LL_WARNS("Voice") << message << LL_ENDL;
+ break;
+ case llwebrtc::LLWebRTCLogCallback::LOG_LEVEL_ERROR:
+ // use WARN so that we don't crash on a webrtc error.
+ // webrtc will force a crash on a fatal error.
+ LL_WARNS("Voice") << message << LL_ENDL;
+ break;
+ default:
+ break;
+ }
+}
+
// --------------------------------------------------
const LLVoiceVersionInfo& LLWebRTCVoiceClient::getVersion()
@@ -434,6 +457,7 @@ void LLWebRTCVoiceClient::voiceConnectionCoro()
// Could help with voice updates making for smoother
// voice when we're busy.
llcoro::suspendUntilTimeout(UPDATE_THROTTLE_SECONDS);
+ if (sShuttingDown) return; // 'this' migh already be invalid
bool voiceEnabled = mVoiceEnabled;
if (!isAgentAvatarValid())
@@ -1230,7 +1254,7 @@ void LLWebRTCVoiceClient::sessionState::removeParticipant(const LLWebRTCVoiceCli
LLWebRTCVoiceClient::getInstance()->notifyParticipantObservers();
}
}
- if (mHangupOnLastLeave && (participantID != gAgentID) && (mParticipantsByUUID.size() <= 1))
+ if (mHangupOnLastLeave && (participantID != gAgentID) && (mParticipantsByUUID.size() <= 1) && LLWebRTCVoiceClient::instanceExists())
{
LLWebRTCVoiceClient::getInstance()->notifyStatusObservers(LLVoiceClientStatusObserver::STATUS_LEFT_CHANNEL);
}
@@ -1941,8 +1965,8 @@ bool LLWebRTCVoiceClient::estateSessionState::processConnectionStates()
for (auto &connection : mWebRTCConnections)
{
- boost::shared_ptr<LLVoiceWebRTCSpatialConnection> spatialConnection =
- boost::static_pointer_cast<LLVoiceWebRTCSpatialConnection>(connection);
+ std::shared_ptr<LLVoiceWebRTCSpatialConnection> spatialConnection =
+ std::static_pointer_cast<LLVoiceWebRTCSpatialConnection>(connection);
LLUUID regionID = spatialConnection.get()->getRegionID();
@@ -2067,11 +2091,16 @@ void LLWebRTCVoiceClient::avatarNameResolved(const LLUUID &id, const std::string
}
// Leftover from vivox PTSN
-std::string LLWebRTCVoiceClient::sipURIFromID(const LLUUID& id)
+std::string LLWebRTCVoiceClient::sipURIFromID(const LLUUID& id) const
{
return id.asString();
}
+LLSD LLWebRTCVoiceClient::getP2PChannelInfoTemplate(const LLUUID& id) const
+{
+ return LLSD();
+}
+
/////////////////////////////
// LLVoiceWebRTCConnection
@@ -2159,47 +2188,47 @@ void LLVoiceWebRTCConnection::processIceUpdates()
{
mOutstandingRequests++;
LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::processIceUpdatesCoro",
- boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this));
+ boost::bind(&LLVoiceWebRTCConnection::processIceUpdatesCoro, this->shared_from_this()));
}
// Ice candidates may be streamed in before or after the SDP offer is available (see below)
// This function determines whether candidates are available to send to the Secondlife WebRTC
// server via the simulator. If so, and there are no more candidates, this code
// will make the cap call to the server sending up the ICE candidates.
-void LLVoiceWebRTCConnection::processIceUpdatesCoro()
+void LLVoiceWebRTCConnection::processIceUpdatesCoro(connectionPtr_t connection)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
- if (mShutDown || LLWebRTCVoiceClient::isShuttingDown())
+ if (connection->mShutDown || LLWebRTCVoiceClient::isShuttingDown())
{
- mOutstandingRequests--;
+ connection->mOutstandingRequests--;
return;
}
bool iceCompleted = false;
LLSD body;
- if (!mIceCandidates.empty() || mIceCompleted)
+ if (!connection->mIceCandidates.empty() || connection->mIceCompleted)
{
- LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID);
+ LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(connection->mRegionID);
if (!regionp || !regionp->capabilitiesReceived())
{
LL_DEBUGS("Voice") << "no capabilities for ice gathering; waiting " << LL_ENDL;
- mOutstandingRequests--;
+ connection->mOutstandingRequests--;
return;
}
std::string url = regionp->getCapability("VoiceSignalingRequest");
if (url.empty())
{
- mOutstandingRequests--;
+ connection->mOutstandingRequests--;
return;
}
LL_DEBUGS("Voice") << "region ready to complete voice signaling; url=" << url << LL_ENDL;
- if (!mIceCandidates.empty())
+ if (!connection->mIceCandidates.empty())
{
LLSD candidates = LLSD::emptyArray();
- for (auto &ice_candidate : mIceCandidates)
+ for (auto &ice_candidate : connection->mIceCandidates)
{
LLSD body_candidate;
body_candidate["sdpMid"] = ice_candidate.mSdpMid;
@@ -2208,18 +2237,18 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro()
candidates.append(body_candidate);
}
body["candidates"] = candidates;
- mIceCandidates.clear();
+ connection->mIceCandidates.clear();
}
- else if (mIceCompleted)
+ else if (connection->mIceCompleted)
{
LLSD body_candidate;
body_candidate["completed"] = true;
body["candidate"] = body_candidate;
- iceCompleted = mIceCompleted;
- mIceCompleted = false;
+ iceCompleted = connection->mIceCompleted;
+ connection->mIceCompleted = false;
}
- body["viewer_session"] = mViewerSession;
+ body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
@@ -2234,7 +2263,7 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro()
if (LLWebRTCVoiceClient::isShuttingDown())
{
- mOutstandingRequests--;
+ connection->mOutstandingRequests--;
return;
}
@@ -2244,10 +2273,10 @@ void LLVoiceWebRTCConnection::processIceUpdatesCoro()
if (!status)
{
// couldn't trickle the candidates, so restart the session.
- setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
+ connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
}
}
- mOutstandingRequests--;
+ connection->mOutstandingRequests--;
}
@@ -2393,31 +2422,31 @@ void LLVoiceWebRTCConnection::sendData(const std::string &data)
// Tell the simulator that we're shutting down a voice connection.
// The simulator will pass this on to the Secondlife WebRTC server.
-void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
+void LLVoiceWebRTCConnection::breakVoiceConnectionCoro(connectionPtr_t connection)
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_VOICE;
LL_DEBUGS("Voice") << "Disconnecting voice." << LL_ENDL;
- if (mWebRTCDataInterface)
+ if (connection->mWebRTCDataInterface)
{
- mWebRTCDataInterface->unsetDataObserver(this);
- mWebRTCDataInterface = nullptr;
+ connection->mWebRTCDataInterface->unsetDataObserver(connection.get());
+ connection->mWebRTCDataInterface = nullptr;
}
- mWebRTCAudioInterface = nullptr;
- LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(mRegionID);
+ connection->mWebRTCAudioInterface = nullptr;
+ LLViewerRegion *regionp = LLWorld::instance().getRegionFromID(connection->mRegionID);
if (!regionp || !regionp->capabilitiesReceived())
{
LL_DEBUGS("Voice") << "no capabilities for voice provisioning; waiting " << LL_ENDL;
- setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
- mOutstandingRequests--;
+ connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
+ connection->mOutstandingRequests--;
return;
}
std::string url = regionp->getCapability("ProvisionVoiceAccountRequest");
if (url.empty())
{
- setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
- mOutstandingRequests--;
+ connection->setVoiceConnectionState(VOICE_STATE_SESSION_RETRY);
+ connection->mOutstandingRequests--;
return;
}
@@ -2426,7 +2455,7 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
LLVoiceWebRTCStats::getInstance()->provisionAttemptStart();
LLSD body;
body["logout"] = true;
- body["viewer_session"] = mViewerSession;
+ body["viewer_session"] = connection->mViewerSession;
body["voice_server_type"] = WEBRTC_VOICE_SERVER_TYPE;
LLCoreHttpUtil::HttpCoroutineAdapter::ptr_t httpAdapter(
@@ -2437,15 +2466,15 @@ void LLVoiceWebRTCConnection::breakVoiceConnectionCoro()
httpOpts->setWantHeaders(true);
- mOutstandingRequests++;
+ connection->mOutstandingRequests++;
// tell the server to shut down the connection as a courtesy.
// shutdownConnection will drop the WebRTC connection which will
// also shut things down.
LLSD result = httpAdapter->postAndSuspend(httpRequest, url, body, httpOpts);
- mOutstandingRequests--;
- setVoiceConnectionState(VOICE_STATE_SESSION_EXIT);
+ connection->mOutstandingRequests--;
+ connection->setVoiceConnectionState(VOICE_STATE_SESSION_EXIT);
}
// Tell the simulator to tell the Secondlife WebRTC server that we want a voice
@@ -2629,7 +2658,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
// VOICE_STATE_SESSION_ESTABLISHED via a callback on a webrtc thread.
setVoiceConnectionState(VOICE_STATE_CONNECTION_WAIT);
LLCoros::getInstance()->launch("LLVoiceWebRTCConnection::requestVoiceConnectionCoro",
- boost::bind(&LLVoiceWebRTCConnection::requestVoiceConnectionCoro, this));
+ boost::bind(&LLVoiceWebRTCConnection::requestVoiceConnectionCoro, this->shared_from_this()));
break;
case VOICE_STATE_CONNECTION_WAIT:
@@ -2709,7 +2738,7 @@ bool LLVoiceWebRTCConnection::connectionStateMachine()
case VOICE_STATE_DISCONNECT:
setVoiceConnectionState(VOICE_STATE_WAIT_FOR_EXIT);
LLCoros::instance().launch("LLVoiceWebRTCConnection::breakVoiceConnectionCoro",
- boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this));
+ boost::bind(&LLVoiceWebRTCConnection::breakVoiceConnectionCoro, this->shared_from_this()));
break;
case VOICE_STATE_WAIT_FOR_EXIT:
diff --git a/indra/newview/llvoicewebrtc.h b/indra/newview/llvoicewebrtc.h
index 480a7897cd..c8dbb64574 100644
--- a/indra/newview/llvoicewebrtc.h
+++ b/indra/newview/llvoicewebrtc.h
@@ -55,14 +55,15 @@ class LLWebRTCProtocolParser;
class LLAvatarName;
class LLVoiceWebRTCConnection;
-typedef boost::shared_ptr<LLVoiceWebRTCConnection> connectionPtr_t;
+typedef std::shared_ptr<LLVoiceWebRTCConnection> connectionPtr_t;
extern const std::string WEBRTC_VOICE_SERVER_TYPE;
class LLWebRTCVoiceClient : public LLSingleton<LLWebRTCVoiceClient>,
virtual public LLVoiceModuleInterface,
public llwebrtc::LLWebRTCDevicesObserver,
- public LLMuteListObserver
+ public LLMuteListObserver,
+ public llwebrtc::LLWebRTCLogCallback
{
LLSINGLETON(LLWebRTCVoiceClient);
LOG_CLASS(LLWebRTCVoiceClient);
@@ -84,7 +85,16 @@ public:
// Returns true if WebRTC has successfully logged in and is not in error state
bool isVoiceWorking() const override;
- std::string sipURIFromID(const LLUUID &id) override;
+ std::string sipURIFromID(const LLUUID &id) const override;
+ LLSD getP2PChannelInfoTemplate(const LLUUID& id) const override;
+
+ void setHidden(bool hidden) override; // virtual
+
+ ///////////////////
+ /// @name Logging
+ /// @{
+ void LogMessage(llwebrtc::LLWebRTCLogCallback::LogLevel level, const std::string& message) override;
+ //@}
/////////////////////
/// @name Tuning
@@ -243,7 +253,7 @@ public:
bool mIsModeratorMuted;
LLUUID mRegion;
};
- typedef boost::shared_ptr<participantState> participantStatePtr_t;
+ typedef std::shared_ptr<participantState> participantStatePtr_t;
participantStatePtr_t findParticipantByID(const std::string &channelID, const LLUUID &id);
participantStatePtr_t addParticipantByID(const std::string& channelID, const LLUUID &id, const LLUUID& region);
@@ -256,10 +266,10 @@ public:
class 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 void addSession(const std::string &channelID, ptr_t& session);
virtual ~sessionState();
@@ -327,7 +337,7 @@ public:
sessionFunc_t func);
};
- typedef boost::shared_ptr<sessionState> sessionStatePtr_t;
+ typedef std::shared_ptr<sessionState> sessionStatePtr_t;
typedef std::map<std::string, sessionStatePtr_t> sessionMap;
class estateSessionState : public sessionState
@@ -471,8 +481,6 @@ private:
LLSD getAudioSessionChannelInfo();
- void setHidden(bool hidden) override; //virtual
-
void enforceTether();
void updateNeighboringRegions();
@@ -567,7 +575,8 @@ class LLVoiceWebRTCStats : public LLSingleton<LLVoiceWebRTCStats>
class LLVoiceWebRTCConnection :
public llwebrtc::LLWebRTCSignalingObserver,
- public llwebrtc::LLWebRTCDataObserver
+ public llwebrtc::LLWebRTCDataObserver,
+ public std::enable_shared_from_this<LLVoiceWebRTCConnection>
{
public:
LLVoiceWebRTCConnection(const LLUUID &regionID, const std::string &channelID);
@@ -601,7 +610,7 @@ class LLVoiceWebRTCConnection :
void processIceUpdates();
- void processIceUpdatesCoro();
+ static void processIceUpdatesCoro(connectionPtr_t connection);
virtual void setMuteMic(bool muted);
virtual void setSpeakerVolume(F32 volume);
@@ -668,9 +677,9 @@ class LLVoiceWebRTCConnection :
}
virtual void requestVoiceConnection() = 0;
- void requestVoiceConnectionCoro() { requestVoiceConnection(); }
+ static void requestVoiceConnectionCoro(connectionPtr_t connection) { connection->requestVoiceConnection(); }
- void breakVoiceConnectionCoro();
+ static void breakVoiceConnectionCoro(connectionPtr_t connection);
LLVoiceClientStatusObserver::EStatusType mCurrentStatus;
diff --git a/indra/newview/llvosurfacepatch.cpp b/indra/newview/llvosurfacepatch.cpp
index b76717e660..fdccf34e6a 100644
--- a/indra/newview/llvosurfacepatch.cpp
+++ b/indra/newview/llvosurfacepatch.cpp
@@ -967,7 +967,7 @@ LLTerrainPartition::LLTerrainPartition(LLViewerRegion* regionp)
}
// Do not add vertices; honor strict vertex count specified by strider_vertex_count
-void gen_terrain_tangents(U16 strider_vertex_count,
+void gen_terrain_tangents(U32 strider_vertex_count,
U32 strider_index_count,
LLStrider<LLVector3> &verticesp,
LLStrider<LLVector3> &normalsp,
@@ -983,7 +983,7 @@ void gen_terrain_tangents(U16 strider_vertex_count,
std::vector<LLVector2> texcoords(strider_vertex_count);
std::vector<U16> indices(strider_index_count);
- for (U16 v = 0; v < strider_vertex_count; ++v)
+ for (U32 v = 0; v < strider_vertex_count; ++v)
{
F32 *vert = verticesp[v].mV;
vertices[v] = LLVector4a(vert[0], vert[1], vert[2], 1.f);
@@ -1002,7 +1002,7 @@ void gen_terrain_tangents(U16 strider_vertex_count,
LLCalculateTangentArray(strider_vertex_count, vertices, normals, texcoords.data(), strider_index_count / 3, indices.data(), tangents);
- for (U16 v = 0; v < strider_vertex_count; ++v)
+ for (U32 v = 0; v < strider_vertex_count; ++v)
{
tangentsp[v] = tangents[v];
}
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 9ebe648680..7a7d88327b 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -1250,7 +1250,7 @@ void LLVOVolume::sculpt()
if (!raw_image)
{
raw_image = mSculptTexture->getSavedRawImage();
- S32 discard_level = mSculptTexture->getSavedRawImageLevel();
+ discard_level = mSculptTexture->getSavedRawImageLevel();
}
if (!raw_image)
diff --git a/indra/newview/llvovolume.h b/indra/newview/llvovolume.h
index 07e02e042c..6241bf42d6 100644
--- a/indra/newview/llvovolume.h
+++ b/indra/newview/llvovolume.h
@@ -304,11 +304,11 @@ public:
bool setReflectionProbeIsMirror(bool is_mirror);
bool isReflectionProbe() const override;
- F32 getReflectionProbeAmbiance() const;
- F32 getReflectionProbeNearClip() const;
+ F32 getReflectionProbeAmbiance() const override;
+ F32 getReflectionProbeNearClip() const override;
bool getReflectionProbeIsBox() const override;
- bool getReflectionProbeIsDynamic() const;
- bool getReflectionProbeIsMirror() const;
+ bool getReflectionProbeIsDynamic() const override;
+ bool getReflectionProbeIsMirror() const override;
// Flexible Objects
U32 getVolumeInterfaceID() const;
diff --git a/indra/newview/llworldmap.h b/indra/newview/llworldmap.h
index fb9d140851..aab19a4d5f 100644
--- a/indra/newview/llworldmap.h
+++ b/indra/newview/llworldmap.h
@@ -128,9 +128,9 @@ public:
LLPointer<LLViewerFetchedTexture> getLandForSaleImage(); // Get the overlay image, fetch it if necessary
bool isName(const std::string& name) const;
- bool isDown() { return (mAccess == SIM_ACCESS_DOWN); }
- bool isPG() { return (mAccess <= SIM_ACCESS_PG); }
- bool isAdult() { return (mAccess == SIM_ACCESS_ADULT); }
+ bool isDown() const { return (mAccess == SIM_ACCESS_DOWN); }
+ bool isPG() const { return (mAccess <= SIM_ACCESS_PG); }
+ bool isAdult() const { return (mAccess == SIM_ACCESS_ADULT); }
// Debug only
void dump() const; // Print the region info to the standard output
@@ -157,6 +157,8 @@ public:
const LLSimInfo::item_info_list_t& getLandForSaleAdult() const { return mLandForSaleAdult; }
const LLSimInfo::item_info_list_t& getAgentLocation() const { return mAgentLocations; }
+ const U64& getHandle() const { return mHandle; }
+
private:
U64 mHandle; // This is a hash of the X and Y world coordinates of the SW corner of the sim
std::string mName; // Region name
diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 2a461ca84b..1b2cffa6c9 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -3580,9 +3580,12 @@ void LLPipeline::postSort(LLCamera &camera)
{
mSelectedFaces.clear();
+ bool tex_index_changed = false;
if (!gNonInteractive)
{
- LLPipeline::setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+ LLRender::eTexIndex tex_index = sRenderHighlightTextureChannel;
+ setRenderHighlightTextureChannel(gFloaterTools->getPanelFace()->getTextureChannelToEdit());
+ tex_index_changed = sRenderHighlightTextureChannel != tex_index;
}
// Draw face highlights for selected faces.
@@ -3604,6 +3607,24 @@ void LLPipeline::postSort(LLCamera &camera)
}
} func;
LLSelectMgr::getInstance()->getSelection()->applyToTEs(&func);
+
+ if (tex_index_changed)
+ {
+ // Rebuild geometry for all selected faces with PBR textures
+ for (const LLFace* face : gPipeline.mSelectedFaces)
+ {
+ if (const LLViewerObject* vobj = face->getViewerObject())
+ {
+ if (const LLTextureEntry* tep = vobj->getTE(face->getTEOffset()))
+ {
+ if (tep->getGLTFRenderMaterial())
+ {
+ gPipeline.markRebuild(face->getDrawable(), LLDrawable::REBUILD_VOLUME);
+ }
+ }
+ }
+ }
+ }
}
}
@@ -3656,28 +3677,31 @@ void render_hud_elements()
gUIProgram.unbind();
}
-void LLPipeline::renderHighlights()
+static inline void bindHighlightProgram(LLGLSLShader& program)
{
- assertInitialized();
-
- // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
- // Render highlighted faces.
- LLGLSPipelineAlpha gls_pipeline_alpha;
- LLColor4 color(1.f, 1.f, 1.f, 0.5f);
- disableLights();
-
if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
{
- gHighlightProgram.bind();
- gGL.diffuseColor4f(1,1,1,0.5f);
+ program.bind();
+ gGL.diffuseColor4f(1, 1, 1, 0.5f);
}
+}
- if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && !mFaceSelectImagep)
- {
- mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
- }
+static inline void unbindHighlightProgram(LLGLSLShader& program)
+{
+ if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
+ {
+ program.unbind();
+ }
+}
- if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP))
+void LLPipeline::renderSelectedFaces(const LLColor4& color)
+{
+ if (!mFaceSelectImagep)
+ {
+ mFaceSelectImagep = LLViewerTextureManager::getFetchedTexture(IMG_FACE_SELECT);
+ }
+
+ if (mFaceSelectImagep)
{
// Make sure the selection image gets downloaded and decoded
mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
@@ -3693,81 +3717,61 @@ void LLPipeline::renderHighlights()
facep->renderSelected(mFaceSelectImagep, color);
}
}
+}
- if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
- {
- // Paint 'em red!
- color.setVec(1.f, 0.f, 0.f, 0.5f);
-
- for (auto facep : mHighlightFaces)
- {
- facep->renderSelected(LLViewerTexture::sNullImagep, color);
- }
- }
+void LLPipeline::renderHighlights()
+{
+ assertInitialized();
- // Contains a list of the faces of objects that are physical or
- // have touch-handlers.
- mHighlightFaces.clear();
+ // Draw 3D UI elements here (before we clear the Z buffer in POOL_HUD)
+ // Render highlighted faces.
+ LLGLSPipelineAlpha gls_pipeline_alpha;
+ disableLights();
- if (LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0)
+ if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
{
- gHighlightProgram.unbind();
- }
-
+ bindHighlightProgram(gHighlightProgram);
- if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP))
- {
- color.setVec(1.0f, 0.5f, 0.5f, 0.5f);
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
+ if (sRenderHighlightTextureChannel == LLRender::DIFFUSE_MAP ||
+ sRenderHighlightTextureChannel == LLRender::BASECOLOR_MAP ||
+ sRenderHighlightTextureChannel == LLRender::METALLIC_ROUGHNESS_MAP ||
+ sRenderHighlightTextureChannel == LLRender::GLTF_NORMAL_MAP ||
+ sRenderHighlightTextureChannel == LLRender::EMISSIVE_MAP ||
+ sRenderHighlightTextureChannel == LLRender::NUM_TEXTURE_CHANNELS)
{
- gHighlightNormalProgram.bind();
- gGL.diffuseColor4f(1,1,1,0.5f);
+ static const LLColor4 highlight_selected_color(1.f, 1.f, 1.f, 0.5f);
+ renderSelectedFaces(highlight_selected_color);
}
- mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
-
- for (auto facep : mSelectedFaces)
+ // Paint 'em red!
+ static const LLColor4 highlight_face_color(1.f, 0.f, 0.f, 0.5f);
+ for (auto facep : mHighlightFaces)
{
- if (!facep || facep->getDrawable()->isDead())
- {
- LL_ERRS() << "Bad face on selection" << LL_ENDL;
- return;
- }
-
- facep->renderSelected(mFaceSelectImagep, color);
+ facep->renderSelected(LLViewerTexture::sNullImagep, highlight_face_color);
}
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
- {
- gHighlightNormalProgram.unbind();
- }
+ unbindHighlightProgram(gHighlightProgram);
}
- if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED) && (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP))
- {
- color.setVec(0.0f, 0.3f, 1.0f, 0.8f);
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
- {
- gHighlightSpecularProgram.bind();
- gGL.diffuseColor4f(1,1,1,0.5f);
- }
-
- mFaceSelectImagep->addTextureStats((F32)MAX_IMAGE_AREA);
+ // Contains a list of the faces of objects that are physical or
+ // have touch-handlers.
+ mHighlightFaces.clear();
- for (auto facep : mSelectedFaces)
+ if (hasRenderDebugFeatureMask(RENDER_DEBUG_FEATURE_SELECTED))
+ {
+ if (sRenderHighlightTextureChannel == LLRender::NORMAL_MAP)
{
- if (!facep || facep->getDrawable()->isDead())
- {
- LL_ERRS() << "Bad face on selection" << LL_ENDL;
- return;
- }
-
- facep->renderSelected(mFaceSelectImagep, color);
+ static const LLColor4 highlight_normal_color(1.0f, 0.5f, 0.5f, 0.5f);
+ bindHighlightProgram(gHighlightNormalProgram);
+ renderSelectedFaces(highlight_normal_color);
+ unbindHighlightProgram(gHighlightNormalProgram);
}
-
- if ((LLViewerShaderMgr::instance()->getShaderLevel(LLViewerShaderMgr::SHADER_INTERFACE) > 0))
+ else if (sRenderHighlightTextureChannel == LLRender::SPECULAR_MAP)
{
- gHighlightSpecularProgram.unbind();
+ static const LLColor4 highlight_specular_color(0.0f, 0.3f, 1.0f, 0.8f);
+ bindHighlightProgram(gHighlightSpecularProgram);
+ renderSelectedFaces(highlight_specular_color);
+ unbindHighlightProgram(gHighlightSpecularProgram);
}
}
}
@@ -6256,7 +6260,10 @@ bool LLPipeline::getRenderHighlights()
// static
void LLPipeline::setRenderHighlightTextureChannel(LLRender::eTexIndex channel)
{
- sRenderHighlightTextureChannel = channel;
+ if (channel != sRenderHighlightTextureChannel)
+ {
+ sRenderHighlightTextureChannel = channel;
+ }
}
LLVOPartGroup* LLPipeline::lineSegmentIntersectParticle(const LLVector4a& start, const LLVector4a& end, LLVector4a* intersection,
diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h
index 6c79d20149..4164474238 100644
--- a/indra/newview/pipeline.h
+++ b/indra/newview/pipeline.h
@@ -342,6 +342,7 @@ public:
void renderHighlight(const LLViewerObject* obj, F32 fade);
void renderShadow(glh::matrix4f& view, glh::matrix4f& proj, LLCamera& camera, LLCullResult& result, bool depth_clamp);
+ void renderSelectedFaces(const LLColor4& color);
void renderHighlights();
void renderDebug();
void renderPhysicsDisplay();
diff --git a/indra/newview/skins/default/xui/en/floater_settings_color.xml b/indra/newview/skins/default/xui/en/floater_settings_color.xml
new file mode 100644
index 0000000000..0722677f1d
--- /dev/null
+++ b/indra/newview/skins/default/xui/en/floater_settings_color.xml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<floater
+ legacy_header_height="18"
+ can_minimize="false"
+ height="360"
+ min_height="367"
+ layout="topleft"
+ name="settings_color"
+ help_topic="settings_color"
+ title="COLOR SETTINGS"
+ reuse_instance="true"
+ can_resize="true"
+ min_width="550"
+ width="570">
+ <filter_editor
+ follows="left|top|right"
+ height="23"
+ layout="topleft"
+ left="10"
+ right="-10"
+ label="Enter search text"
+ max_length_chars="300"
+ name="filter_input"
+ text_pad_left="10"
+ top="30" />
+ <scroll_list
+ column_padding="0"
+ draw_heading="true"
+ draw_stripes="false"
+ heading_height="23"
+ height="266"
+ layout="topleft"
+ search_column="1"
+ sort_column="1"
+ left="10"
+ follows="left|top|bottom"
+ name="setting_list"
+ top_pad="2"
+ width="300">
+ <scroll_list.columns
+ name="changed_color"
+ relative_width="0.05" />
+ <scroll_list.columns
+ label="Color"
+ name="color" />
+ </scroll_list>
+ <text
+ type="string"
+ length="1"
+ follows="left|top"
+ height="16"
+ layout="topleft"
+ name="color_name_txt"
+ font="SansSerifSmallBold"
+ top_delta="8"
+ left_pad="10"
+ visible="true"
+ use_ellipses="true"
+ text_color="White"
+ width="240">
+ Color name
+ </text>
+ <color_swatch
+ top_pad="0"
+ left_delta="0"
+ follows="top|left"
+ can_apply_immediately="true"
+ height="180"
+ name="color_swatch"
+ visible="true"
+ layout="topleft"
+ width="240">
+ <color_swatch.commit_callback
+ function="CommitSettings" />
+ </color_swatch>
+ <spinner
+ height="20"
+ label="Alpha"
+ layout="topleft"
+ follows="top|left"
+ left_delta="0"
+ min_val="0"
+ max_val="1"
+ decimal_digits="3"
+ name="alpha_spinner"
+ top_pad="5"
+ visible="true"
+ width="120">
+ <spinner.commit_callback
+ function="CommitSettings" />
+ </spinner>
+ <button
+ height="22"
+ label="Reset to default"
+ follows="left|top"
+ layout="topleft"
+ left_delta="0"
+ name="default_btn"
+ visible="true"
+ top_pad="15"
+ width="150">
+ <button.commit_callback
+ function="ClickDefault" />
+ </button>
+ <check_box
+ control_name="ColorSettingsHideDefault"
+ height="16"
+ initial_value="true"
+ label="Show changed colors only"
+ layout="topleft"
+ top_pad="10"
+ left="10"
+ follows="left|bottom"
+ name="hide_default"
+ width="330">
+ </check_box>
+</floater> \ No newline at end of file
diff --git a/indra/newview/skins/default/xui/en/floater_world_map.xml b/indra/newview/skins/default/xui/en/floater_world_map.xml
index 7efa81d263..b0b818cde5 100644
--- a/indra/newview/skins/default/xui/en/floater_world_map.xml
+++ b/indra/newview/skins/default/xui/en/floater_world_map.xml
@@ -14,6 +14,9 @@
single_instance="true"
title="WORLD MAP"
width="650">
+ <string name="UnnamedParcel">
+ (Unnamed Parcel)
+ </string>
<string
name="collapse_icon"
value="map_ui_collapse_icon.png"/>
diff --git a/indra/newview/skins/default/xui/en/menu_login.xml b/indra/newview/skins/default/xui/en/menu_login.xml
index a71cbde21b..1d1b81e31a 100644
--- a/indra/newview/skins/default/xui/en/menu_login.xml
+++ b/indra/newview/skins/default/xui/en/menu_login.xml
@@ -149,6 +149,13 @@
function="Advanced.ShowDebugSettings"
parameter="all" />
</menu_item_call>
+ <menu_item_call
+ label="Show Color settings"
+ name="Color Settings">
+ <menu_item_call.on_click
+ function="Floater.Toggle"
+ parameter="settings_color" />
+ </menu_item_call>
<menu_item_separator />
<menu_item_call
label="XUI Preview Tool"
diff --git a/indra/newview/skins/default/xui/en/menu_viewer.xml b/indra/newview/skins/default/xui/en/menu_viewer.xml
index 98cf03b30e..40f3e51fca 100644
--- a/indra/newview/skins/default/xui/en/menu_viewer.xml
+++ b/indra/newview/skins/default/xui/en/menu_viewer.xml
@@ -3854,6 +3854,13 @@ function="World.EnvPreset"
name="XUI"
tear_off="true">
<menu_item_call
+ label="Show Color settings"
+ name="Color Settings">
+ <menu_item_call.on_click
+ function="Floater.Toggle"
+ parameter="settings_color" />
+ </menu_item_call>
+ <menu_item_call
label="Reload Color Settings"
name="Reload Color Settings">
<menu_item_call.on_click
diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml
index 2e08f6b3be..91b137b75f 100644
--- a/indra/newview/skins/default/xui/en/notifications.xml
+++ b/indra/newview/skins/default/xui/en/notifications.xml
@@ -8873,6 +8873,7 @@ New Voice Morphs are available!
Voice Morphs are not supported by this viewer.
For more information about other voice morph tools, see [[FAQ_URL] this article].
<usetemplate
+ ignoretext="Warn me about voice morph not being supported"
name="okignore"
yestext="OK"/>
<tag>voice</tag>
diff --git a/indra/newview/skins/default/xui/en/panel_region_debug.xml b/indra/newview/skins/default/xui/en/panel_region_debug.xml
index 04a510d4e8..be8468a15c 100644
--- a/indra/newview/skins/default/xui/en/panel_region_debug.xml
+++ b/indra/newview/skins/default/xui/en/panel_region_debug.xml
@@ -140,7 +140,7 @@
layout="topleft"
left_delta="0"
name="return_other_land"
- tool_tip="Return only objects which are on land belonging to someone else"
+ tool_tip="Return only objects which are on land that isn't owned by selected user"
top_delta="20"
width="80" />
<check_box
diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py
index a25efc5de4..91a9347449 100755
--- a/indra/newview/viewer_manifest.py
+++ b/indra/newview/viewer_manifest.py
@@ -580,16 +580,6 @@ class Windows_x86_64_Manifest(ViewerManifest):
self.path("vivoxsdk_x64.dll")
self.path("ortp_x64.dll")
- # OpenSSL
- self.path("libcrypto-1_1-x64.dll")
- self.path("libssl-1_1-x64.dll")
-
- # HTTP/2
- self.path("nghttp2.dll")
-
- # Hunspell
- self.path("libhunspell.dll")
-
# BugSplat
if self.args.get('bugsplat'):
self.path("BsSndRpt64.exe")
@@ -930,7 +920,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
with self.prefix(src=relpkgdir, dst=""):
self.path("libndofdev.dylib")
- self.path("libhunspell-*.dylib")
with self.prefix(src_dst="cursors_mac"):
self.path("*.tif")
@@ -1011,17 +1000,6 @@ class Darwin_x86_64_Manifest(ViewerManifest):
# Need to get the llcommon dll from any of the build directories as well.
libfile_parent = self.get_dst_prefix()
dylibs=[]
- for libfile in (
- "libapr-1.0.dylib",
- "libaprutil-1.0.dylib",
- "libexpat.1.dylib",
- # libnghttp2.dylib is a symlink to
- # libnghttp2.major.dylib, which is a symlink to
- # libnghttp2.version.dylib. Get all of them.
- "libnghttp2.*dylib",
- ):
- dylibs += path_optional(os.path.join(relpkgdir, libfile), libfile)
-
# SLVoice executable
with self.prefix(src=os.path.join(pkgdir, 'bin', 'release')):
self.path("SLVoice")
@@ -1319,14 +1297,7 @@ class Linux_i686_Manifest(LinuxManifest):
debpkgdir = os.path.join(pkgdir, "lib", "debug")
with self.prefix(src=relpkgdir, dst="lib"):
- self.path("libapr-1.so")
- self.path("libapr-1.so.0")
- self.path("libapr-1.so.0.4.5")
- self.path("libaprutil-1.so")
- self.path("libaprutil-1.so.0")
- self.path("libaprutil-1.so.0.4.1")
self.path("libdb*.so")
- self.path("libexpat.so.*")
self.path("libuuid.so*")
self.path("libSDL-1.2.so.*")
self.path("libdirectfb-1.*.so.*")
@@ -1336,7 +1307,6 @@ class Linux_i686_Manifest(LinuxManifest):
self.path("libdirectfb-1.4.so.5")
self.path("libfusion-1.4.so.5")
self.path("libdirect-1.4.so.5*")
- self.path("libhunspell-1.3.so*")
self.path("libalut.so*")
self.path("libopenal.so*")
self.path("libopenal.so", "libvivoxoal.so.1") # vivox's sdk expects this soname