Merge branch 'main' into marchcat/yz-merge
commit
990c8b81da
|
|
@ -24,6 +24,8 @@ jobs:
|
||||||
outputs:
|
outputs:
|
||||||
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
|
viewer_channel: ${{ steps.build.outputs.viewer_channel }}
|
||||||
viewer_version: ${{ steps.build.outputs.viewer_version }}
|
viewer_version: ${{ steps.build.outputs.viewer_version }}
|
||||||
|
viewer_branch: ${{ steps.which-branch.outputs.branch }}
|
||||||
|
relnotes: ${{ steps.which-branch.outputs.relnotes }}
|
||||||
imagename: ${{ steps.build.outputs.imagename }}
|
imagename: ${{ steps.build.outputs.imagename }}
|
||||||
env:
|
env:
|
||||||
AUTOBUILD_ADDRSIZE: 64
|
AUTOBUILD_ADDRSIZE: 64
|
||||||
|
|
@ -33,12 +35,13 @@ jobs:
|
||||||
AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
|
AUTOBUILD_GITHUB_TOKEN: ${{ secrets.SHARED_AUTOBUILD_GITHUB_TOKEN }}
|
||||||
AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
|
AUTOBUILD_INSTALLABLE_CACHE: ${{ github.workspace }}/.autobuild-installables
|
||||||
AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables
|
AUTOBUILD_VARIABLES_FILE: ${{ github.workspace }}/.build-variables/variables
|
||||||
|
# Direct autobuild to store vcs_url, vcs_branch and vcs_revision in
|
||||||
|
# autobuild-package.xml.
|
||||||
|
AUTOBUILD_VCS_INFO: "true"
|
||||||
AUTOBUILD_VSVER: "170"
|
AUTOBUILD_VSVER: "170"
|
||||||
DEVELOPER_DIR: ${{ matrix.developer_dir }}
|
DEVELOPER_DIR: ${{ matrix.developer_dir }}
|
||||||
# Ensure that Linden viewer builds engage Bugsplat.
|
# Ensure that Linden viewer builds engage Bugsplat.
|
||||||
BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
|
BUGSPLAT_DB: ${{ matrix.configuration != 'ReleaseOS' && 'SecondLife_Viewer_2018' || '' }}
|
||||||
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
|
|
||||||
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
|
|
||||||
build_coverity: false
|
build_coverity: false
|
||||||
build_log_dir: ${{ github.workspace }}/.logs
|
build_log_dir: ${{ github.workspace }}/.logs
|
||||||
build_viewer: true
|
build_viewer: true
|
||||||
|
|
@ -62,7 +65,7 @@ jobs:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
|
|
||||||
- name: Setup python
|
- name: Setup python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
|
|
@ -83,7 +86,7 @@ jobs:
|
||||||
run: pip3 install autobuild llsd
|
run: pip3 install autobuild llsd
|
||||||
|
|
||||||
- name: Cache autobuild packages
|
- name: Cache autobuild packages
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
id: cache-installables
|
id: cache-installables
|
||||||
with:
|
with:
|
||||||
path: .autobuild-installables
|
path: .autobuild-installables
|
||||||
|
|
@ -96,10 +99,17 @@ jobs:
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
run: choco install nsis-unicode
|
run: choco install nsis-unicode
|
||||||
|
|
||||||
|
- name: Determine source branch
|
||||||
|
id: which-branch
|
||||||
|
uses: secondlife/viewer-build-util/which-branch@v1
|
||||||
|
with:
|
||||||
|
token: ${{ github.token }}
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
id: build
|
id: build
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
AUTOBUILD_VCS_BRANCH: ${{ steps.which-branch.outputs.branch }}
|
||||||
RUNNER_OS: ${{ runner.os }}
|
RUNNER_OS: ${{ runner.os }}
|
||||||
run: |
|
run: |
|
||||||
# set up things the viewer's build.sh script expects
|
# set up things the viewer's build.sh script expects
|
||||||
|
|
@ -150,7 +160,7 @@ jobs:
|
||||||
}
|
}
|
||||||
repo_branch()
|
repo_branch()
|
||||||
{
|
{
|
||||||
git -C "$1" branch | grep '^* ' | cut -c 3-
|
echo "$AUTOBUILD_VCS_BRANCH"
|
||||||
}
|
}
|
||||||
record_dependencies_graph()
|
record_dependencies_graph()
|
||||||
{
|
{
|
||||||
|
|
@ -250,23 +260,36 @@ jobs:
|
||||||
${{ steps.build.outputs.physicstpv }}
|
${{ steps.build.outputs.physicstpv }}
|
||||||
|
|
||||||
sign-and-package-windows:
|
sign-and-package-windows:
|
||||||
|
env:
|
||||||
|
AZURE_KEY_VAULT_URI: ${{ secrets.AZURE_KEY_VAULT_URI }}
|
||||||
|
AZURE_CERT_NAME: ${{ secrets.AZURE_CERT_NAME }}
|
||||||
|
AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
|
||||||
|
AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
|
||||||
|
AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: windows
|
runs-on: windows
|
||||||
steps:
|
steps:
|
||||||
- name: Sign and package Windows viewer
|
- name: Sign and package Windows viewer
|
||||||
|
if: env.AZURE_KEY_VAULT_URI && env.AZURE_CERT_NAME && env.AZURE_CLIENT_ID && env.AZURE_CLIENT_SECRET && env.AZURE_TENANT_ID
|
||||||
uses: secondlife/viewer-build-util/sign-pkg-windows@v1
|
uses: secondlife/viewer-build-util/sign-pkg-windows@v1
|
||||||
with:
|
with:
|
||||||
vault_uri: "${{ secrets.AZURE_KEY_VAULT_URI }}"
|
vault_uri: "${{ env.AZURE_KEY_VAULT_URI }}"
|
||||||
cert_name: "${{ secrets.AZURE_CERT_NAME }}"
|
cert_name: "${{ env.AZURE_CERT_NAME }}"
|
||||||
client_id: "${{ secrets.AZURE_CLIENT_ID }}"
|
client_id: "${{ env.AZURE_CLIENT_ID }}"
|
||||||
client_secret: "${{ secrets.AZURE_CLIENT_SECRET }}"
|
client_secret: "${{ env.AZURE_CLIENT_SECRET }}"
|
||||||
tenant_id: "${{ secrets.AZURE_TENANT_ID }}"
|
tenant_id: "${{ env.AZURE_TENANT_ID }}"
|
||||||
|
|
||||||
sign-and-package-mac:
|
sign-and-package-mac:
|
||||||
|
env:
|
||||||
|
NOTARIZE_CREDS_MACOS: ${{ secrets.NOTARIZE_CREDS_MACOS }}
|
||||||
|
SIGNING_CERT_MACOS: ${{ secrets.SIGNING_CERT_MACOS }}
|
||||||
|
SIGNING_CERT_MACOS_IDENTITY: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
|
||||||
|
SIGNING_CERT_MACOS_PASSWORD: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Unpack Mac notarization credentials
|
- name: Unpack Mac notarization credentials
|
||||||
|
if: env.NOTARIZE_CREDS_MACOS
|
||||||
id: note-creds
|
id: note-creds
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -274,7 +297,7 @@ jobs:
|
||||||
# USERNAME="..."
|
# USERNAME="..."
|
||||||
# PASSWORD="..."
|
# PASSWORD="..."
|
||||||
# TEAM_ID="..."
|
# TEAM_ID="..."
|
||||||
eval "${{ secrets.NOTARIZE_CREDS_MACOS }}"
|
eval "${{ env.NOTARIZE_CREDS_MACOS }}"
|
||||||
echo "::add-mask::$USERNAME"
|
echo "::add-mask::$USERNAME"
|
||||||
echo "::add-mask::$PASSWORD"
|
echo "::add-mask::$PASSWORD"
|
||||||
echo "::add-mask::$TEAM_ID"
|
echo "::add-mask::$TEAM_ID"
|
||||||
|
|
@ -286,45 +309,54 @@ jobs:
|
||||||
[[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]]
|
[[ -n "$USERNAME" && -n "$PASSWORD" && -n "$TEAM_ID" ]]
|
||||||
|
|
||||||
- name: Sign and package Mac viewer
|
- name: Sign and package Mac viewer
|
||||||
|
if: env.SIGNING_CERT_MACOS && env.SIGNING_CERT_MACOS_IDENTITY && env.SIGNING_CERT_MACOS_PASSWORD && steps.note-creds.outputs.note_user && steps.note-creds.outputs.note_pass && steps.note-creds.outputs.note_team
|
||||||
uses: secondlife/viewer-build-util/sign-pkg-mac@v1
|
uses: secondlife/viewer-build-util/sign-pkg-mac@v1
|
||||||
with:
|
with:
|
||||||
channel: ${{ needs.build.outputs.viewer_channel }}
|
channel: ${{ needs.build.outputs.viewer_channel }}
|
||||||
imagename: ${{ needs.build.outputs.imagename }}
|
imagename: ${{ needs.build.outputs.imagename }}
|
||||||
cert_base64: ${{ secrets.SIGNING_CERT_MACOS }}
|
cert_base64: ${{ env.SIGNING_CERT_MACOS }}
|
||||||
cert_name: ${{ secrets.SIGNING_CERT_MACOS_IDENTITY }}
|
cert_name: ${{ env.SIGNING_CERT_MACOS_IDENTITY }}
|
||||||
cert_pass: ${{ secrets.SIGNING_CERT_MACOS_PASSWORD }}
|
cert_pass: ${{ env.SIGNING_CERT_MACOS_PASSWORD }}
|
||||||
note_user: ${{ steps.note-creds.outputs.note_user }}
|
note_user: ${{ steps.note-creds.outputs.note_user }}
|
||||||
note_pass: ${{ steps.note-creds.outputs.note_pass }}
|
note_pass: ${{ steps.note-creds.outputs.note_pass }}
|
||||||
note_team: ${{ steps.note-creds.outputs.note_team }}
|
note_team: ${{ steps.note-creds.outputs.note_team }}
|
||||||
|
|
||||||
post-windows-symbols:
|
post-windows-symbols:
|
||||||
|
env:
|
||||||
|
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
|
||||||
|
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Post Windows symbols
|
- name: Post Windows symbols
|
||||||
|
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
|
||||||
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
|
uses: secondlife/viewer-build-util/post-bugsplat-windows@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.BUGSPLAT_USER }}
|
username: ${{ env.BUGSPLAT_USER }}
|
||||||
password: ${{ secrets.BUGSPLAT_PASS }}
|
password: ${{ env.BUGSPLAT_PASS }}
|
||||||
database: "SecondLife_Viewer_2018"
|
database: "SecondLife_Viewer_2018"
|
||||||
channel: ${{ needs.build.outputs.viewer_channel }}
|
channel: ${{ needs.build.outputs.viewer_channel }}
|
||||||
version: ${{ needs.build.outputs.viewer_version }}
|
version: ${{ needs.build.outputs.viewer_version }}
|
||||||
|
|
||||||
post-mac-symbols:
|
post-mac-symbols:
|
||||||
|
env:
|
||||||
|
BUGSPLAT_USER: ${{ secrets.BUGSPLAT_USER }}
|
||||||
|
BUGSPLAT_PASS: ${{ secrets.BUGSPLAT_PASS }}
|
||||||
needs: build
|
needs: build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Post Mac symbols
|
- name: Post Mac symbols
|
||||||
|
if: env.BUGSPLAT_USER && env.BUGSPLAT_PASS
|
||||||
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
|
uses: secondlife/viewer-build-util/post-bugsplat-mac@v1
|
||||||
with:
|
with:
|
||||||
username: ${{ secrets.BUGSPLAT_USER }}
|
username: ${{ env.BUGSPLAT_USER }}
|
||||||
password: ${{ secrets.BUGSPLAT_PASS }}
|
password: ${{ env.BUGSPLAT_PASS }}
|
||||||
database: "SecondLife_Viewer_2018"
|
database: "SecondLife_Viewer_2018"
|
||||||
channel: ${{ needs.build.outputs.viewer_channel }}
|
channel: ${{ needs.build.outputs.viewer_channel }}
|
||||||
version: ${{ needs.build.outputs.viewer_version }}
|
version: ${{ needs.build.outputs.viewer_version }}
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [sign-and-package-windows, sign-and-package-mac]
|
needs: [build, sign-and-package-windows, sign-and-package-mac]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
|
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'Second_Life_')
|
||||||
steps:
|
steps:
|
||||||
|
|
@ -355,17 +387,31 @@ jobs:
|
||||||
mv newview/viewer_version.txt macOS-viewer_version.txt
|
mv newview/viewer_version.txt macOS-viewer_version.txt
|
||||||
|
|
||||||
# forked from softprops/action-gh-release
|
# forked from softprops/action-gh-release
|
||||||
- uses: secondlife-3p/action-gh-release@v1
|
- name: Create GitHub release
|
||||||
|
id: release
|
||||||
|
uses: secondlife-3p/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
# name the release page for the build number so we can find it
|
# name the release page for the branch
|
||||||
# easily (analogous to looking up a codeticket build page)
|
name: "${{ needs.build.outputs.viewer_branch }}"
|
||||||
name: "v${{ github.run_id }}"
|
# SL-20546: want the channel and version to be visible on the
|
||||||
|
# release page
|
||||||
|
body: |
|
||||||
|
Build ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
|
||||||
|
${{ needs.build.outputs.viewer_channel }}
|
||||||
|
${{ needs.build.outputs.viewer_version }}
|
||||||
|
${{ needs.build.outputs.relnotes }}
|
||||||
prerelease: true
|
prerelease: true
|
||||||
generate_release_notes: true
|
generate_release_notes: true
|
||||||
# the only reason we generate a GH release is to post build products
|
target_commitish: ${{ github.sha }}
|
||||||
|
previous_tag: release
|
||||||
|
append_body: true
|
||||||
fail_on_unmatched_files: true
|
fail_on_unmatched_files: true
|
||||||
files: |
|
files: |
|
||||||
*.dmg
|
*.dmg
|
||||||
*.exe
|
*.exe
|
||||||
*-autobuild-package.xml
|
*-autobuild-package.xml
|
||||||
*-viewer_version.txt
|
*-viewer_version.txt
|
||||||
|
|
||||||
|
- name: post release URL
|
||||||
|
run: |
|
||||||
|
echo "::notice::Release ${{ steps.release.outputs.url }}"
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ jobs:
|
||||||
stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
|
stale-pr-message: This pull request is stale because it has been open 30 days with no activity. Remove stale label or comment or it will be closed in 7 days
|
||||||
days-before-stale: 30
|
days-before-stale: 30
|
||||||
days-before-close: 7
|
days-before-close: 7
|
||||||
|
days-before-issue-close: -1
|
||||||
exempt-pr-labels: blocked,must,should,keep
|
exempt-pr-labels: blocked,must,should,keep
|
||||||
stale-pr-label: stale
|
stale-pr-label: stale
|
||||||
- name: Print outputs
|
- name: Print outputs
|
||||||
|
|
|
||||||
262
autobuild.xml
262
autobuild.xml
|
|
@ -1587,11 +1587,11 @@
|
||||||
<key>creds</key>
|
<key>creds</key>
|
||||||
<string>github</string>
|
<string>github</string>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>48bca5d0233d1e724a59f649a2c6c7ac5f40ec3c</string>
|
<string>b037cc0b29ea70ee834cfae6dda5b7a25cd57174</string>
|
||||||
<key>hash_algorithm</key>
|
<key>hash_algorithm</key>
|
||||||
<string>sha1</string>
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009335</string>
|
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851460</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>darwin64</string>
|
<string>darwin64</string>
|
||||||
|
|
@ -1603,11 +1603,11 @@
|
||||||
<key>creds</key>
|
<key>creds</key>
|
||||||
<string>github</string>
|
<string>github</string>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>39f52d0350e130f41c5c758f7cb94e87b962c223</string>
|
<string>bdea1fd5c4da9da5afde088d16188b45d0853e04</string>
|
||||||
<key>hash_algorithm</key>
|
<key>hash_algorithm</key>
|
||||||
<string>sha1</string>
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009336</string>
|
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851461</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>linux64</string>
|
<string>linux64</string>
|
||||||
|
|
@ -1619,11 +1619,11 @@
|
||||||
<key>creds</key>
|
<key>creds</key>
|
||||||
<string>github</string>
|
<string>github</string>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>7b5e645fb7eb399abbea63bd21e8063bbb32a911</string>
|
<string>f652ce0d6aef864689f0ed44255da4d9cd65a43f</string>
|
||||||
<key>hash_algorithm</key>
|
<key>hash_algorithm</key>
|
||||||
<string>sha1</string>
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/117009339</string>
|
<string>https://api.github.com/repos/secondlife/llphysicsextensions_source/releases/assets/144851463</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>windows64</string>
|
<string>windows64</string>
|
||||||
|
|
@ -1636,7 +1636,7 @@
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
<string>Copyright (c) 2010, Linden Research, Inc.</string>
|
<string>Copyright (c) 2010, Linden Research, Inc.</string>
|
||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>1.0.565768</string>
|
<string>1.0.479d20a</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>llphysicsextensions_source</string>
|
<string>llphysicsextensions_source</string>
|
||||||
</map>
|
</map>
|
||||||
|
|
@ -1668,18 +1668,6 @@
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>linux64</string>
|
<string>linux64</string>
|
||||||
</map>
|
</map>
|
||||||
<key>windows</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>2e5f1f7046a49d8b0bc295aa878116bc</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/ct2/60043/564063/llphysicsextensions_stub-1.0.542456-windows-542456.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
</map>
|
||||||
<key>license</key>
|
<key>license</key>
|
||||||
<string>internal</string>
|
<string>internal</string>
|
||||||
|
|
@ -1820,18 +1808,6 @@
|
||||||
</map>
|
</map>
|
||||||
<key>mikktspace</key>
|
<key>mikktspace</key>
|
||||||
<map>
|
<map>
|
||||||
<key>canonical_repo</key>
|
|
||||||
<string>https://bitbucket.org/lindenlab/3p-mikktspace</string>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>Mikktspace Tangent Generator</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
|
|
||||||
<key>license_file</key>
|
|
||||||
<string>mikktspace.txt</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>mikktspace</string>
|
|
||||||
<key>platforms</key>
|
<key>platforms</key>
|
||||||
<map>
|
<map>
|
||||||
<key>darwin64</key>
|
<key>darwin64</key>
|
||||||
|
|
@ -1839,40 +1815,58 @@
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>b48b7ac0792d3ea8f087d99d9e4a29d8</string>
|
<string>6cc1585dba85b0226a2e7033a7e2a2ceaae7c983</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104415/914944/mikktspace-1-darwin64-574859.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-mikktspace/releases/download/v1-5cee1f4/mikktspace-1-darwin64-5cee1f4.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>darwin64</string>
|
<string>darwin64</string>
|
||||||
</map>
|
</map>
|
||||||
<key>windows</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>0a016b9c0c1e2c0b557e0124094da6c5</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104407/914918/mikktspace-1-windows-574859.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows</string>
|
|
||||||
</map>
|
|
||||||
<key>windows64</key>
|
<key>windows64</key>
|
||||||
<map>
|
<map>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>02e9e5b6fe6788f4d2babb83ec544843</string>
|
<string>6b7d01ad54e4a88a001f66840c32329cedb28202</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/104406/914909/mikktspace-1-windows64-574859.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-mikktspace/releases/download/v1-5cee1f4/mikktspace-1-windows64-5cee1f4.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>windows64</string>
|
<string>windows64</string>
|
||||||
</map>
|
</map>
|
||||||
|
<key>linux64</key>
|
||||||
|
<map>
|
||||||
|
<key>archive</key>
|
||||||
|
<map>
|
||||||
|
<key>hash</key>
|
||||||
|
<string>edc9782bf209e17ad1845498b42f16d733582082</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
|
<key>url</key>
|
||||||
|
<string>https://github.com/secondlife/3p-mikktspace/releases/download/v1-5cee1f4/mikktspace-1-linux64-5cee1f4.tar.zst</string>
|
||||||
|
</map>
|
||||||
|
<key>name</key>
|
||||||
|
<string>linux64</string>
|
||||||
|
</map>
|
||||||
</map>
|
</map>
|
||||||
|
<key>license</key>
|
||||||
|
<string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
|
||||||
|
<key>license_file</key>
|
||||||
|
<string>mikktspace.txt</string>
|
||||||
|
<key>copyright</key>
|
||||||
|
<string>Copyright (C) 2011 by Morten S. Mikkelsen</string>
|
||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>1</string>
|
<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>
|
</map>
|
||||||
<key>minizip-ng</key>
|
<key>minizip-ng</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -2518,18 +2512,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
</map>
|
</map>
|
||||||
<key>tinygltf</key>
|
<key>tinygltf</key>
|
||||||
<map>
|
<map>
|
||||||
<key>canonical_repo</key>
|
|
||||||
<string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
|
|
||||||
<key>copyright</key>
|
|
||||||
<string>// Copyright (c) 2015 - Present Syoyo Fujita, Aurélien Chatelain and many contributors.</string>
|
|
||||||
<key>description</key>
|
|
||||||
<string>tinygltf import library</string>
|
|
||||||
<key>license</key>
|
|
||||||
<string>MIT</string>
|
|
||||||
<key>license_file</key>
|
|
||||||
<string>LICENSES/tinygltf_license.txt</string>
|
|
||||||
<key>name</key>
|
|
||||||
<string>tinygltf</string>
|
|
||||||
<key>platforms</key>
|
<key>platforms</key>
|
||||||
<map>
|
<map>
|
||||||
<key>common</key>
|
<key>common</key>
|
||||||
|
|
@ -2537,20 +2519,34 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>4dad1c0948141e1667c01a3ee755e4dc</string>
|
<string>2c47ae2d0c38c86b8c2db8d9317f0ab15edfc74f</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/105849/926137/tinygltf-v2.5.0-common-575729.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-tinygltf/releases/download/v2.5.0-1ae57fd/tinygltf-v2.5.0-common-1ae57fd.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>common</string>
|
<string>common</string>
|
||||||
</map>
|
</map>
|
||||||
</map>
|
</map>
|
||||||
|
<key>license</key>
|
||||||
|
<string>MIT</string>
|
||||||
|
<key>license_file</key>
|
||||||
|
<string>LICENSES/tinygltf_license.txt</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>
|
||||||
|
<key>name</key>
|
||||||
|
<string>tinygltf</string>
|
||||||
|
<key>canonical_repo</key>
|
||||||
|
<string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
|
||||||
|
<key>description</key>
|
||||||
|
<string>tinygltf import library</string>
|
||||||
<key>source</key>
|
<key>source</key>
|
||||||
<string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
|
<string>https://bitbucket.org/lindenlab/3p-tinygltf</string>
|
||||||
<key>source_type</key>
|
<key>source_type</key>
|
||||||
<string>git</string>
|
<string>git</string>
|
||||||
<key>version</key>
|
|
||||||
<string>v2.5.0</string>
|
|
||||||
</map>
|
</map>
|
||||||
<key>tracy</key>
|
<key>tracy</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -2561,9 +2557,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>9b6e1a1f4b0969d38a1ca8ee00aeb548</string>
|
<string>49650353442698c3e05102676fe427d0ebe02f0b</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110584/960613/tracy-v0.8.1.578241-darwin64-578241.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-tracy/releases/download/v0.8.1-eecbf72/tracy-v0.8.1-eecbf72-darwin64-eecbf72.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>darwin64</string>
|
<string>darwin64</string>
|
||||||
|
|
@ -2573,11 +2571,11 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>05b72ae5d733aed7d3bf142287601cc6</string>
|
<string>2b80e7407e4f3e82eff3879add0e9ad63e7fcace</string>
|
||||||
<key>hash_algorithm</key>
|
<key>hash_algorithm</key>
|
||||||
<string>md5</string>
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110586/960637/tracy-v0.8.1.578241-windows64-578241.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-tracy/releases/download/v0.8.1-eecbf72/tracy-v0.8.1-eecbf72-windows64-eecbf72.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>windows64</string>
|
<string>windows64</string>
|
||||||
|
|
@ -2590,7 +2588,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
<string>Copyright (c) 2017-2022, Bartosz Taudul (wolf@nereid.pl)</string>
|
<string>Copyright (c) 2017-2022, Bartosz Taudul (wolf@nereid.pl)</string>
|
||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>v0.8.1.235e98f</string>
|
<string>v0.8.1-eecbf72</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>tracy</string>
|
<string>tracy</string>
|
||||||
<key>canonical_repo</key>
|
<key>canonical_repo</key>
|
||||||
|
|
@ -2601,8 +2599,6 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<string>https://bitbucket.org/lindenlab/3p-tracy</string>
|
<string>https://bitbucket.org/lindenlab/3p-tracy</string>
|
||||||
<key>source_type</key>
|
<key>source_type</key>
|
||||||
<string>git</string>
|
<string>git</string>
|
||||||
<key>version</key>
|
|
||||||
<string>v0.8.1.578241</string>
|
|
||||||
</map>
|
</map>
|
||||||
<key>tut</key>
|
<key>tut</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -2908,59 +2904,37 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
</map>
|
</map>
|
||||||
<key>vulkan_gltf</key>
|
<key>vulkan_gltf</key>
|
||||||
<map>
|
<map>
|
||||||
<key>canonical_repo</key>
|
<key>platforms</key>
|
||||||
<string>https://bitbucket.org/lindenlab/3p-vulkan-gltf-pbr</string>
|
<map>
|
||||||
<key>copyright</key>
|
<key>common</key>
|
||||||
<string>Copyright (c) 2018 Sascha Willems</string>
|
<map>
|
||||||
<key>description</key>
|
<key>archive</key>
|
||||||
<string>Vulkan GLTF Sample Implementation</string>
|
<map>
|
||||||
|
<key>hash</key>
|
||||||
|
<string>8e365eff8dcace48d91e2530f8b13e420849aefc</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
|
<key>url</key>
|
||||||
|
<string>https://github.com/secondlife/3p-vulkan-gltf-pbr/releases/download/v1.0.0-d7c372f/vulkan_gltf-1.0.0-common-d7c372f.tar.zst</string>
|
||||||
|
</map>
|
||||||
|
<key>name</key>
|
||||||
|
<string>common</string>
|
||||||
|
</map>
|
||||||
|
</map>
|
||||||
<key>license</key>
|
<key>license</key>
|
||||||
<string>Copyright (c) 2018 Sascha Willems</string>
|
<string>Copyright (c) 2018 Sascha Willems</string>
|
||||||
<key>license_file</key>
|
<key>license_file</key>
|
||||||
<string>LICENSES/vulkan_gltf.txt</string>
|
<string>vulkan_gltf.txt</string>
|
||||||
|
<key>copyright</key>
|
||||||
|
<string>Copyright (c) 2018 Sascha Willems</string>
|
||||||
|
<key>version</key>
|
||||||
|
<string>1.0.0</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>vulkan_gltf</string>
|
<string>vulkan_gltf</string>
|
||||||
<key>platforms</key>
|
<key>canonical_repo</key>
|
||||||
<map>
|
<string>https://bitbucket.org/lindenlab/3p-vulkan-gltf-pbr</string>
|
||||||
<key>darwin64</key>
|
<key>description</key>
|
||||||
<map>
|
<string>Vulkan GLTF Sample Implementation</string>
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>8cff2060843db3db788511ee34a8e8cc</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/101316/891509/vulkan_gltf-1-darwin64-572743.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>darwin64</string>
|
|
||||||
</map>
|
|
||||||
<key>windows</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>58eea384be49ba756ce9c5e66669540b</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/101318/891520/vulkan_gltf-1-windows-572743.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows</string>
|
|
||||||
</map>
|
|
||||||
<key>windows64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>79b6a11622c2f83cfc2b7cd1fafb867b</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/101319/891521/vulkan_gltf-1-windows64-572743.tar.bz2</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows64</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
|
||||||
<key>version</key>
|
|
||||||
<string>1</string>
|
|
||||||
</map>
|
</map>
|
||||||
<key>xxhash</key>
|
<key>xxhash</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -2971,55 +2945,15 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>archive</key>
|
<key>archive</key>
|
||||||
<map>
|
<map>
|
||||||
<key>hash</key>
|
<key>hash</key>
|
||||||
<string>e4f77ba0a9b8ec3cc3fabc51c4da81d2</string>
|
<string>1a73c476b371b62066d1c3eced249660e9467e53</string>
|
||||||
|
<key>hash_algorithm</key>
|
||||||
|
<string>sha1</string>
|
||||||
<key>url</key>
|
<key>url</key>
|
||||||
<string>https://automated-builds-secondlife-com.s3.amazonaws.com/ct2/110070/956941/xxhash-0.8.1.578006-windows-578006.tar.bz2</string>
|
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1-69ff69a/xxhash-0.8.1-69ff69a-common-69ff69a.tar.zst</string>
|
||||||
</map>
|
</map>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>common</string>
|
<string>common</string>
|
||||||
</map>
|
</map>
|
||||||
<key>darwin64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>fdcc803a76a3359bb426db7dac161406676d51e7</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>sha1</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-darwin64-7501c90.tar.zst</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>darwin64</string>
|
|
||||||
</map>
|
|
||||||
<key>linux64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>7acb3f94a549fbb9bd7bc16604e34f33c5365a9b</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>sha1</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-linux64-7501c90.tar.zst</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>linux64</string>
|
|
||||||
</map>
|
|
||||||
<key>windows64</key>
|
|
||||||
<map>
|
|
||||||
<key>archive</key>
|
|
||||||
<map>
|
|
||||||
<key>hash</key>
|
|
||||||
<string>4522d075ea4703ef4b527c3039864ef735ea7953</string>
|
|
||||||
<key>hash_algorithm</key>
|
|
||||||
<string>sha1</string>
|
|
||||||
<key>url</key>
|
|
||||||
<string>https://github.com/secondlife/3p-xxhash/releases/download/v0.8.1.7501c90/xxhash-0.8.1.7501c90-windows64-7501c90.tar.zst</string>
|
|
||||||
</map>
|
|
||||||
<key>name</key>
|
|
||||||
<string>windows64</string>
|
|
||||||
</map>
|
|
||||||
</map>
|
</map>
|
||||||
<key>license</key>
|
<key>license</key>
|
||||||
<string>xxhash</string>
|
<string>xxhash</string>
|
||||||
|
|
@ -3028,7 +2962,7 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors</string>
|
||||||
<key>copyright</key>
|
<key>copyright</key>
|
||||||
<string>Copyright (c) 2012-2021 Yann Collet</string>
|
<string>Copyright (c) 2012-2021 Yann Collet</string>
|
||||||
<key>version</key>
|
<key>version</key>
|
||||||
<string>0.8.1.7501c90</string>
|
<string>0.8.1-69ff69a</string>
|
||||||
<key>name</key>
|
<key>name</key>
|
||||||
<string>xxhash</string>
|
<string>xxhash</string>
|
||||||
<key>description</key>
|
<key>description</key>
|
||||||
|
|
|
||||||
22
build.sh
22
build.sh
|
|
@ -175,28 +175,6 @@ pre_build()
|
||||||
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
|
VIEWER_SYMBOL_FILE="$(native_path "$abs_build_dir/newview/$variant/secondlife-symbols-$symplat-${AUTOBUILD_ADDRSIZE}.tar.bz2")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# expect these variables to be set in the environment from GitHub secrets
|
|
||||||
if [[ -n "$BUGSPLAT_DB" ]]
|
|
||||||
then
|
|
||||||
# don't spew credentials into build log
|
|
||||||
set +x
|
|
||||||
if [[ -z "$BUGSPLAT_USER" || -z "$BUGSPLAT_PASS" ]]
|
|
||||||
then
|
|
||||||
# older mechanism involving build-secrets repo -
|
|
||||||
# if build_secrets_checkout isn't set, report its name
|
|
||||||
bugsplat_sh="${build_secrets_checkout:-\$build_secrets_checkout}/bugsplat/bugsplat.sh"
|
|
||||||
if [ -r "$bugsplat_sh" ]
|
|
||||||
then # show that we're doing this, just not the contents
|
|
||||||
echo source "$bugsplat_sh"
|
|
||||||
source "$bugsplat_sh"
|
|
||||||
else
|
|
||||||
fatal "BUGSPLAT_USER or BUGSPLAT_PASS missing, and no $bugsplat_sh"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
set -x
|
|
||||||
export BUGSPLAT_USER BUGSPLAT_PASS
|
|
||||||
fi
|
|
||||||
|
|
||||||
# honor autobuild_configure_parameters same as sling-buildscripts
|
# honor autobuild_configure_parameters same as sling-buildscripts
|
||||||
eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters))
|
eval_autobuild_configure_parameters=$(eval $(echo echo $autobuild_configure_parameters))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
Textures imported via Build->Upload->Material that have an all opaque (255) alpha channel should have their alpha channel removed before upload.
|
||||||
|
|
||||||
|
1. Make 4 images that have different colors but all 255 alpha channels
|
||||||
|
2. Upload them all using Build->Upload->Material, with one in each of the material texture slots
|
||||||
|
3. Verify that using the textures as a blinn-phong diffuse map does not make the corresponding face render in the alpha pass (face should stay visible after disabling alpha pass by unchecking Advanced->Render Types->Alpha).
|
||||||
|
|
@ -50,6 +50,7 @@ const LLUUID IMG_FIRE ("aca40aa8-44cf-44ca-a0fa-93e1a2986f82"); // dataserver
|
||||||
const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
|
const LLUUID IMG_FACE_SELECT ("a85ac674-cb75-4af6-9499-df7c5aaf7a28"); // face selector
|
||||||
const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
|
const LLUUID IMG_DEFAULT_AVATAR ("c228d1cf-4b5d-4ba8-84f4-899a0796aa97"); // dataserver
|
||||||
const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
|
const LLUUID IMG_INVISIBLE ("3a367d1c-bef1-6d43-7595-e88c1e3aadb3"); // dataserver
|
||||||
|
const LLUUID IMG_WHITE ("5748decc-f629-461c-9a36-a35a221fe21f"); // dataserver
|
||||||
|
|
||||||
const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
|
const LLUUID IMG_EXPLOSION ("68edcf47-ccd7-45b8-9f90-1649d7f12806"); // On dataserver
|
||||||
const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
|
const LLUUID IMG_EXPLOSION_2 ("21ce046c-83fe-430a-b629-c7660ac78d7c"); // On dataserver
|
||||||
|
|
@ -71,6 +72,11 @@ const LLUUID TERRAIN_ROCK_DETAIL ("53a2f406-4895-1d13-d541-d2e3b86bc19c"); // V
|
||||||
|
|
||||||
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
|
const LLUUID DEFAULT_WATER_NORMAL ("822ded49-9a6c-f61c-cb89-6df54f42cdf4"); // VIEWER
|
||||||
|
|
||||||
|
const LLUUID DEFAULT_OBJECT_TEXTURE ("89556747-24cb-43ed-920b-47caed15465f"); // On dataserver
|
||||||
|
const LLUUID DEFAULT_OBJECT_SPECULAR ("87e0e8f7-8729-1ea8-cfc9-8915773009db"); // On dataserver
|
||||||
|
const LLUUID DEFAULT_OBJECT_NORMAL ("85f28839-7a1c-b4e3-d71d-967792970a7b"); // On dataserver
|
||||||
|
const LLUUID BLANK_OBJECT_NORMAL ("5b53359e-59dd-d8a2-04c3-9e65134da47a"); // VIEWER (has a verion on dataserver, but with compression artifacts)
|
||||||
|
|
||||||
const LLUUID IMG_USE_BAKED_HEAD ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
|
const LLUUID IMG_USE_BAKED_HEAD ("5a9f4a74-30f2-821c-b88d-70499d3e7183");
|
||||||
const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
|
const LLUUID IMG_USE_BAKED_UPPER ("ae2de45c-d252-50b8-5c6e-19f39ce79317");
|
||||||
const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");
|
const LLUUID IMG_USE_BAKED_LOWER ("24daea5f-0539-cfcf-047f-fbc40b2786ba");
|
||||||
|
|
|
||||||
|
|
@ -197,6 +197,7 @@ LL_COMMON_API extern const LLUUID IMG_FIRE;
|
||||||
LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
|
LL_COMMON_API extern const LLUUID IMG_FACE_SELECT;
|
||||||
LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
|
LL_COMMON_API extern const LLUUID IMG_DEFAULT_AVATAR;
|
||||||
LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
|
LL_COMMON_API extern const LLUUID IMG_INVISIBLE;
|
||||||
|
LL_COMMON_API extern const LLUUID IMG_WHITE;
|
||||||
|
|
||||||
LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
|
LL_COMMON_API extern const LLUUID IMG_EXPLOSION;
|
||||||
LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
|
LL_COMMON_API extern const LLUUID IMG_EXPLOSION_2;
|
||||||
|
|
@ -230,6 +231,10 @@ LL_COMMON_API extern const LLUUID IMG_USE_BAKED_AUX3;
|
||||||
|
|
||||||
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
|
LL_COMMON_API extern const LLUUID DEFAULT_WATER_NORMAL;
|
||||||
|
|
||||||
|
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_TEXTURE;
|
||||||
|
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_SPECULAR;
|
||||||
|
LL_COMMON_API extern const LLUUID DEFAULT_OBJECT_NORMAL;
|
||||||
|
LL_COMMON_API extern const LLUUID BLANK_OBJECT_NORMAL;
|
||||||
|
|
||||||
// radius within which a chat message is fully audible
|
// radius within which a chat message is fully audible
|
||||||
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
const F32 CHAT_NORMAL_RADIUS = 20.f;
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,7 @@ std::string LLCoros::launch(const std::string& prefix, const callable_t& callabl
|
||||||
catch (std::bad_alloc&)
|
catch (std::bad_alloc&)
|
||||||
{
|
{
|
||||||
// Out of memory on stack allocation?
|
// Out of memory on stack allocation?
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
printActiveCoroutines();
|
printActiveCoroutines();
|
||||||
LL_ERRS("LLCoros") << "Bad memory allocation in LLCoros::launch(" << prefix << ")!" << LL_ENDL;
|
LL_ERRS("LLCoros") << "Bad memory allocation in LLCoros::launch(" << prefix << ")!" << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1601,6 +1601,48 @@ namespace LLError
|
||||||
{
|
{
|
||||||
return out << boost::stacktrace::stacktrace();
|
return out << boost::stacktrace::stacktrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// LLOutOfMemoryWarning
|
||||||
|
std::string LLUserWarningMsg::sLocalizedOutOfMemoryTitle;
|
||||||
|
std::string LLUserWarningMsg::sLocalizedOutOfMemoryWarning;
|
||||||
|
LLUserWarningMsg::Handler LLUserWarningMsg::sHandler;
|
||||||
|
|
||||||
|
void LLUserWarningMsg::show(const std::string& message)
|
||||||
|
{
|
||||||
|
if (sHandler)
|
||||||
|
{
|
||||||
|
sHandler(std::string(), message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLUserWarningMsg::showOutOfMemory()
|
||||||
|
{
|
||||||
|
if (sHandler && !sLocalizedOutOfMemoryTitle.empty())
|
||||||
|
{
|
||||||
|
sHandler(sLocalizedOutOfMemoryTitle, sLocalizedOutOfMemoryWarning);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLUserWarningMsg::showMissingFiles()
|
||||||
|
{
|
||||||
|
// Files Are missing, likely can't localize.
|
||||||
|
const std::string error_string =
|
||||||
|
"Second Life viewer couldn't access some of the files it needs and will be closed."
|
||||||
|
"\n\nPlease reinstall viewer from https://secondlife.com/support/downloads/ and "
|
||||||
|
"contact https://support.secondlife.com if issue persists after reinstall.";
|
||||||
|
sHandler("Missing Files", error_string);
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLUserWarningMsg::setHandler(const LLUserWarningMsg::Handler &handler)
|
||||||
|
{
|
||||||
|
sHandler = handler;
|
||||||
|
}
|
||||||
|
|
||||||
|
void LLUserWarningMsg::setOutOfMemoryStrings(const std::string& title, const std::string& message)
|
||||||
|
{
|
||||||
|
sLocalizedOutOfMemoryTitle = title;
|
||||||
|
sLocalizedOutOfMemoryWarning = message;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void crashdriver(void (*callback)(int*))
|
void crashdriver(void (*callback)(int*))
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@
|
||||||
#include "llpreprocessor.h"
|
#include "llpreprocessor.h"
|
||||||
|
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
#include <functional> // std::function
|
||||||
|
|
||||||
const int LL_ERR_NOERR = 0;
|
const int LL_ERR_NOERR = 0;
|
||||||
|
|
||||||
|
|
@ -301,6 +302,28 @@ namespace LLError
|
||||||
{
|
{
|
||||||
friend std::ostream& operator<<(std::ostream& out, const LLStacktrace&);
|
friend std::ostream& operator<<(std::ostream& out, const LLStacktrace&);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Provides access to OS notification popup on error, since
|
||||||
|
// not everything has access to OS's messages
|
||||||
|
class LLUserWarningMsg
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef std::function<void(const std::string&, const std::string&)> Handler;
|
||||||
|
static void setHandler(const Handler&);
|
||||||
|
static void setOutOfMemoryStrings(const std::string& title, const std::string& message);
|
||||||
|
|
||||||
|
// When viewer encounters bad alloc or can't access files try warning user about reasons
|
||||||
|
static void showOutOfMemory();
|
||||||
|
static void showMissingFiles();
|
||||||
|
// Genering error
|
||||||
|
static void show(const std::string&);
|
||||||
|
|
||||||
|
private:
|
||||||
|
// needs to be preallocated before viewer runs out of memory
|
||||||
|
static std::string sLocalizedOutOfMemoryTitle;
|
||||||
|
static std::string sLocalizedOutOfMemoryWarning;
|
||||||
|
static Handler sHandler;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
//this is cheaper than llcallstacks if no need to output other variables to call stacks.
|
//this is cheaper than llcallstacks if no need to output other variables to call stacks.
|
||||||
|
|
|
||||||
|
|
@ -37,6 +37,7 @@
|
||||||
#include "llerror.h"
|
#include "llerror.h"
|
||||||
#include "llerrorcontrol.h"
|
#include "llerrorcontrol.h"
|
||||||
|
|
||||||
|
|
||||||
// used to attach and extract stacktrace information to/from boost::exception,
|
// used to attach and extract stacktrace information to/from boost::exception,
|
||||||
// see https://www.boost.org/doc/libs/release/doc/html/stacktrace/getting_started.html#stacktrace.getting_started.exceptions_with_stacktrace
|
// see https://www.boost.org/doc/libs/release/doc/html/stacktrace/getting_started.html#stacktrace.getting_started.exceptions_with_stacktrace
|
||||||
// apparently the struct passed as the first template param needs no definition?
|
// apparently the struct passed as the first template param needs no definition?
|
||||||
|
|
|
||||||
|
|
@ -455,7 +455,7 @@ public:
|
||||||
|
|
||||||
static DERIVED_TYPE* getInstance()
|
static DERIVED_TYPE* getInstance()
|
||||||
{
|
{
|
||||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD;
|
//LL_PROFILE_ZONE_SCOPED_CATEGORY_THREAD; // TODO -- reenable this when we have a fix for using Tracy with coroutines
|
||||||
// We know the viewer has LLSingleton dependency circularities. If you
|
// We know the viewer has LLSingleton dependency circularities. If you
|
||||||
// feel strongly motivated to eliminate them, cheers and good luck.
|
// feel strongly motivated to eliminate them, cheers and good luck.
|
||||||
// (At that point we could consider a much simpler locking mechanism.)
|
// (At that point we could consider a much simpler locking mechanism.)
|
||||||
|
|
|
||||||
|
|
@ -320,6 +320,7 @@ void HttpService::threadRun(LLCoreInt::HttpThread * thread)
|
||||||
LLMemory::logMemoryInfo(TRUE);
|
LLMemory::logMemoryInfo(TRUE);
|
||||||
|
|
||||||
//output possible call stacks to log file.
|
//output possible call stacks to log file.
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LLError::LLCallStacks::print();
|
LLError::LLCallStacks::print();
|
||||||
|
|
||||||
LL_ERRS() << "Bad memory allocation in HttpService::threadRun()!" << LL_ENDL;
|
LL_ERRS() << "Bad memory allocation in HttpService::threadRun()!" << LL_ENDL;
|
||||||
|
|
|
||||||
|
|
@ -321,6 +321,7 @@ bool LLImageBMP::updateData()
|
||||||
mColorPalette = new(std::nothrow) U8[color_palette_size];
|
mColorPalette = new(std::nothrow) U8[color_palette_size];
|
||||||
if (!mColorPalette)
|
if (!mColorPalette)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL;
|
LL_ERRS() << "Out of memory in LLImageBMP::updateData()" << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -437,6 +437,7 @@ bool LLImageDXT::convertToDXR()
|
||||||
U8* newdata = (U8*)ll_aligned_malloc_16(total_bytes);
|
U8* newdata = (U8*)ll_aligned_malloc_16(total_bytes);
|
||||||
if (!newdata)
|
if (!newdata)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;
|
LL_ERRS() << "Out of memory in LLImageDXT::convertToDXR()" << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,6 +266,7 @@ bool LLImageTGA::updateData()
|
||||||
mColorMap = new(std::nothrow) U8[ color_map_bytes ];
|
mColorMap = new(std::nothrow) U8[ color_map_bytes ];
|
||||||
if (!mColorMap)
|
if (!mColorMap)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Out of Memory in bool LLImageTGA::updateData()" << LL_ENDL;
|
LL_ERRS() << "Out of Memory in bool LLImageTGA::updateData()" << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1353,6 +1353,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
|
||||||
scratch = new(std::nothrow) U32[width * height];
|
scratch = new(std::nothrow) U32[width * height];
|
||||||
if (!scratch)
|
if (!scratch)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
||||||
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
@ -1378,6 +1379,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
|
||||||
scratch = new(std::nothrow) U32[width * height];
|
scratch = new(std::nothrow) U32[width * height];
|
||||||
if (!scratch)
|
if (!scratch)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
||||||
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
@ -1406,6 +1408,7 @@ void LLImageGL::setManualImage(U32 target, S32 miplevel, S32 intformat, S32 widt
|
||||||
scratch = new(std::nothrow) U32[width * height];
|
scratch = new(std::nothrow) U32[width * height];
|
||||||
if (!scratch)
|
if (!scratch)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
LL_ERRS() << "Failed to allocate " << (U32)(width * height * sizeof(U32))
|
||||||
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
<< " bytes for a manual image W" << width << " H" << height << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -857,7 +857,7 @@ LLRender::~LLRender()
|
||||||
shutdown();
|
shutdown();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLRender::init(bool needs_vertex_buffer)
|
bool LLRender::init(bool needs_vertex_buffer)
|
||||||
{
|
{
|
||||||
#if LL_WINDOWS
|
#if LL_WINDOWS
|
||||||
if (gGLManager.mHasDebugOutput && gDebugGL)
|
if (gGLManager.mHasDebugOutput && gDebugGL)
|
||||||
|
|
@ -879,6 +879,13 @@ void LLRender::init(bool needs_vertex_buffer)
|
||||||
// necessary for reflection maps
|
// necessary for reflection maps
|
||||||
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
glEnable(GL_TEXTURE_CUBE_MAP_SEAMLESS);
|
||||||
|
|
||||||
|
#if LL_WINDOWS
|
||||||
|
if (glGenVertexArrays == nullptr)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
{ //bind a dummy vertex array object so we're core profile compliant
|
{ //bind a dummy vertex array object so we're core profile compliant
|
||||||
U32 ret;
|
U32 ret;
|
||||||
glGenVertexArrays(1, &ret);
|
glGenVertexArrays(1, &ret);
|
||||||
|
|
@ -889,6 +896,7 @@ void LLRender::init(bool needs_vertex_buffer)
|
||||||
{
|
{
|
||||||
initVertexBuffer();
|
initVertexBuffer();
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLRender::initVertexBuffer()
|
void LLRender::initVertexBuffer()
|
||||||
|
|
|
||||||
|
|
@ -375,7 +375,7 @@ public:
|
||||||
|
|
||||||
LLRender();
|
LLRender();
|
||||||
~LLRender();
|
~LLRender();
|
||||||
void init(bool needs_vertex_buffer);
|
bool init(bool needs_vertex_buffer);
|
||||||
void initVertexBuffer();
|
void initVertexBuffer();
|
||||||
void resetVertexBuffer();
|
void resetVertexBuffer();
|
||||||
void shutdown();
|
void shutdown();
|
||||||
|
|
|
||||||
|
|
@ -40,9 +40,9 @@ LLRenderNavPrim gRenderNav;
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
|
void LLRenderNavPrim::renderLLTri( const LLVector3& a, const LLVector3& b, const LLVector3& c, const LLColor4U& color ) const
|
||||||
{
|
{
|
||||||
LLColor4 cV(color);
|
gGL.color4ubv(color.mV);
|
||||||
gGL.color4fv( cV.mV );
|
|
||||||
gGL.begin(LLRender::TRIANGLES);
|
gGL.begin(LLRender::TRIANGLES);
|
||||||
{
|
{
|
||||||
gGL.vertex3fv( a.mV );
|
gGL.vertex3fv( a.mV );
|
||||||
gGL.vertex3fv( b.mV );
|
gGL.vertex3fv( b.mV );
|
||||||
|
|
|
||||||
|
|
@ -1558,6 +1558,7 @@ bool LLNotifications::loadTemplates()
|
||||||
|
|
||||||
if (!success || root.isNull() || !root->hasName( "notifications" ))
|
if (!success || root.isNull() || !root->hasName( "notifications" ))
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
|
||||||
LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL;
|
LL_ERRS() << "Problem reading XML from UI Notifications file: " << base_filename << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1568,6 +1569,7 @@ bool LLNotifications::loadTemplates()
|
||||||
|
|
||||||
if(!params.validateBlock())
|
if(!params.validateBlock())
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
|
||||||
LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL;
|
LL_ERRS() << "Problem reading XUI from UI Notifications file: " << base_filename << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -1634,6 +1636,7 @@ bool LLNotifications::loadVisibilityRules()
|
||||||
|
|
||||||
if(!params.validateBlock())
|
if(!params.validateBlock())
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::show(LLTrans::getString("MBMissingFile"));
|
||||||
LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL;
|
LL_ERRS() << "Problem reading UI Notification Visibility Rules file: " << full_filename << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2694,6 +2694,7 @@ BOOL LLTextEditor::importBuffer(const char* buffer, S32 length )
|
||||||
char* text = new char[ text_len + 1];
|
char* text = new char[ text_len + 1];
|
||||||
if (text == NULL)
|
if (text == NULL)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "Memory allocation failure." << LL_ENDL;
|
LL_ERRS() << "Memory allocation failure." << LL_ENDL;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -44,8 +44,13 @@ bool LLTransUtil::parseStrings(const std::string& xml_filename, const std::set<s
|
||||||
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
|
bool success = LLUICtrlFactory::getLayeredXMLNode(xml_filename, root, LLDir::ALL_SKINS);
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
const std::string error_string =
|
||||||
|
"Second Life viewer couldn't access some of the files it needs and will be closed."
|
||||||
|
"\n\nPlease reinstall viewer from https://secondlife.com/support/downloads/ and "
|
||||||
|
"contact https://support.secondlife.com if issue persists after reinstall.";
|
||||||
|
LLError::LLUserWarningMsg::show(error_string);
|
||||||
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
|
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
|
||||||
LL_ERRS() << "Couldn't load string table " << xml_filename << ". Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
|
LL_ERRS() << "Couldn't load string table " << xml_filename << " " << errno << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -60,6 +65,7 @@ bool LLTransUtil::parseLanguageStrings(const std::string& xml_filename)
|
||||||
|
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS() << "Couldn't load localization table " << xml_filename << LL_ENDL;
|
LL_ERRS() << "Couldn't load localization table " << xml_filename << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
7.1.4
|
7.1.5
|
||||||
|
|
|
||||||
|
|
@ -3244,17 +3244,6 @@
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<integer>0</integer>
|
<integer>0</integer>
|
||||||
</map>
|
</map>
|
||||||
<key>DefaultBlankNormalTexture</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Texture used as 'Blank' in texture picker for normal maps. (UUID texture reference)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>5b53359e-59dd-d8a2-04c3-9e65134da47a</string>
|
|
||||||
</map>
|
|
||||||
<key>DefaultFemaleAvatar</key>
|
<key>DefaultFemaleAvatar</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
@ -3288,39 +3277,6 @@
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>Male Shape & Outfit</string>
|
<string>Male Shape & Outfit</string>
|
||||||
</map>
|
</map>
|
||||||
<key>DefaultObjectNormalTexture</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Texture used as 'Default' in texture picker for normal map. (UUID texture reference)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>85f28839-7a1c-b4e3-d71d-967792970a7b</string>
|
|
||||||
</map>
|
|
||||||
<key>DefaultObjectSpecularTexture</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Texture used as 'Default' in texture picker for specular map. (UUID texture reference)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>87e0e8f7-8729-1ea8-cfc9-8915773009db</string>
|
|
||||||
</map>
|
|
||||||
<key>DefaultObjectTexture</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string>Texture used as 'Default' in texture picker. (UUID texture reference)</string>
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>1</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>89556747-24cb-43ed-920b-47caed15465f</string>
|
|
||||||
</map>
|
|
||||||
<key>DefaultUploadCost</key>
|
<key>DefaultUploadCost</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
@ -10676,7 +10632,7 @@
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>F32</string>
|
<string>F32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>2.0</real>
|
<real>1.0</real>
|
||||||
</map>
|
</map>
|
||||||
<key>RendeSkyAutoAdjustBlueHorizonScale</key>
|
<key>RendeSkyAutoAdjustBlueHorizonScale</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -10720,7 +10676,7 @@
|
||||||
<key>Type</key>
|
<key>Type</key>
|
||||||
<string>F32</string>
|
<string>F32</string>
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<real>0.001</real>
|
<real>0.01</real>
|
||||||
</map>
|
</map>
|
||||||
<key>RenderSkySunlightScale</key>
|
<key>RenderSkySunlightScale</key>
|
||||||
<map>
|
<map>
|
||||||
|
|
@ -13620,17 +13576,6 @@
|
||||||
<key>Value</key>
|
<key>Value</key>
|
||||||
<string>F3E07BC8-A973-476D-8C7F-F3B7293975D1</string>
|
<string>F3E07BC8-A973-476D-8C7F-F3B7293975D1</string>
|
||||||
</map>
|
</map>
|
||||||
<key>UIImgWhiteUUID</key>
|
|
||||||
<map>
|
|
||||||
<key>Comment</key>
|
|
||||||
<string />
|
|
||||||
<key>Persist</key>
|
|
||||||
<integer>0</integer>
|
|
||||||
<key>Type</key>
|
|
||||||
<string>String</string>
|
|
||||||
<key>Value</key>
|
|
||||||
<string>5748decc-f629-461c-9a36-a35a221fe21f</string>
|
|
||||||
</map>
|
|
||||||
<key>UILineEditorCursorThickness</key>
|
<key>UILineEditorCursorThickness</key>
|
||||||
<map>
|
<map>
|
||||||
<key>Comment</key>
|
<key>Comment</key>
|
||||||
|
|
|
||||||
|
|
@ -168,6 +168,7 @@ void LLAppCoreHttp::init()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS("Init") << "Missing CA File; should be at " << ca_file << LL_ENDL;
|
LL_ERRS("Init") << "Missing CA File; should be at " << ca_file << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,6 @@ BOOL gRandomizeFramerate = FALSE;
|
||||||
BOOL gPeriodicSlowFrame = FALSE;
|
BOOL gPeriodicSlowFrame = FALSE;
|
||||||
|
|
||||||
BOOL gCrashOnStartup = FALSE;
|
BOOL gCrashOnStartup = FALSE;
|
||||||
BOOL gLLErrorActivated = FALSE;
|
|
||||||
BOOL gLogoutInProgress = FALSE;
|
BOOL gLogoutInProgress = FALSE;
|
||||||
|
|
||||||
BOOL gSimulateMemLeak = FALSE;
|
BOOL gSimulateMemLeak = FALSE;
|
||||||
|
|
@ -2252,9 +2251,6 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
|
||||||
OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
|
OSMessageBox(error_string, LLTrans::getString("MBFatalError"), OSMB_OK);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Set the ErrorActivated global so we know to create a marker file
|
|
||||||
gLLErrorActivated = true;
|
|
||||||
|
|
||||||
gDebugInfo["FatalMessage"] = error_string;
|
gDebugInfo["FatalMessage"] = error_string;
|
||||||
// We're not already crashing -- we simply *intend* to crash. Since we
|
// We're not already crashing -- we simply *intend* to crash. Since we
|
||||||
// haven't actually trashed anything yet, we can afford to write the whole
|
// haven't actually trashed anything yet, we can afford to write the whole
|
||||||
|
|
@ -2263,6 +2259,14 @@ void errorCallback(LLError::ELevel level, const std::string &error_string)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void errorMSG(const std::string& title_string, const std::string& message_string)
|
||||||
|
{
|
||||||
|
if (!message_string.empty())
|
||||||
|
{
|
||||||
|
OSMessageBox(message_string, title_string.empty() ? LLTrans::getString("MBFatalError") : title_string, OSMB_OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LLAppViewer::initLoggingAndGetLastDuration()
|
void LLAppViewer::initLoggingAndGetLastDuration()
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
|
|
@ -2274,6 +2278,8 @@ void LLAppViewer::initLoggingAndGetLastDuration()
|
||||||
LLError::addGenericRecorder(&errorCallback);
|
LLError::addGenericRecorder(&errorCallback);
|
||||||
//LLError::setTimeFunction(getRuntime);
|
//LLError::setTimeFunction(getRuntime);
|
||||||
|
|
||||||
|
LLError::LLUserWarningMsg::setHandler(errorMSG);
|
||||||
|
|
||||||
|
|
||||||
if (mSecondInstance)
|
if (mSecondInstance)
|
||||||
{
|
{
|
||||||
|
|
@ -2411,6 +2417,7 @@ bool LLAppViewer::loadSettingsFromDirectory(const std::string& location_key,
|
||||||
{ // failed to load
|
{ // failed to load
|
||||||
if(file.required)
|
if(file.required)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL;
|
LL_ERRS() << "Error: Cannot load required settings file from: " << full_settings_path << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -2509,6 +2516,7 @@ bool LLAppViewer::initConfiguration()
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
|
LL_WARNS() << "Cannot load default configuration file " << settings_file_list << LL_ENDL;
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
if (gDirUtilp->fileExists(settings_file_list))
|
if (gDirUtilp->fileExists(settings_file_list))
|
||||||
{
|
{
|
||||||
LL_ERRS() << "Cannot load default configuration file settings_files.xml. "
|
LL_ERRS() << "Cannot load default configuration file settings_files.xml. "
|
||||||
|
|
@ -2532,6 +2540,7 @@ bool LLAppViewer::initConfiguration()
|
||||||
|
|
||||||
if (!mSettingsLocationList->validateBlock())
|
if (!mSettingsLocationList->validateBlock())
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
|
LL_ERRS() << "Invalid settings file list " << settings_file_list << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2966,6 +2975,8 @@ bool LLAppViewer::initConfiguration()
|
||||||
LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", key));
|
LLEventPumps::instance().obtain("LLControlGroup").post(LLSDMap("init", key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLError::LLUserWarningMsg::setOutOfMemoryStrings(LLTrans::getString("MBOutOfMemoryTitle"), LLTrans::getString("MBOutOfMemoryErr"));
|
||||||
|
|
||||||
return true; // Config was successful.
|
return true; // Config was successful.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3003,6 +3014,7 @@ void LLAppViewer::initStrings()
|
||||||
|
|
||||||
// initial check to make sure files are there failed
|
// initial check to make sure files are there failed
|
||||||
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
|
gDirUtilp->dumpCurrentDirectories(LLError::LEVEL_WARN);
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS() << "Viewer failed to find localization and UI files."
|
LL_ERRS() << "Viewer failed to find localization and UI files."
|
||||||
<< " Please reinstall viewer from https://secondlife.com/support/downloads"
|
<< " Please reinstall viewer from https://secondlife.com/support/downloads"
|
||||||
<< " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
|
<< " and contact https://support.secondlife.com if issue persists after reinstall." << LL_ENDL;
|
||||||
|
|
@ -3327,7 +3339,6 @@ LLSD LLAppViewer::getViewerInfo() const
|
||||||
info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS");
|
info["NET_BANDWITH"] = gSavedSettings.getF32("ThrottleBandwidthKBPS");
|
||||||
info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor");
|
info["LOD_FACTOR"] = gSavedSettings.getF32("RenderVolumeLODFactor");
|
||||||
info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance");
|
info["RENDER_QUALITY"] = (F32)gSavedSettings.getU32("RenderQualityPerformance");
|
||||||
info["GPU_SHADERS"] = gSavedSettings.getBOOL("RenderDeferred") ? "Enabled" : "Disabled";
|
|
||||||
info["TEXTURE_MEMORY"] = gGLManager.mVRAM;
|
info["TEXTURE_MEMORY"] = gGLManager.mVRAM;
|
||||||
|
|
||||||
#if LL_DARWIN
|
#if LL_DARWIN
|
||||||
|
|
@ -4309,6 +4320,7 @@ void LLAppViewer::loadKeyBindings()
|
||||||
key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml");
|
key_bindings_file = gDirUtilp->getExpandedFilename(LL_PATH_APP_SETTINGS, "key_bindings.xml");
|
||||||
if (!gViewerInput.loadBindingsXML(key_bindings_file))
|
if (!gViewerInput.loadBindingsXML(key_bindings_file))
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showMissingFiles();
|
||||||
LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL;
|
LL_ERRS("InitInfo") << "Unable to open default key bindings from " << key_bindings_file << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5406,6 +5418,14 @@ void LLAppViewer::forceErrorLLError()
|
||||||
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
|
LL_ERRS() << "This is a deliberate llerror" << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LLAppViewer::forceErrorLLErrorMsg()
|
||||||
|
{
|
||||||
|
LLError::LLUserWarningMsg::show("Deliberate error");
|
||||||
|
// Note: under debug this will show a message as well,
|
||||||
|
// but release won't show anything and will quit silently
|
||||||
|
LL_ERRS() << "This is a deliberate llerror with a message" << LL_ENDL;
|
||||||
|
}
|
||||||
|
|
||||||
void LLAppViewer::forceErrorBreakpoint()
|
void LLAppViewer::forceErrorBreakpoint()
|
||||||
{
|
{
|
||||||
LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
|
LL_WARNS() << "Forcing a deliberate breakpoint" << LL_ENDL;
|
||||||
|
|
|
||||||
|
|
@ -152,6 +152,7 @@ public:
|
||||||
// LLAppViewer testing helpers.
|
// LLAppViewer testing helpers.
|
||||||
// *NOTE: These will potentially crash the viewer. Only for debugging.
|
// *NOTE: These will potentially crash the viewer. Only for debugging.
|
||||||
virtual void forceErrorLLError();
|
virtual void forceErrorLLError();
|
||||||
|
virtual void forceErrorLLErrorMsg();
|
||||||
virtual void forceErrorBreakpoint();
|
virtual void forceErrorBreakpoint();
|
||||||
virtual void forceErrorBadMemoryAccess();
|
virtual void forceErrorBadMemoryAccess();
|
||||||
virtual void forceErrorInfiniteLoop();
|
virtual void forceErrorInfiniteLoop();
|
||||||
|
|
|
||||||
|
|
@ -339,6 +339,7 @@ void LLAvatarRenderInfoAccountant::sendRenderInfoToRegion(LLViewerRegion * regio
|
||||||
}
|
}
|
||||||
catch (std::bad_alloc&)
|
catch (std::bad_alloc&)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
|
LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -370,6 +371,7 @@ void LLAvatarRenderInfoAccountant::getRenderInfoFromRegion(LLViewerRegion * regi
|
||||||
}
|
}
|
||||||
catch (std::bad_alloc&)
|
catch (std::bad_alloc&)
|
||||||
{
|
{
|
||||||
|
LLError::LLUserWarningMsg::showOutOfMemory();
|
||||||
LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
|
LL_ERRS() << "LLCoros::launch() allocation failure" << LL_ENDL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -815,7 +815,7 @@ const F64Seconds LLEnvironment::TRANSITION_SLOW(10.0f);
|
||||||
const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
|
const F64Seconds LLEnvironment::TRANSITION_ALTITUDE(5.0f);
|
||||||
|
|
||||||
const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
|
const LLUUID LLEnvironment::KNOWN_SKY_SUNRISE("01e41537-ff51-2f1f-8ef7-17e4df760bfb");
|
||||||
const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("651510b8-5f4d-8991-1592-e7eeab2a5a06");
|
const LLUUID LLEnvironment::KNOWN_SKY_MIDDAY("c46226b4-0e43-5a56-9708-d27ca1df3292");
|
||||||
const LLUUID LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY("cef49723-0292-af49-9b14-9598a616b8a3");
|
const LLUUID LLEnvironment::KNOWN_SKY_LEGACY_MIDDAY("cef49723-0292-af49-9b14-9598a616b8a3");
|
||||||
const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2");
|
const LLUUID LLEnvironment::KNOWN_SKY_SUNSET("084e26cd-a900-28e8-08d0-64a9de5c15e2");
|
||||||
const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090");
|
const LLUUID LLEnvironment::KNOWN_SKY_MIDNIGHT("8a01b97a-cb20-c1ea-ac63-f7ea84ad0090");
|
||||||
|
|
@ -895,6 +895,14 @@ void LLEnvironment::initSingleton()
|
||||||
gGenericDispatcher.addHandler(MESSAGE_PUSHENVIRONMENT, &environment_push_dispatch_handler);
|
gGenericDispatcher.addHandler(MESSAGE_PUSHENVIRONMENT, &environment_push_dispatch_handler);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gSavedSettings.getControl("RenderSkyAutoAdjustProbeAmbiance")->getSignal()->connect(
|
||||||
|
[](LLControlVariable*, const LLSD& new_val, const LLSD& old_val)
|
||||||
|
{
|
||||||
|
LLSettingsSky::sAutoAdjustProbeAmbiance = new_val.asReal();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
LLSettingsSky::sAutoAdjustProbeAmbiance = gSavedSettings.getF32("RenderSkyAutoAdjustProbeAmbiance");
|
||||||
|
|
||||||
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).stopListening(LISTENER_NAME);
|
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).stopListening(LISTENER_NAME);
|
||||||
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; });
|
LLEventPumps::instance().obtain(PUMP_EXPERIENCE).listen(LISTENER_NAME, [this](LLSD message) { listenExperiencePump(message); return false; });
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -751,7 +751,8 @@ void LLFloaterChangeItemThumbnail::showTexturePicker(const LLUUID &thumbnail_id)
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
FALSE,
|
FALSE,
|
||||||
NULL);
|
NULL,
|
||||||
|
PICK_TEXTURE);
|
||||||
|
|
||||||
mPickerHandle = floaterp->getHandle();
|
mPickerHandle = floaterp->getHandle();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1724,7 +1724,9 @@ void LLFloaterEditExtDayCycle::showHDRNotification(const LLSettingsDay::ptr_t &p
|
||||||
while (iter != end)
|
while (iter != end)
|
||||||
{
|
{
|
||||||
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
|
LLSettingsSky::ptr_t sky = std::static_pointer_cast<LLSettingsSky>(iter->second);
|
||||||
if (sky && sky->canAutoAdjust())
|
if (sky
|
||||||
|
&& sky->canAutoAdjust()
|
||||||
|
&& sky->getReflectionProbeAmbiance(true) != 0.f)
|
||||||
{
|
{
|
||||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -116,7 +116,7 @@ BOOL LLFloaterEnvironmentAdjust::postBuild()
|
||||||
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
|
getChild<LLTextureCtrl>(FIELD_SKY_CLOUD_MAP)->setAllowNoTexture(TRUE);
|
||||||
|
|
||||||
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
|
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
|
||||||
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(LLUUID(gSavedSettings.getString("DefaultBlankNormalTexture")));
|
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
|
||||||
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); });
|
getChild<LLTextureCtrl>(FIELD_WATER_NORMAL_MAP)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onWaterMapChanged(); });
|
||||||
|
|
||||||
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
|
getChild<LLUICtrl>(FIELD_REFLECTION_PROBE_AMBIANCE)->setCommitCallback([this](LLUICtrl*, const LLSD&) { onReflectionProbeAmbianceChanged(); });
|
||||||
|
|
|
||||||
|
|
@ -186,7 +186,8 @@ void LLFloaterFixedEnvironment::setEditSettingsAndUpdate(const LLSettingsBase::p
|
||||||
// teach user about HDR settings
|
// teach user about HDR settings
|
||||||
if (mSettings
|
if (mSettings
|
||||||
&& mSettings->getSettingsType() == "sky"
|
&& mSettings->getSettingsType() == "sky"
|
||||||
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust())
|
&& ((LLSettingsSky*)mSettings.get())->canAutoAdjust()
|
||||||
|
&& ((LLSettingsSky*)mSettings.get())->getReflectionProbeAmbiance(true) != 0.f)
|
||||||
{
|
{
|
||||||
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
LLNotificationsUtil::add("AutoAdjustHDRSky");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -139,69 +139,18 @@ static bool is_valid_update(const LLSD& data)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
class LLGLTFMaterialOverrideDispatchHandler : public LLDispatchHandler
|
class LLGLTFMaterialOverrideDispatchHandler
|
||||||
{
|
{
|
||||||
LOG_CLASS(LLGLTFMaterialOverrideDispatchHandler);
|
LOG_CLASS(LLGLTFMaterialOverrideDispatchHandler);
|
||||||
public:
|
public:
|
||||||
LLGLTFMaterialOverrideDispatchHandler() = default;
|
LLGLTFMaterialOverrideDispatchHandler() = default;
|
||||||
~LLGLTFMaterialOverrideDispatchHandler() override = default;
|
~LLGLTFMaterialOverrideDispatchHandler() = default;
|
||||||
|
|
||||||
void addCallback(void(*callback)(const LLUUID& object_id, S32 side))
|
void addCallback(void(*callback)(const LLUUID& object_id, S32 side))
|
||||||
{
|
{
|
||||||
mSelectionCallbacks.push_back(callback);
|
mSelectionCallbacks.push_back(callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool operator()(const LLDispatcher* dispatcher, const std::string& key, const LLUUID& invoice, const sparam_t& strings) override
|
|
||||||
{
|
|
||||||
LL_PROFILE_ZONE_SCOPED;
|
|
||||||
// receive override data from simulator via LargeGenericMessage
|
|
||||||
// message should have:
|
|
||||||
// object_id - UUID of LLViewerObject
|
|
||||||
// sides - array of S32 indices of texture entries
|
|
||||||
// gltf_json - array of corresponding Strings of GLTF json for override data
|
|
||||||
|
|
||||||
LLSD message;
|
|
||||||
bool success = true;
|
|
||||||
#if 0 //deprecated
|
|
||||||
for(const std::string& llsdRaw : strings)
|
|
||||||
{
|
|
||||||
std::istringstream llsdData(llsdRaw);
|
|
||||||
if (!LLSDSerialize::deserialize(message, llsdData, llsdRaw.length()))
|
|
||||||
{
|
|
||||||
LL_WARNS() << "LLGLTFMaterialOverrideDispatchHandler: Attempted to read parameter data into LLSD but failed:" << llsdRaw << LL_ENDL;
|
|
||||||
success = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
LLGLTFOverrideCacheEntry object_override;
|
|
||||||
if (!object_override.fromLLSD(message))
|
|
||||||
{
|
|
||||||
// malformed message, nothing we can do to handle it
|
|
||||||
LL_DEBUGS("GLTF") << "Message without id:" << message << LL_ENDL;
|
|
||||||
success = false;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Cache the data
|
|
||||||
{
|
|
||||||
LLViewerRegion * region = LLWorld::instance().getRegionFromHandle(object_override.mRegionHandle);
|
|
||||||
|
|
||||||
if (region)
|
|
||||||
{
|
|
||||||
region->cacheFullUpdateGLTFOverride(object_override);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
LL_WARNS("GLTF") << "could not access region for material overrides message cache, region_handle: " << LL_ENDL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
applyData(object_override);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
return success;
|
|
||||||
}
|
|
||||||
|
|
||||||
void doSelectionCallbacks(const LLUUID& object_id, S32 side)
|
void doSelectionCallbacks(const LLUUID& object_id, S32 side)
|
||||||
{
|
{
|
||||||
for (auto& callback : mSelectionCallbacks)
|
for (auto& callback : mSelectionCallbacks)
|
||||||
|
|
@ -210,112 +159,6 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void applyData(const LLGLTFOverrideCacheEntry &object_override)
|
|
||||||
{
|
|
||||||
// Parse the data
|
|
||||||
|
|
||||||
#if 0 // DEPRECATED
|
|
||||||
LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop");
|
|
||||||
LL::WorkQueue::ptr_t general_queue = LL::WorkQueue::getInstance("General");
|
|
||||||
|
|
||||||
struct ReturnData
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
LLGLTFMaterial mMaterial;
|
|
||||||
S32 mSide;
|
|
||||||
bool mSuccess;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (!object_override.mSides.empty())
|
|
||||||
{
|
|
||||||
// fromJson() is performance heavy offload to a thread.
|
|
||||||
main_queue->postTo(
|
|
||||||
general_queue,
|
|
||||||
[sides=object_override.mSides]() // Work done on general queue
|
|
||||||
{
|
|
||||||
std::vector<ReturnData> results;
|
|
||||||
|
|
||||||
results.reserve(sides.size());
|
|
||||||
// parse json
|
|
||||||
std::unordered_map<S32, LLSD>::const_iterator iter = sides.begin();
|
|
||||||
std::unordered_map<S32, LLSD>::const_iterator end = sides.end();
|
|
||||||
while (iter != end)
|
|
||||||
{
|
|
||||||
ReturnData result;
|
|
||||||
|
|
||||||
result.mMaterial.applyOverrideLLSD(iter->second);
|
|
||||||
|
|
||||||
result.mSuccess = true;
|
|
||||||
result.mSide = iter->first;
|
|
||||||
|
|
||||||
results.push_back(result);
|
|
||||||
iter++;
|
|
||||||
}
|
|
||||||
return results;
|
|
||||||
},
|
|
||||||
[object_id=object_override.mObjectId, this](std::vector<ReturnData> results) // Callback to main thread
|
|
||||||
{
|
|
||||||
LLViewerObject * obj = gObjectList.findObject(object_id);
|
|
||||||
|
|
||||||
if (results.size() > 0 )
|
|
||||||
{
|
|
||||||
std::unordered_set<S32> side_set;
|
|
||||||
|
|
||||||
for (auto const & result : results)
|
|
||||||
{
|
|
||||||
S32 side = result.mSide;
|
|
||||||
if (result.mSuccess)
|
|
||||||
{
|
|
||||||
// copy to heap here because LLTextureEntry is going to take ownership with an LLPointer
|
|
||||||
LLGLTFMaterial * material = new LLGLTFMaterial(result.mMaterial);
|
|
||||||
|
|
||||||
// flag this side to not be nulled out later
|
|
||||||
side_set.insert(side);
|
|
||||||
|
|
||||||
if (obj)
|
|
||||||
{
|
|
||||||
obj->setTEGLTFMaterialOverride(side, material);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// unblock material editor
|
|
||||||
if (obj && obj->getTE(side) && obj->getTE(side)->isSelected())
|
|
||||||
{
|
|
||||||
doSelectionCallbacks(object_id, side);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (obj && side_set.size() != obj->getNumTEs())
|
|
||||||
{ // object exists and at least one texture entry needs to have its override data nulled out
|
|
||||||
for (int i = 0; i < obj->getNumTEs(); ++i)
|
|
||||||
{
|
|
||||||
if (side_set.find(i) == side_set.end())
|
|
||||||
{
|
|
||||||
obj->setTEGLTFMaterialOverride(i, nullptr);
|
|
||||||
if (obj->getTE(i) && obj->getTE(i)->isSelected())
|
|
||||||
{
|
|
||||||
doSelectionCallbacks(object_id, i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (obj)
|
|
||||||
{ // override list was empty or an error occurred, null out all overrides for this object
|
|
||||||
for (int i = 0; i < obj->getNumTEs(); ++i)
|
|
||||||
{
|
|
||||||
obj->setTEGLTFMaterialOverride(i, nullptr);
|
|
||||||
if (obj->getTE(i) && obj->getTE(i)->isSelected())
|
|
||||||
{
|
|
||||||
doSelectionCallbacks(obj->getID(), i);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<void(*)(const LLUUID& object_id, S32 side)> mSelectionCallbacks;
|
std::vector<void(*)(const LLUUID& object_id, S32 side)> mSelectionCallbacks;
|
||||||
|
|
@ -821,12 +664,6 @@ void LLGLTFMaterialList::flushMaterials()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// static
|
|
||||||
void LLGLTFMaterialList::registerCallbacks()
|
|
||||||
{
|
|
||||||
gGenericDispatcher.addHandler("GLTFMaterialOverride", &handle_gltf_override_message);
|
|
||||||
}
|
|
||||||
|
|
||||||
// static
|
// static
|
||||||
void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool) )
|
void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides, void(*done_callback)(bool) )
|
||||||
{
|
{
|
||||||
|
|
@ -864,7 +701,3 @@ void LLGLTFMaterialList::modifyMaterialCoro(std::string cap_url, LLSD overrides,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLGLTFMaterialList::loadCacheOverrides(const LLGLTFOverrideCacheEntry& override)
|
|
||||||
{
|
|
||||||
handle_gltf_override_message.applyData(override);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -52,8 +52,6 @@ public:
|
||||||
|
|
||||||
void flushMaterials();
|
void flushMaterials();
|
||||||
|
|
||||||
static void registerCallbacks();
|
|
||||||
|
|
||||||
// Queue an modification of a material that we want to send to the simulator. Call "flushUpdates" to flush pending updates.
|
// Queue an modification of a material that we want to send to the simulator. Call "flushUpdates" to flush pending updates.
|
||||||
// id - ID of object to modify
|
// id - ID of object to modify
|
||||||
// side - TexureEntry index to modify, or -1 for all sides
|
// side - TexureEntry index to modify, or -1 for all sides
|
||||||
|
|
@ -99,8 +97,6 @@ public:
|
||||||
// any override data that arrived before the object was ready to receive it
|
// any override data that arrived before the object was ready to receive it
|
||||||
void applyQueuedOverrides(LLViewerObject* obj);
|
void applyQueuedOverrides(LLViewerObject* obj);
|
||||||
|
|
||||||
static void loadCacheOverrides(const LLGLTFOverrideCacheEntry& override);
|
|
||||||
|
|
||||||
// Apply an override update with the given data
|
// Apply an override update with the given data
|
||||||
void applyOverrideMessage(LLMessageSystem* msg, const std::string& data);
|
void applyOverrideMessage(LLMessageSystem* msg, const std::string& data);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2571,6 +2571,12 @@ bool LLIsOfAssetType::operator()(LLInventoryCategory* cat, LLInventoryItem* item
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LLAssetIDAndTypeMatches::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
|
||||||
|
{
|
||||||
|
if (!item) return false;
|
||||||
|
return (item->getActualType() == mType && item->getAssetUUID() == mAssetID);
|
||||||
|
}
|
||||||
|
|
||||||
bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
|
bool LLIsValidItemLink::operator()(LLInventoryCategory* cat, LLInventoryItem* item)
|
||||||
{
|
{
|
||||||
LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
|
LLViewerInventoryItem *vitem = dynamic_cast<LLViewerInventoryItem*>(item);
|
||||||
|
|
|
||||||
|
|
@ -278,6 +278,28 @@ protected:
|
||||||
LLAssetType::EType mType;
|
LLAssetType::EType mType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
// Class LLAssetIDAndTypeMatches
|
||||||
|
//
|
||||||
|
// Implementation of a LLInventoryCollectFunctor which returns TRUE if
|
||||||
|
// the item matches both asset type and asset id.
|
||||||
|
// This is needed in case you are looking for a specific type with default id
|
||||||
|
// (since null is default for multiple asset types)
|
||||||
|
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
class LLAssetIDAndTypeMatches: public LLInventoryCollectFunctor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LLAssetIDAndTypeMatches(const LLUUID& asset_id, LLAssetType::EType type): mAssetID(asset_id), mType(type) {}
|
||||||
|
virtual ~LLAssetIDAndTypeMatches() {}
|
||||||
|
bool operator()(LLInventoryCategory* cat,
|
||||||
|
LLInventoryItem* item);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
LLUUID mAssetID;
|
||||||
|
LLAssetType::EType mType;
|
||||||
|
};
|
||||||
|
|
||||||
class LLIsValidItemLink : public LLInventoryCollectFunctor
|
class LLIsValidItemLink : public LLInventoryCollectFunctor
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,7 @@
|
||||||
#include "llnotificationsutil.h"
|
#include "llnotificationsutil.h"
|
||||||
#include "lltexturectrl.h"
|
#include "lltexturectrl.h"
|
||||||
#include "lltrans.h"
|
#include "lltrans.h"
|
||||||
|
#include "llviewercontrol.h"
|
||||||
#include "llviewermenufile.h"
|
#include "llviewermenufile.h"
|
||||||
#include "llviewertexture.h"
|
#include "llviewertexture.h"
|
||||||
#include "llsdutil.h"
|
#include "llsdutil.h"
|
||||||
|
|
@ -448,6 +449,8 @@ BOOL LLMaterialEditor::postBuild()
|
||||||
mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY));
|
mEmissiveTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_EMISIVE_TEX_DIRTY));
|
||||||
mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_NORMAL_TEX_DIRTY));
|
mNormalTextureCtrl->setCommitCallback(boost::bind(&LLMaterialEditor::onCommitTexture, this, _1, _2, MATERIAL_NORMAL_TEX_DIRTY));
|
||||||
|
|
||||||
|
mNormalTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
|
||||||
|
|
||||||
if (mIsOverride)
|
if (mIsOverride)
|
||||||
{
|
{
|
||||||
// Live editing needs a recovery mechanism on cancel
|
// Live editing needs a recovery mechanism on cancel
|
||||||
|
|
@ -1376,10 +1379,23 @@ bool LLMaterialEditor::saveIfNeeded()
|
||||||
LLPermissions local_permissions;
|
LLPermissions local_permissions;
|
||||||
local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
|
local_permissions.init(gAgent.getID(), gAgent.getID(), LLUUID::null, LLUUID::null);
|
||||||
|
|
||||||
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
|
if (mIsOverride)
|
||||||
U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
|
{
|
||||||
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
|
// Shouldn't happen, but just in case it ever changes
|
||||||
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
|
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Materials");
|
||||||
|
U32 group_perm = LLFloaterPerms::getGroupPerms("Materials");
|
||||||
|
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Materials");
|
||||||
|
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// Uploads are supposed to use Upload permissions, not material permissions
|
||||||
|
U32 everyone_perm = LLFloaterPerms::getEveryonePerms("Uploads");
|
||||||
|
U32 group_perm = LLFloaterPerms::getGroupPerms("Uploads");
|
||||||
|
U32 next_owner_perm = LLFloaterPerms::getNextOwnerPerms("Uploads");
|
||||||
|
local_permissions.initMasks(PERM_ALL, PERM_ALL, everyone_perm, group_perm, next_owner_perm);
|
||||||
|
}
|
||||||
|
|
||||||
std::string res_desc = buildMaterialDescription();
|
std::string res_desc = buildMaterialDescription();
|
||||||
createInventoryItem(buffer, mMaterialName, res_desc, local_permissions);
|
createInventoryItem(buffer, mMaterialName, res_desc, local_permissions);
|
||||||
|
|
|
||||||
|
|
@ -1360,7 +1360,7 @@ bool LLMeshRepoThread::fetchMeshSkinInfo(const LLUUID& mesh_id, bool can_retry)
|
||||||
U8* buffer = new(std::nothrow) U8[size];
|
U8* buffer = new(std::nothrow) U8[size];
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
{
|
{
|
||||||
LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
|
LL_WARNS(LOG_MESH) << "Failed to allocate memory for skin info, size: " << size << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LLMeshRepository::sCacheBytesRead += size;
|
LLMeshRepository::sCacheBytesRead += size;
|
||||||
|
|
@ -1473,7 +1473,7 @@ bool LLMeshRepoThread::fetchMeshDecomposition(const LLUUID& mesh_id)
|
||||||
U8* buffer = new(std::nothrow) U8[size];
|
U8* buffer = new(std::nothrow) U8[size];
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
{
|
{
|
||||||
LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
|
LL_WARNS(LOG_MESH) << "Failed to allocate memory for mesh decomposition, size: " << size << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
LLMeshRepository::sCacheBytesRead += size;
|
LLMeshRepository::sCacheBytesRead += size;
|
||||||
|
|
@ -1575,7 +1575,7 @@ bool LLMeshRepoThread::fetchMeshPhysicsShape(const LLUUID& mesh_id)
|
||||||
U8* buffer = new(std::nothrow) U8[size];
|
U8* buffer = new(std::nothrow) U8[size];
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
{
|
{
|
||||||
LL_WARNS_ONCE(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
|
LL_WARNS(LOG_MESH) << "Failed to allocate memory for physics shape, size: " << size << LL_ENDL;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
file.read(buffer, size);
|
file.read(buffer, size);
|
||||||
|
|
@ -1770,7 +1770,7 @@ bool LLMeshRepoThread::fetchMeshLOD(const LLVolumeParams& mesh_params, S32 lod,
|
||||||
U8* buffer = new(std::nothrow) U8[size];
|
U8* buffer = new(std::nothrow) U8[size];
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
{
|
{
|
||||||
LL_WARNS_ONCE(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
|
LL_WARNS(LOG_MESH) << "Can't allocate memory for mesh " << mesh_id << " LOD " << lod << ", size: " << size << LL_ENDL;
|
||||||
// todo: for now it will result in indefinite constant retries, should result in timeout
|
// todo: for now it will result in indefinite constant retries, should result in timeout
|
||||||
// or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
|
// or in retry-count and disabling mesh. (but usually viewer is beyond saving at this point)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
|
|
@ -89,7 +89,7 @@ BOOL LLPanelSettingsWaterMainTab::postBuild()
|
||||||
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
|
getChild<LLUICtrl>(FIELD_WATER_UNDERWATER_MOD)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onFogUnderWaterChanged(); });
|
||||||
|
|
||||||
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
|
mTxtNormalMap->setDefaultImageAssetID(LLSettingsWater::GetDefaultWaterNormalAssetId());
|
||||||
mTxtNormalMap->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
|
mTxtNormalMap->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
|
||||||
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
|
mTxtNormalMap->setCommitCallback([this](LLUICtrl *, const LLSD &) { onNormalMapChanged(); });
|
||||||
|
|
||||||
getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
|
getChild<LLUICtrl>(FIELD_WATER_WAVE2_XY)->setCommitCallback([this](LLUICtrl *, const LLSD &) { onSmallWaveChanged(); });
|
||||||
|
|
|
||||||
|
|
@ -227,6 +227,17 @@ LLRender::eTexIndex LLPanelFace::getTextureDropChannel()
|
||||||
return LLRender::eTexIndex(MATTYPE_DIFFUSE);
|
return LLRender::eTexIndex(MATTYPE_DIFFUSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLGLTFMaterial::TextureInfo LLPanelFace::getPBRDropChannel()
|
||||||
|
{
|
||||||
|
if (mComboMatMedia && mComboMatMedia->getCurrentIndex() == MATMEDIA_PBR)
|
||||||
|
{
|
||||||
|
LLRadioGroup* radio_pbr_type = getChild<LLRadioGroup>("radio_pbr_type");
|
||||||
|
return texture_info_from_pbrtype(radio_pbr_type->getSelectedIndex());
|
||||||
|
}
|
||||||
|
|
||||||
|
return texture_info_from_pbrtype(PBRTYPE_BASE_COLOR);
|
||||||
|
}
|
||||||
|
|
||||||
// Things the UI provides...
|
// Things the UI provides...
|
||||||
//
|
//
|
||||||
LLUUID LLPanelFace::getCurrentNormalMap() { return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); }
|
LLUUID LLPanelFace::getCurrentNormalMap() { return getChild<LLTextureCtrl>("bumpytexture control")->getImageAssetID(); }
|
||||||
|
|
@ -330,13 +341,13 @@ BOOL LLPanelFace::postBuild()
|
||||||
pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
|
pbr_ctrl->setImmediateFilterPermMask(PERM_NONE);
|
||||||
pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
|
pbr_ctrl->setDnDFilterPermMask(PERM_COPY | PERM_TRANSFER);
|
||||||
pbr_ctrl->setBakeTextureEnabled(false);
|
pbr_ctrl->setBakeTextureEnabled(false);
|
||||||
pbr_ctrl->setInventoryPickType(LLTextureCtrl::PICK_MATERIAL);
|
pbr_ctrl->setInventoryPickType(PICK_MATERIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
|
mTextureCtrl = getChild<LLTextureCtrl>("texture control");
|
||||||
if(mTextureCtrl)
|
if(mTextureCtrl)
|
||||||
{
|
{
|
||||||
mTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectTexture" )));
|
mTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_TEXTURE);
|
||||||
mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
|
mTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitTexture, this, _2) );
|
||||||
mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
|
mTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelTexture, this, _2) );
|
||||||
mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
|
mTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectTexture, this, _2) );
|
||||||
|
|
@ -353,7 +364,7 @@ BOOL LLPanelFace::postBuild()
|
||||||
mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
|
mShinyTextureCtrl = getChild<LLTextureCtrl>("shinytexture control");
|
||||||
if(mShinyTextureCtrl)
|
if(mShinyTextureCtrl)
|
||||||
{
|
{
|
||||||
mShinyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectSpecularTexture" )));
|
mShinyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_SPECULAR);
|
||||||
mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
|
mShinyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitSpecularTexture, this, _2) );
|
||||||
mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
|
mShinyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelSpecularTexture, this, _2) );
|
||||||
mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
|
mShinyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectSpecularTexture, this, _2) );
|
||||||
|
|
@ -370,8 +381,8 @@ BOOL LLPanelFace::postBuild()
|
||||||
mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
|
mBumpyTextureCtrl = getChild<LLTextureCtrl>("bumpytexture control");
|
||||||
if(mBumpyTextureCtrl)
|
if(mBumpyTextureCtrl)
|
||||||
{
|
{
|
||||||
mBumpyTextureCtrl->setDefaultImageAssetID(LLUUID( gSavedSettings.getString( "DefaultObjectNormalTexture" )));
|
mBumpyTextureCtrl->setDefaultImageAssetID(DEFAULT_OBJECT_NORMAL);
|
||||||
mBumpyTextureCtrl->setBlankImageAssetID(LLUUID( gSavedSettings.getString( "DefaultBlankNormalTexture" )));
|
mBumpyTextureCtrl->setBlankImageAssetID(BLANK_OBJECT_NORMAL);
|
||||||
mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
|
mBumpyTextureCtrl->setCommitCallback( boost::bind(&LLPanelFace::onCommitNormalTexture, this, _2) );
|
||||||
mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
|
mBumpyTextureCtrl->setOnCancelCallback( boost::bind(&LLPanelFace::onCancelNormalTexture, this, _2) );
|
||||||
mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
|
mBumpyTextureCtrl->setOnSelectCallback( boost::bind(&LLPanelFace::onSelectNormalTexture, this, _2) );
|
||||||
|
|
@ -4413,7 +4424,7 @@ void LLPanelFace::onCopyTexture()
|
||||||
LLUUID id = mat_data["NormMap"].asUUID();
|
LLUUID id = mat_data["NormMap"].asUUID();
|
||||||
if (id.notNull() && !get_can_copy_texture(id))
|
if (id.notNull() && !get_can_copy_texture(id))
|
||||||
{
|
{
|
||||||
mat_data["NormMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
|
mat_data["NormMap"] = DEFAULT_OBJECT_TEXTURE;
|
||||||
mat_data["NormMapNoCopy"] = true;
|
mat_data["NormMapNoCopy"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4423,7 +4434,7 @@ void LLPanelFace::onCopyTexture()
|
||||||
LLUUID id = mat_data["SpecMap"].asUUID();
|
LLUUID id = mat_data["SpecMap"].asUUID();
|
||||||
if (id.notNull() && !get_can_copy_texture(id))
|
if (id.notNull() && !get_can_copy_texture(id))
|
||||||
{
|
{
|
||||||
mat_data["SpecMap"] = LLUUID(gSavedSettings.getString("DefaultObjectTexture"));
|
mat_data["SpecMap"] = DEFAULT_OBJECT_TEXTURE;
|
||||||
mat_data["SpecMapNoCopy"] = true;
|
mat_data["SpecMapNoCopy"] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -4653,7 +4664,8 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
|
||||||
LLToolDragAndDrop::dropTextureAllFaces(objectp,
|
LLToolDragAndDrop::dropTextureAllFaces(objectp,
|
||||||
itemp_res,
|
itemp_res,
|
||||||
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
|
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
|
||||||
LLUUID::null);
|
LLUUID::null,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
else // one face
|
else // one face
|
||||||
{
|
{
|
||||||
|
|
@ -4662,6 +4674,7 @@ void LLPanelFace::onPasteTexture(LLViewerObject* objectp, S32 te)
|
||||||
itemp_res,
|
itemp_res,
|
||||||
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
|
from_library ? LLToolDragAndDrop::SOURCE_LIBRARY : LLToolDragAndDrop::SOURCE_AGENT,
|
||||||
LLUUID::null,
|
LLUUID::null,
|
||||||
|
false,
|
||||||
0);
|
0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5176,8 +5189,9 @@ void LLPanelFace::onPbrSelectionChanged(LLInventoryItem* itemp)
|
||||||
bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material?
|
bool can_modify = itemp->getPermissions().allowOperationBy(PERM_MODIFY, gAgentID); // do we have perm to transfer this material?
|
||||||
bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent?
|
bool is_object_owner = gAgentID == obj_owner_id; // does object for which we are going to apply material belong to the agent?
|
||||||
bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale?
|
bool not_for_sale = !sale_info.isForSale(); // is object for which we are going to apply material not for sale?
|
||||||
|
bool from_library = ALEXANDRIA_LINDEN_ID == itemp->getPermissions().getOwner();
|
||||||
|
|
||||||
if (can_copy && can_transfer && can_modify)
|
if ((can_copy && can_transfer && can_modify) || from_library)
|
||||||
{
|
{
|
||||||
pbr_ctrl->setCanApply(true, true);
|
pbr_ctrl->setCanApply(true, true);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,7 @@ public:
|
||||||
|
|
||||||
LLRender::eTexIndex getTextureChannelToEdit();
|
LLRender::eTexIndex getTextureChannelToEdit();
|
||||||
LLRender::eTexIndex getTextureDropChannel();
|
LLRender::eTexIndex getTextureDropChannel();
|
||||||
|
LLGLTFMaterial::TextureInfo getPBRDropChannel();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void navigateToTitleMedia(const std::string url);
|
void navigateToTitleMedia(const std::string url);
|
||||||
|
|
|
||||||
|
|
@ -1969,7 +1969,8 @@ void LLPanelProfileSecondLife::onShowTexturePicker()
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
FALSE,
|
FALSE,
|
||||||
NULL);
|
NULL,
|
||||||
|
PICK_TEXTURE);
|
||||||
|
|
||||||
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
||||||
|
|
||||||
|
|
@ -2304,7 +2305,8 @@ void LLPanelProfileFirstLife::onChangePhoto()
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
PERM_NONE,
|
PERM_NONE,
|
||||||
FALSE,
|
FALSE,
|
||||||
NULL);
|
NULL,
|
||||||
|
PICK_TEXTURE);
|
||||||
|
|
||||||
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
mFloaterTexturePickerHandle = texture_floaterp->getHandle();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1879,7 +1879,8 @@ bool LLSelectMgr::selectionSetImage(const LLUUID& imageid)
|
||||||
te,
|
te,
|
||||||
mItem,
|
mItem,
|
||||||
LLToolDragAndDrop::SOURCE_AGENT,
|
LLToolDragAndDrop::SOURCE_AGENT,
|
||||||
LLUUID::null);
|
LLUUID::null,
|
||||||
|
false);
|
||||||
}
|
}
|
||||||
else // not an inventory item
|
else // not an inventory item
|
||||||
{
|
{
|
||||||
|
|
@ -1959,26 +1960,30 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (mItem && objectp->isAttachment())
|
|
||||||
{
|
|
||||||
const LLPermissions& perm = mItem->getPermissions();
|
|
||||||
BOOL unrestricted = ((perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED) ? TRUE : FALSE;
|
|
||||||
if (!unrestricted)
|
|
||||||
{
|
|
||||||
// Attachments are in world and in inventory simultaneously,
|
|
||||||
// at the moment server doesn't support such a situation.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
LLUUID asset_id = mMatId;
|
LLUUID asset_id = mMatId;
|
||||||
if (mItem)
|
if (mItem)
|
||||||
{
|
{
|
||||||
// If success, the material may be copied into the object's inventory
|
const LLPermissions& perm = mItem->getPermissions();
|
||||||
BOOL success = LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null);
|
bool from_library = perm.getOwner() == ALEXANDRIA_LINDEN_ID;
|
||||||
if (!success)
|
if (objectp->isAttachment())
|
||||||
|
{
|
||||||
|
bool unrestricted = (perm.getMaskBase() & PERM_ITEM_UNRESTRICTED) == PERM_ITEM_UNRESTRICTED;
|
||||||
|
|
||||||
|
if (!unrestricted && !from_library)
|
||||||
|
{
|
||||||
|
// Attachments are in world and in inventory simultaneously,
|
||||||
|
// at the moment server doesn't support such a situation.
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!from_library
|
||||||
|
// Check if item may be copied into the object's inventory
|
||||||
|
&& !LLToolDragAndDrop::handleDropMaterialProtections(objectp, mItem, LLToolDragAndDrop::SOURCE_AGENT, LLUUID::null))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
asset_id = mItem->getAssetUUID();
|
asset_id = mItem->getAssetUUID();
|
||||||
if (asset_id.isNull())
|
if (asset_id.isNull())
|
||||||
{
|
{
|
||||||
|
|
@ -1994,11 +1999,13 @@ bool LLSelectMgr::selectionSetGLTFMaterial(const LLUUID& mat_id)
|
||||||
};
|
};
|
||||||
|
|
||||||
bool success = true;
|
bool success = true;
|
||||||
if (item &&
|
if (item
|
||||||
(!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
|
&& (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()) ||
|
||||||
!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) ||
|
!item->getPermissions().allowOperationBy(PERM_TRANSFER, gAgent.getID()) ||
|
||||||
!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())
|
!item->getPermissions().allowOperationBy(PERM_MODIFY, gAgent.getID())
|
||||||
))
|
)
|
||||||
|
&& item->getPermissions().getOwner() != ALEXANDRIA_LINDEN_ID
|
||||||
|
)
|
||||||
{
|
{
|
||||||
success = success && getSelection()->applyRestrictedPbrMaterialToTEs(item);
|
success = success && getSelection()->applyRestrictedPbrMaterialToTEs(item);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -739,7 +739,6 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
||||||
static LLCachedControl<F32> auto_adjust_blue_horizon_scale(gSavedSettings, "RenderSkyAutoAdjustBlueHorizonScale", 1.f);
|
static LLCachedControl<F32> auto_adjust_blue_horizon_scale(gSavedSettings, "RenderSkyAutoAdjustBlueHorizonScale", 1.f);
|
||||||
static LLCachedControl<F32> auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f);
|
static LLCachedControl<F32> auto_adjust_blue_density_scale(gSavedSettings, "RenderSkyAutoAdjustBlueDensityScale", 1.f);
|
||||||
static LLCachedControl<F32> auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f);
|
static LLCachedControl<F32> auto_adjust_sun_color_scale(gSavedSettings, "RenderSkyAutoAdjustSunColorScale", 1.f);
|
||||||
static LLCachedControl<F32> auto_adjust_probe_ambiance(gSavedSettings, "RenderSkyAutoAdjustProbeAmbiance", 1.f);
|
|
||||||
static LLCachedControl<F32> sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f);
|
static LLCachedControl<F32> sunlight_scale(gSavedSettings, "RenderSkySunlightScale", 1.5f);
|
||||||
static LLCachedControl<F32> ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f);
|
static LLCachedControl<F32> ambient_scale(gSavedSettings, "RenderSkyAmbientScale", 1.5f);
|
||||||
|
|
||||||
|
|
@ -772,8 +771,7 @@ void LLSettingsVOSky::applySpecial(void *ptarget, bool force)
|
||||||
shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV);
|
shader->uniform3fv(LLShaderMgr::BLUE_DENSITY, blue_density.mV);
|
||||||
shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV);
|
shader->uniform3fv(LLShaderMgr::BLUE_HORIZON, blue_horizon.mV);
|
||||||
|
|
||||||
LLSettingsSky::sAutoAdjustProbeAmbiance = auto_adjust_probe_ambiance;
|
probe_ambiance = sAutoAdjustProbeAmbiance;
|
||||||
probe_ambiance = auto_adjust_probe_ambiance; // NOTE -- must match LLSettingsSky::getReflectionProbeAmbiance value for "auto_adjust" true
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1511,9 +1511,6 @@ bool idle_startup()
|
||||||
gXferManager->registerCallbacks(gMessageSystem);
|
gXferManager->registerCallbacks(gMessageSystem);
|
||||||
display_startup();
|
display_startup();
|
||||||
|
|
||||||
LLGLTFMaterialList::registerCallbacks();
|
|
||||||
display_startup();
|
|
||||||
|
|
||||||
LLStartUp::initNameCache();
|
LLStartUp::initNameCache();
|
||||||
display_startup();
|
display_startup();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -82,9 +82,11 @@
|
||||||
//static
|
//static
|
||||||
bool get_is_predefined_texture(LLUUID asset_id)
|
bool get_is_predefined_texture(LLUUID asset_id)
|
||||||
{
|
{
|
||||||
if (asset_id == LLUUID(gSavedSettings.getString("DefaultObjectTexture"))
|
if (asset_id == DEFAULT_OBJECT_TEXTURE
|
||||||
|| asset_id == LLUUID(gSavedSettings.getString("UIImgWhiteUUID"))
|
|| asset_id == DEFAULT_OBJECT_SPECULAR
|
||||||
|| asset_id == LLUUID(gSavedSettings.getString("UIImgInvisibleUUID"))
|
|| asset_id == DEFAULT_OBJECT_NORMAL
|
||||||
|
|| asset_id == BLANK_OBJECT_NORMAL
|
||||||
|
|| asset_id == IMG_WHITE
|
||||||
|| asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE))
|
|| asset_id == LLUUID(SCULPT_DEFAULT_TEXTURE))
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -151,7 +153,8 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
|
||||||
PermissionMask immediate_filter_perm_mask,
|
PermissionMask immediate_filter_perm_mask,
|
||||||
PermissionMask dnd_filter_perm_mask,
|
PermissionMask dnd_filter_perm_mask,
|
||||||
BOOL can_apply_immediately,
|
BOOL can_apply_immediately,
|
||||||
LLUIImagePtr fallback_image)
|
LLUIImagePtr fallback_image,
|
||||||
|
EPickInventoryType pick_type)
|
||||||
: LLFloater(LLSD()),
|
: LLFloater(LLSD()),
|
||||||
mOwner( owner ),
|
mOwner( owner ),
|
||||||
mImageAssetID( image_asset_id ),
|
mImageAssetID( image_asset_id ),
|
||||||
|
|
@ -181,7 +184,7 @@ LLFloaterTexturePicker::LLFloaterTexturePicker(
|
||||||
mSetImageAssetIDCallback(NULL),
|
mSetImageAssetIDCallback(NULL),
|
||||||
mOnUpdateImageStatsCallback(NULL),
|
mOnUpdateImageStatsCallback(NULL),
|
||||||
mBakeTextureEnabled(FALSE),
|
mBakeTextureEnabled(FALSE),
|
||||||
mInventoryPickType(LLTextureCtrl::PICK_TEXTURE)
|
mInventoryPickType(pick_type)
|
||||||
{
|
{
|
||||||
mCanApplyImmediately = can_apply_immediately;
|
mCanApplyImmediately = can_apply_immediately;
|
||||||
buildFromFile("floater_texture_ctrl.xml");
|
buildFromFile("floater_texture_ctrl.xml");
|
||||||
|
|
@ -225,7 +228,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
|
||||||
|
|
||||||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
|
if (mInventoryPickType == PICK_MATERIAL
|
||||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||||
&& itemp && itemp->getAssetUUID().isNull())
|
&& itemp && itemp->getAssetUUID().isNull())
|
||||||
{
|
{
|
||||||
|
|
@ -266,7 +269,7 @@ void LLFloaterTexturePicker::setImageID(const LLUUID& image_id, bool set_selecti
|
||||||
void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bool set_selection)
|
void LLFloaterTexturePicker::setImageIDFromItem(const LLInventoryItem* itemp, bool set_selection)
|
||||||
{
|
{
|
||||||
LLUUID asset_id = itemp->getAssetUUID();
|
LLUUID asset_id = itemp->getAssetUUID();
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
|
if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
|
||||||
{
|
{
|
||||||
// If an inventory item has a null asset, consider it a valid blank material(gltf)
|
// If an inventory item has a null asset, consider it a valid blank material(gltf)
|
||||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||||
|
|
@ -425,11 +428,11 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(
|
||||||
bool is_material = cargo_type == DAD_MATERIAL;
|
bool is_material = cargo_type == DAD_MATERIAL;
|
||||||
|
|
||||||
bool allow_dnd = false;
|
bool allow_dnd = false;
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
allow_dnd = is_material;
|
allow_dnd = is_material;
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
allow_dnd = is_texture || is_mesh;
|
allow_dnd = is_texture || is_mesh;
|
||||||
}
|
}
|
||||||
|
|
@ -602,9 +605,7 @@ BOOL LLFloaterTexturePicker::postBuild()
|
||||||
// don't put keyboard focus on selected item, because the selection callback
|
// don't put keyboard focus on selected item, because the selection callback
|
||||||
// will assume that this was user input
|
// will assume that this was user input
|
||||||
|
|
||||||
|
if(!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
|
||||||
|
|
||||||
if(!mImageAssetID.isNull())
|
|
||||||
{
|
{
|
||||||
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
|
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
|
||||||
}
|
}
|
||||||
|
|
@ -661,7 +662,7 @@ void LLFloaterTexturePicker::draw()
|
||||||
mGLTFMaterial = NULL;
|
mGLTFMaterial = NULL;
|
||||||
if (mImageAssetID.notNull())
|
if (mImageAssetID.notNull())
|
||||||
{
|
{
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
mGLTFMaterial = (LLFetchedGLTFMaterial*) gGLTFMaterialList.getMaterial(mImageAssetID);
|
mGLTFMaterial = (LLFetchedGLTFMaterial*) gGLTFMaterialList.getMaterial(mImageAssetID);
|
||||||
llassert(mGLTFMaterial == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(gGLTFMaterialList.getMaterial(mImageAssetID)) != nullptr);
|
llassert(mGLTFMaterial == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(gGLTFMaterialList.getMaterial(mImageAssetID)) != nullptr);
|
||||||
|
|
@ -786,27 +787,43 @@ void LLFloaterTexturePicker::draw()
|
||||||
|
|
||||||
const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
|
const LLUUID& LLFloaterTexturePicker::findItemID(const LLUUID& asset_id, BOOL copyable_only, BOOL ignore_library)
|
||||||
{
|
{
|
||||||
LLUUID loockup_id = asset_id;
|
if (asset_id.isNull())
|
||||||
if (loockup_id.isNull())
|
|
||||||
{
|
{
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
// null asset id means, no material or texture assigned
|
||||||
{
|
return LLUUID::null;
|
||||||
loockup_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return LLUUID::null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLUUID loockup_id = asset_id;
|
||||||
|
if (mInventoryPickType == PICK_MATERIAL && loockup_id == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID)
|
||||||
|
{
|
||||||
|
// default asset id means we are looking for an inventory item with a default asset UUID (null)
|
||||||
|
loockup_id = LLUUID::null;
|
||||||
|
}
|
||||||
|
|
||||||
LLViewerInventoryCategory::cat_array_t cats;
|
LLViewerInventoryCategory::cat_array_t cats;
|
||||||
LLViewerInventoryItem::item_array_t items;
|
LLViewerInventoryItem::item_array_t items;
|
||||||
LLAssetIDMatches asset_id_matches(loockup_id);
|
|
||||||
gInventory.collectDescendentsIf(LLUUID::null,
|
if (loockup_id.isNull())
|
||||||
cats,
|
{
|
||||||
items,
|
// looking for a material with a null id, null id is shared by a lot
|
||||||
LLInventoryModel::INCLUDE_TRASH,
|
// of objects as a default value, so have to filter by type as well
|
||||||
asset_id_matches);
|
LLAssetIDAndTypeMatches matches(loockup_id, LLAssetType::AT_MATERIAL);
|
||||||
|
gInventory.collectDescendentsIf(LLUUID::null,
|
||||||
|
cats,
|
||||||
|
items,
|
||||||
|
LLInventoryModel::INCLUDE_TRASH,
|
||||||
|
matches);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
LLAssetIDMatches asset_id_matches(loockup_id);
|
||||||
|
gInventory.collectDescendentsIf(LLUUID::null,
|
||||||
|
cats,
|
||||||
|
items,
|
||||||
|
LLInventoryModel::INCLUDE_TRASH,
|
||||||
|
asset_id_matches);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (items.size())
|
if (items.size())
|
||||||
{
|
{
|
||||||
|
|
@ -871,7 +888,7 @@ void LLFloaterTexturePicker::commitCallback(LLTextureCtrl::ETexturePickOp op)
|
||||||
|
|
||||||
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
LLInventoryItem* itemp = gInventory.getItem(inv_view->getUUID());
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL
|
if (mInventoryPickType == PICK_MATERIAL
|
||||||
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
&& mImageAssetID == LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID
|
||||||
&& itemp && itemp->getAssetUUID().isNull())
|
&& itemp && itemp->getAssetUUID().isNull())
|
||||||
{
|
{
|
||||||
|
|
@ -1064,15 +1081,15 @@ void LLFloaterTexturePicker::onBtnAdd(void* userdata)
|
||||||
{
|
{
|
||||||
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
|
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)userdata;
|
||||||
|
|
||||||
if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||||
{
|
{
|
||||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL_TEXTURE, true);
|
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL_TEXTURE, true);
|
||||||
}
|
}
|
||||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (self->mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_IMAGE, true);
|
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_IMAGE, true);
|
||||||
}
|
}
|
||||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
else if (self->mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL, true);
|
LLFilePickerReplyThread::startPicker(boost::bind(&onPickerCallback, _1, self->getHandle()), LLFilePicker::FFLOAD_MATERIAL, true);
|
||||||
}
|
}
|
||||||
|
|
@ -1351,7 +1368,7 @@ void LLFloaterTexturePicker::changeMode()
|
||||||
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
|
getChild<LLCheckBoxCtrl>("hide_base_mesh_region")->setVisible(FALSE);// index == 2 ? TRUE : FALSE);
|
||||||
|
|
||||||
bool pipette_visible = (index == PICKER_INVENTORY)
|
bool pipette_visible = (index == PICKER_INVENTORY)
|
||||||
&& (mInventoryPickType != LLTextureCtrl::PICK_MATERIAL);
|
&& (mInventoryPickType != PICK_MATERIAL);
|
||||||
mPipetteBtn->setVisible(pipette_visible);
|
mPipetteBtn->setVisible(pipette_visible);
|
||||||
|
|
||||||
if (index == PICKER_BAKE)
|
if (index == PICKER_BAKE)
|
||||||
|
|
@ -1414,16 +1431,16 @@ void LLFloaterTexturePicker::refreshLocalList()
|
||||||
{
|
{
|
||||||
mLocalScrollCtrl->clearRows();
|
mLocalScrollCtrl->clearRows();
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||||
{
|
{
|
||||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
LLLocalBitmapMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
else if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
|
|
@ -1433,18 +1450,18 @@ void LLFloaterTexturePicker::refreshInventoryFilter()
|
||||||
{
|
{
|
||||||
U32 filter_types = 0x0;
|
U32 filter_types = 0x0;
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
if (mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||||
{
|
{
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
filter_types |= 0x1 << LLInventoryType::IT_TEXTURE;
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
filter_types |= 0x1 << LLInventoryType::IT_SNAPSHOT;
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
else if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
filter_types |= 0x1 << LLInventoryType::IT_MATERIAL;
|
||||||
}
|
}
|
||||||
|
|
@ -1479,13 +1496,13 @@ void LLFloaterTexturePicker::setBakeTextureEnabled(BOOL enabled)
|
||||||
onModeSelect(0, this);
|
onModeSelect(0, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryType type)
|
void LLFloaterTexturePicker::setInventoryPickType(EPickInventoryType type)
|
||||||
{
|
{
|
||||||
mInventoryPickType = type;
|
mInventoryPickType = type;
|
||||||
refreshLocalList();
|
refreshLocalList();
|
||||||
refreshInventoryFilter();
|
refreshInventoryFilter();
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
getChild<LLButton>("Pipette")->setVisible(false);
|
getChild<LLButton>("Pipette")->setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
@ -1501,7 +1518,7 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
|
||||||
|
|
||||||
setTitle(pick + mLabel);
|
setTitle(pick + mLabel);
|
||||||
}
|
}
|
||||||
else if(mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
else if(mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
setTitle(getString("pick_material"));
|
setTitle(getString("pick_material"));
|
||||||
}
|
}
|
||||||
|
|
@ -1509,6 +1526,12 @@ void LLFloaterTexturePicker::setInventoryPickType(LLTextureCtrl::EPickInventoryT
|
||||||
{
|
{
|
||||||
setTitle(getString("pick_texture"));
|
setTitle(getString("pick_texture"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// refresh selection
|
||||||
|
if (!mImageAssetID.isNull() || mInventoryPickType == PICK_MATERIAL)
|
||||||
|
{
|
||||||
|
mInventoryPanel->setSelection(findItemID(mImageAssetID, FALSE), TAKE_FOCUS_NO);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLFloaterTexturePicker::setImmediateFilterPermMask(PermissionMask mask)
|
void LLFloaterTexturePicker::setImmediateFilterPermMask(PermissionMask mask)
|
||||||
|
|
@ -1543,16 +1566,16 @@ void LLFloaterTexturePicker::onPickerCallback(const std::vector<std::string>& fi
|
||||||
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)handle.get();
|
LLFloaterTexturePicker* self = (LLFloaterTexturePicker*)handle.get();
|
||||||
self->mLocalScrollCtrl->clearRows();
|
self->mLocalScrollCtrl->clearRows();
|
||||||
|
|
||||||
if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE_MATERIAL)
|
if (self->mInventoryPickType == PICK_TEXTURE_MATERIAL)
|
||||||
{
|
{
|
||||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (self->mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
LLLocalBitmapMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
else if (self->mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
else if (self->mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
LLLocalGLTFMaterialMgr::getInstance()->feedScrollList(self->mLocalScrollCtrl);
|
||||||
}
|
}
|
||||||
|
|
@ -1565,7 +1588,7 @@ void LLFloaterTexturePicker::onTextureSelect( const LLTextureEntry& te )
|
||||||
if (inventory_item_id.notNull())
|
if (inventory_item_id.notNull())
|
||||||
{
|
{
|
||||||
LLToolPipette::getInstance()->setResult(TRUE, "");
|
LLToolPipette::getInstance()->setResult(TRUE, "");
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
// tes have no data about material ids
|
// tes have no data about material ids
|
||||||
// Plus gltf materials are layered with overrides,
|
// Plus gltf materials are layered with overrides,
|
||||||
|
|
@ -1625,8 +1648,7 @@ LLTextureCtrl::LLTextureCtrl(const LLTextureCtrl::Params& p)
|
||||||
|
|
||||||
// Default of defaults is white image for diff tex
|
// Default of defaults is white image for diff tex
|
||||||
//
|
//
|
||||||
LLUUID whiteImage( gSavedSettings.getString( "UIImgWhiteUUID" ) );
|
setBlankImageAssetID(IMG_WHITE);
|
||||||
setBlankImageAssetID( whiteImage );
|
|
||||||
|
|
||||||
setAllowNoTexture(p.allow_no_texture);
|
setAllowNoTexture(p.allow_no_texture);
|
||||||
setCanApplyImmediately(p.can_apply_immediately);
|
setCanApplyImmediately(p.can_apply_immediately);
|
||||||
|
|
@ -1807,7 +1829,8 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
|
||||||
mImmediateFilterPermMask,
|
mImmediateFilterPermMask,
|
||||||
mDnDFilterPermMask,
|
mDnDFilterPermMask,
|
||||||
mCanApplyImmediately,
|
mCanApplyImmediately,
|
||||||
mFallbackImage);
|
mFallbackImage,
|
||||||
|
mInventoryPickType);
|
||||||
mFloaterHandle = floaterp->getHandle();
|
mFloaterHandle = floaterp->getHandle();
|
||||||
|
|
||||||
LLFloaterTexturePicker* texture_floaterp = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
|
LLFloaterTexturePicker* texture_floaterp = dynamic_cast<LLFloaterTexturePicker*>(floaterp);
|
||||||
|
|
@ -1828,7 +1851,6 @@ void LLTextureCtrl::showPicker(BOOL take_focus)
|
||||||
texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
|
texture_floaterp->setSetImageAssetIDCallback(boost::bind(&LLTextureCtrl::setImageAssetID, this, _1));
|
||||||
|
|
||||||
texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
|
texture_floaterp->setBakeTextureEnabled(mBakeTextureEnabled);
|
||||||
texture_floaterp->setInventoryPickType(mInventoryPickType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
LLFloater* root_floater = gFloaterView->getParentFloater(this);
|
||||||
|
|
@ -1891,7 +1913,7 @@ BOOL LLTextureCtrl::handleMouseDown(S32 x, S32 y, MASK mask)
|
||||||
if (!mOpenTexPreview)
|
if (!mOpenTexPreview)
|
||||||
{
|
{
|
||||||
showPicker(FALSE);
|
showPicker(FALSE);
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
//grab materials first...
|
//grab materials first...
|
||||||
LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_MATERIAL));
|
LLInventoryModelBackgroundFetch::instance().start(gInventory.findCategoryUUIDForType(LLFolderType::FT_MATERIAL));
|
||||||
|
|
@ -2089,11 +2111,11 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,
|
||||||
bool is_material = cargo_type == DAD_MATERIAL;
|
bool is_material = cargo_type == DAD_MATERIAL;
|
||||||
|
|
||||||
bool allow_dnd = false;
|
bool allow_dnd = false;
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
allow_dnd = is_material;
|
allow_dnd = is_material;
|
||||||
}
|
}
|
||||||
else if (mInventoryPickType == LLTextureCtrl::PICK_TEXTURE)
|
else if (mInventoryPickType == PICK_TEXTURE)
|
||||||
{
|
{
|
||||||
allow_dnd = is_texture || is_mesh;
|
allow_dnd = is_texture || is_mesh;
|
||||||
}
|
}
|
||||||
|
|
@ -2156,7 +2178,7 @@ void LLTextureCtrl::draw()
|
||||||
|
|
||||||
if (texture.isNull())
|
if (texture.isNull())
|
||||||
{
|
{
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL)
|
if (mInventoryPickType == PICK_MATERIAL)
|
||||||
{
|
{
|
||||||
LLPointer<LLFetchedGLTFMaterial> material = gGLTFMaterialList.getMaterial(mImageAssetID);
|
LLPointer<LLFetchedGLTFMaterial> material = gGLTFMaterialList.getMaterial(mImageAssetID);
|
||||||
if (material)
|
if (material)
|
||||||
|
|
@ -2313,7 +2335,7 @@ BOOL LLTextureCtrl::doDrop(LLInventoryItem* item)
|
||||||
// no callback installed, so just set the image ids and carry on.
|
// no callback installed, so just set the image ids and carry on.
|
||||||
LLUUID asset_id = item->getAssetUUID();
|
LLUUID asset_id = item->getAssetUUID();
|
||||||
|
|
||||||
if (mInventoryPickType == LLTextureCtrl::PICK_MATERIAL && asset_id.isNull())
|
if (mInventoryPickType == PICK_MATERIAL && asset_id.isNull())
|
||||||
{
|
{
|
||||||
// If an inventory material has a null asset, consider it a valid blank material(gltf)
|
// If an inventory material has a null asset, consider it a valid blank material(gltf)
|
||||||
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
asset_id = LLGLTFMaterialList::BLANK_MATERIAL_ASSET_ID;
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,13 @@ enum LLPickerSource
|
||||||
PICKER_UNKNOWN, // on cancel, default ids
|
PICKER_UNKNOWN, // on cancel, default ids
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef enum e_pick_inventory_type
|
||||||
|
{
|
||||||
|
PICK_TEXTURE_MATERIAL = 0,
|
||||||
|
PICK_TEXTURE = 1,
|
||||||
|
PICK_MATERIAL = 2,
|
||||||
|
} EPickInventoryType;
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
// LLTextureCtrl
|
// LLTextureCtrl
|
||||||
|
|
||||||
|
|
@ -87,13 +94,6 @@ public:
|
||||||
TEXTURE_CANCEL
|
TEXTURE_CANCEL
|
||||||
} ETexturePickOp;
|
} ETexturePickOp;
|
||||||
|
|
||||||
typedef enum e_pick_inventory_type
|
|
||||||
{
|
|
||||||
PICK_TEXTURE_MATERIAL = 0,
|
|
||||||
PICK_TEXTURE = 1,
|
|
||||||
PICK_MATERIAL = 2,
|
|
||||||
} EPickInventoryType;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
struct Params : public LLInitParam::Block<Params, LLUICtrl::Params>
|
||||||
{
|
{
|
||||||
|
|
@ -276,7 +276,7 @@ private:
|
||||||
S32 mLabelWidth;
|
S32 mLabelWidth;
|
||||||
bool mOpenTexPreview;
|
bool mOpenTexPreview;
|
||||||
bool mBakeTextureEnabled;
|
bool mBakeTextureEnabled;
|
||||||
LLTextureCtrl::EPickInventoryType mInventoryPickType;
|
EPickInventoryType mInventoryPickType;
|
||||||
};
|
};
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
@ -300,8 +300,8 @@ public:
|
||||||
PermissionMask immediate_filter_perm_mask,
|
PermissionMask immediate_filter_perm_mask,
|
||||||
PermissionMask dnd_filter_perm_mask,
|
PermissionMask dnd_filter_perm_mask,
|
||||||
BOOL can_apply_immediately,
|
BOOL can_apply_immediately,
|
||||||
LLUIImagePtr fallback_image_name
|
LLUIImagePtr fallback_image_name,
|
||||||
);
|
EPickInventoryType pick_type);
|
||||||
|
|
||||||
virtual ~LLFloaterTexturePicker();
|
virtual ~LLFloaterTexturePicker();
|
||||||
|
|
||||||
|
|
@ -369,7 +369,7 @@ public:
|
||||||
void setLocalTextureEnabled(BOOL enabled);
|
void setLocalTextureEnabled(BOOL enabled);
|
||||||
void setBakeTextureEnabled(BOOL enabled);
|
void setBakeTextureEnabled(BOOL enabled);
|
||||||
|
|
||||||
void setInventoryPickType(LLTextureCtrl::EPickInventoryType type);
|
void setInventoryPickType(EPickInventoryType type);
|
||||||
void setImmediateFilterPermMask(PermissionMask mask);
|
void setImmediateFilterPermMask(PermissionMask mask);
|
||||||
|
|
||||||
static void onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle);
|
static void onPickerCallback(const std::vector<std::string>& filenames, LLHandle<LLFloater> handle);
|
||||||
|
|
@ -428,7 +428,7 @@ private:
|
||||||
bool mLimitsSet;
|
bool mLimitsSet;
|
||||||
S32 mMaxDim;
|
S32 mMaxDim;
|
||||||
S32 mMinDim;
|
S32 mMinDim;
|
||||||
LLTextureCtrl::EPickInventoryType mInventoryPickType;
|
EPickInventoryType mInventoryPickType;
|
||||||
|
|
||||||
|
|
||||||
texture_selected_callback mTextureSelectedCallback;
|
texture_selected_callback mTextureSelectedCallback;
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ LLImageRaw * LLTinyGLTFHelper::getTexture(const std::string & folder, const tiny
|
||||||
{
|
{
|
||||||
rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
|
rawImage = new LLImageRaw(&image->image[0], image->width, image->height, image->component);
|
||||||
rawImage->verticalFlip();
|
rawImage->verticalFlip();
|
||||||
|
rawImage->optimizeAwayAlpha();
|
||||||
}
|
}
|
||||||
|
|
||||||
return rawImage;
|
return rawImage;
|
||||||
|
|
|
||||||
|
|
@ -1071,10 +1071,64 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void set_texture_to_material(LLViewerObject* hit_obj,
|
||||||
|
S32 hit_face,
|
||||||
|
const LLUUID& asset_id,
|
||||||
|
LLGLTFMaterial::TextureInfo drop_channel)
|
||||||
|
{
|
||||||
|
LLTextureEntry* te = hit_obj->getTE(hit_face);
|
||||||
|
if (te)
|
||||||
|
{
|
||||||
|
LLPointer<LLGLTFMaterial> material = te->getGLTFMaterialOverride();
|
||||||
|
|
||||||
|
// make a copy to not invalidate existing
|
||||||
|
// material for multiple objects
|
||||||
|
if (material.isNull())
|
||||||
|
{
|
||||||
|
// Start with a material override which does not make any changes
|
||||||
|
material = new LLGLTFMaterial();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
material = new LLGLTFMaterial(*material);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (drop_channel)
|
||||||
|
{
|
||||||
|
case LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR:
|
||||||
|
default:
|
||||||
|
{
|
||||||
|
material->setBaseColorId(asset_id);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LLGLTFMaterial::GLTF_TEXTURE_INFO_METALLIC_ROUGHNESS:
|
||||||
|
{
|
||||||
|
material->setOcclusionRoughnessMetallicId(asset_id);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LLGLTFMaterial::GLTF_TEXTURE_INFO_EMISSIVE:
|
||||||
|
{
|
||||||
|
material->setEmissiveId(asset_id);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case LLGLTFMaterial::GLTF_TEXTURE_INFO_NORMAL:
|
||||||
|
{
|
||||||
|
material->setNormalId(asset_id);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
LLGLTFMaterialList::queueModify(hit_obj, hit_face, material);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
|
void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
LLToolDragAndDrop::ESource source,
|
LLToolDragAndDrop::ESource source,
|
||||||
const LLUUID& src_id)
|
const LLUUID& src_id,
|
||||||
|
bool remove_pbr)
|
||||||
{
|
{
|
||||||
if (!item)
|
if (!item)
|
||||||
{
|
{
|
||||||
|
|
@ -1091,28 +1145,46 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!has_non_pbr_faces)
|
|
||||||
|
if (has_non_pbr_faces || remove_pbr)
|
||||||
{
|
{
|
||||||
return;
|
BOOL res = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
LLUUID asset_id = item->getAssetUUID();
|
LLUUID asset_id = item->getAssetUUID();
|
||||||
BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
|
||||||
if (!success)
|
// Overrides require textures to be copy and transfer free
|
||||||
{
|
LLPermissions item_permissions = item->getPermissions();
|
||||||
return;
|
bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
|
||||||
}
|
allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
|
||||||
|
|
||||||
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
|
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
|
||||||
add(LLStatViewer::EDIT_TEXTURE, 1);
|
add(LLStatViewer::EDIT_TEXTURE, 1);
|
||||||
for( S32 face = 0; face < num_faces; face++ )
|
for( S32 face = 0; face < num_faces; face++ )
|
||||||
{
|
{
|
||||||
if (hit_obj->getRenderMaterialID(face).isNull())
|
if (remove_pbr)
|
||||||
{
|
{
|
||||||
// update viewer side image in anticipation of update from simulator
|
hit_obj->setRenderMaterialID(face, LLUUID::null);
|
||||||
hit_obj->setTEImage(face, image);
|
hit_obj->setTEImage(face, image);
|
||||||
dialog_refresh_all();
|
dialog_refresh_all();
|
||||||
}
|
}
|
||||||
|
else if (hit_obj->getRenderMaterialID(face).isNull())
|
||||||
|
{
|
||||||
|
// update viewer side
|
||||||
|
hit_obj->setTEImage(face, image);
|
||||||
|
dialog_refresh_all();
|
||||||
|
}
|
||||||
|
else if (allow_adding_to_override)
|
||||||
|
{
|
||||||
|
set_texture_to_material(hit_obj, face, asset_id, LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// send the update to the simulator
|
// send the update to the simulator
|
||||||
|
LLGLTFMaterialList::flushUpdates(nullptr);
|
||||||
hit_obj->sendTEUpdate();
|
hit_obj->sendTEUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1260,21 +1332,13 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,
|
||||||
dialog_refresh_all();
|
dialog_refresh_all();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_face, LLInventoryItem* item)
|
|
||||||
{
|
|
||||||
if (hit_face == -1) return;
|
|
||||||
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(item->getAssetUUID());
|
|
||||||
|
|
||||||
avatar->userSetOptionalTE( hit_face, image);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
||||||
S32 hit_face,
|
S32 hit_face,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
ESource source,
|
ESource source,
|
||||||
const LLUUID& src_id,
|
const LLUUID& src_id,
|
||||||
bool all_faces,
|
bool all_faces,
|
||||||
|
bool remove_pbr,
|
||||||
S32 tex_channel)
|
S32 tex_channel)
|
||||||
{
|
{
|
||||||
LLSelectNode* nodep = nullptr;
|
LLSelectNode* nodep = nullptr;
|
||||||
|
|
@ -1286,13 +1350,15 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
||||||
|
|
||||||
if (all_faces)
|
if (all_faces)
|
||||||
{
|
{
|
||||||
dropTextureAllFaces(hit_obj, item, source, src_id);
|
dropTextureAllFaces(hit_obj, item, source, src_id, remove_pbr);
|
||||||
|
|
||||||
// If user dropped a texture onto face it implies
|
// If user dropped a texture onto face it implies
|
||||||
// applying texture now without cancel, save to selection
|
// applying texture now without cancel, save to selection
|
||||||
if (nodep)
|
if (nodep)
|
||||||
{
|
{
|
||||||
uuid_vec_t texture_ids;
|
uuid_vec_t texture_ids;
|
||||||
|
uuid_vec_t material_ids;
|
||||||
|
gltf_materials_vec_t override_materials;
|
||||||
S32 num_faces = hit_obj->getNumTEs();
|
S32 num_faces = hit_obj->getNumTEs();
|
||||||
for (S32 face = 0; face < num_faces; face++)
|
for (S32 face = 0; face < num_faces; face++)
|
||||||
{
|
{
|
||||||
|
|
@ -1305,13 +1371,35 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
||||||
{
|
{
|
||||||
texture_ids.push_back(LLUUID::null);
|
texture_ids.push_back(LLUUID::null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// either removed or modified materials
|
||||||
|
if (remove_pbr)
|
||||||
|
{
|
||||||
|
material_ids.push_back(LLUUID::null);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
material_ids.push_back(hit_obj->getRenderMaterialID(face));
|
||||||
|
}
|
||||||
|
|
||||||
|
LLTextureEntry* te = hit_obj->getTE(hit_face);
|
||||||
|
if (te && !remove_pbr)
|
||||||
|
{
|
||||||
|
override_materials.push_back(te->getGLTFMaterialOverride());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
override_materials.push_back(nullptr);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nodep->saveTextures(texture_ids);
|
nodep->saveTextures(texture_ids);
|
||||||
|
nodep->saveGLTFMaterials(material_ids, override_materials);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
dropTextureOneFace(hit_obj, hit_face, item, source, src_id);
|
dropTextureOneFace(hit_obj, hit_face, item, source, src_id, remove_pbr, tex_channel);
|
||||||
|
|
||||||
// If user dropped a texture onto face it implies
|
// If user dropped a texture onto face it implies
|
||||||
// applying texture now without cancel, save to selection
|
// applying texture now without cancel, save to selection
|
||||||
|
|
@ -1331,6 +1419,16 @@ void LLToolDragAndDrop::dropTexture(LLViewerObject* hit_obj,
|
||||||
{
|
{
|
||||||
nodep->mSavedTextures[hit_face] = LLUUID::null;
|
nodep->mSavedTextures[hit_face] = LLUUID::null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LLTextureEntry* te = hit_obj->getTE(hit_face);
|
||||||
|
if (te && !remove_pbr)
|
||||||
|
{
|
||||||
|
nodep->mSavedGLTFOverrideMaterials[hit_face] = te->getGLTFMaterialOverride();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
nodep->mSavedGLTFOverrideMaterials[hit_face] = nullptr;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1340,6 +1438,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
LLToolDragAndDrop::ESource source,
|
LLToolDragAndDrop::ESource source,
|
||||||
const LLUUID& src_id,
|
const LLUUID& src_id,
|
||||||
|
bool remove_pbr,
|
||||||
S32 tex_channel)
|
S32 tex_channel)
|
||||||
{
|
{
|
||||||
if (hit_face == -1) return;
|
if (hit_face == -1) return;
|
||||||
|
|
@ -1348,21 +1447,44 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
||||||
LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL;
|
LL_WARNS() << "LLToolDragAndDrop::dropTextureOneFace no texture item." << LL_ENDL;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (hit_obj->getRenderMaterialID(hit_face).notNull())
|
|
||||||
|
LLUUID asset_id = item->getAssetUUID();
|
||||||
|
|
||||||
|
if (hit_obj->getRenderMaterialID(hit_face).notNull() && !remove_pbr)
|
||||||
{
|
{
|
||||||
|
// Overrides require textures to be copy and transfer free
|
||||||
|
LLPermissions item_permissions = item->getPermissions();
|
||||||
|
bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
|
||||||
|
allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
|
||||||
|
|
||||||
|
if (allow_adding_to_override)
|
||||||
|
{
|
||||||
|
LLGLTFMaterial::TextureInfo drop_channel = LLGLTFMaterial::GLTF_TEXTURE_INFO_BASE_COLOR;
|
||||||
|
LLPanelFace* panel_face = gFloaterTools->getPanelFace();
|
||||||
|
if (gFloaterTools->getVisible() && panel_face)
|
||||||
|
{
|
||||||
|
drop_channel = panel_face->getPBRDropChannel();
|
||||||
|
}
|
||||||
|
set_texture_to_material(hit_obj, hit_face, asset_id, drop_channel);
|
||||||
|
LLGLTFMaterialList::flushUpdates(nullptr);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LLUUID asset_id = item->getAssetUUID();
|
|
||||||
BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
BOOL success = handleDropMaterialProtections(hit_obj, item, source, src_id);
|
||||||
if (!success)
|
if (!success)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (remove_pbr)
|
||||||
|
{
|
||||||
|
hit_obj->setRenderMaterialID(hit_face, LLUUID::null);
|
||||||
|
}
|
||||||
|
|
||||||
// update viewer side image in anticipation of update from simulator
|
// update viewer side image in anticipation of update from simulator
|
||||||
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
|
LLViewerTexture* image = LLViewerTextureManager::getFetchedTexture(asset_id);
|
||||||
add(LLStatViewer::EDIT_TEXTURE, 1);
|
add(LLStatViewer::EDIT_TEXTURE, 1);
|
||||||
|
|
||||||
LLTextureEntry* tep = hit_obj ? (hit_obj->getTE(hit_face)) : NULL;
|
LLTextureEntry* tep = hit_obj->getTE(hit_face);
|
||||||
|
|
||||||
LLPanelFace* panel_face = gFloaterTools->getPanelFace();
|
LLPanelFace* panel_face = gFloaterTools->getPanelFace();
|
||||||
|
|
||||||
|
|
@ -1380,6 +1502,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
case 1:
|
||||||
|
if (tep)
|
||||||
{
|
{
|
||||||
LLMaterialPtr old_mat = tep->getMaterialParams();
|
LLMaterialPtr old_mat = tep->getMaterialParams();
|
||||||
LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
|
LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
|
||||||
|
|
@ -1391,6 +1514,7 @@ void LLToolDragAndDrop::dropTextureOneFace(LLViewerObject* hit_obj,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
|
if (tep)
|
||||||
{
|
{
|
||||||
LLMaterialPtr old_mat = tep->getMaterialParams();
|
LLMaterialPtr old_mat = tep->getMaterialParams();
|
||||||
LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
|
LLMaterialPtr new_mat = panel_face->createDefaultMaterial(old_mat);
|
||||||
|
|
@ -2200,6 +2324,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
||||||
LLViewerInventoryCategory* cat;
|
LLViewerInventoryCategory* cat;
|
||||||
locateInventory(item, cat);
|
locateInventory(item, cat);
|
||||||
if (!item || !item->isFinished()) return ACCEPT_NO;
|
if (!item || !item->isFinished()) return ACCEPT_NO;
|
||||||
|
LLPermissions item_permissions = item->getPermissions();
|
||||||
EAcceptance rv = willObjectAcceptInventory(obj, item);
|
EAcceptance rv = willObjectAcceptInventory(obj, item);
|
||||||
if((mask & MASK_CONTROL))
|
if((mask & MASK_CONTROL))
|
||||||
{
|
{
|
||||||
|
|
@ -2214,12 +2339,12 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
||||||
return ACCEPT_NO_LOCKED;
|
return ACCEPT_NO_LOCKED;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cargo_type == DAD_TEXTURE)
|
if (cargo_type == DAD_TEXTURE && (mask & MASK_ALT) == 0)
|
||||||
{
|
{
|
||||||
|
bool has_non_pbr_faces = false;
|
||||||
if ((mask & MASK_SHIFT))
|
if ((mask & MASK_SHIFT))
|
||||||
{
|
{
|
||||||
S32 num_faces = obj->getNumTEs();
|
S32 num_faces = obj->getNumTEs();
|
||||||
bool has_non_pbr_faces = false;
|
|
||||||
for (S32 face = 0; face < num_faces; face++)
|
for (S32 face = 0; face < num_faces; face++)
|
||||||
{
|
{
|
||||||
if (obj->getRenderMaterialID(face).isNull())
|
if (obj->getRenderMaterialID(face).isNull())
|
||||||
|
|
@ -2228,14 +2353,19 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!has_non_pbr_faces)
|
|
||||||
{
|
|
||||||
return ACCEPT_NO;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if (obj->getRenderMaterialID(face).notNull())
|
else
|
||||||
{
|
{
|
||||||
return ACCEPT_NO;
|
has_non_pbr_faces = obj->getRenderMaterialID(face).isNull();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!has_non_pbr_faces)
|
||||||
|
{
|
||||||
|
// Only pbr faces selected, texture will be added to an override
|
||||||
|
// Overrides require textures to be copy and transfer free
|
||||||
|
bool allow_adding_to_override = item_permissions.allowOperationBy(PERM_COPY, gAgent.getID());
|
||||||
|
allow_adding_to_override &= item_permissions.allowOperationBy(PERM_TRANSFER, gAgent.getID());
|
||||||
|
if (!allow_adding_to_override) return ACCEPT_NO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2244,15 +2374,16 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
||||||
if (cargo_type == DAD_TEXTURE)
|
if (cargo_type == DAD_TEXTURE)
|
||||||
{
|
{
|
||||||
bool all_faces = mask & MASK_SHIFT;
|
bool all_faces = mask & MASK_SHIFT;
|
||||||
if (item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))
|
bool remove_pbr = mask & MASK_ALT;
|
||||||
|
if (item_permissions.allowOperationBy(PERM_COPY, gAgent.getID()))
|
||||||
{
|
{
|
||||||
dropTexture(obj, face, item, mSource, mSourceID, all_faces);
|
dropTexture(obj, face, item, mSource, mSourceID, all_faces, remove_pbr);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
ESource source = mSource;
|
ESource source = mSource;
|
||||||
LLUUID source_id = mSourceID;
|
LLUUID source_id = mSourceID;
|
||||||
LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces](const LLSD& notification, const LLSD& response)
|
LLNotificationsUtil::add("ApplyInventoryToObject", LLSD(), LLSD(), [obj, face, item, source, source_id, all_faces, remove_pbr](const LLSD& notification, const LLSD& response)
|
||||||
{
|
{
|
||||||
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
|
||||||
// if Cancel pressed
|
// if Cancel pressed
|
||||||
|
|
@ -2260,7 +2391,7 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dropTexture(obj, face, item, source, source_id, all_faces);
|
dropTexture(obj, face, item, source, source_id, all_faces, remove_pbr);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -2327,23 +2458,6 @@ EAcceptance LLToolDragAndDrop::dad3dMeshObject(
|
||||||
return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH);
|
return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
EAcceptance LLToolDragAndDrop::dad3dTextureSelf(
|
|
||||||
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
|
|
||||||
{
|
|
||||||
LL_DEBUGS() << "LLToolDragAndDrop::dad3dTextureAvatar()" << LL_ENDL;
|
|
||||||
if(drop)
|
|
||||||
{
|
|
||||||
if( !(mask & MASK_SHIFT) )
|
|
||||||
{
|
|
||||||
dropTextureOneFaceAvatar( (LLVOAvatar*)obj, face, (LLInventoryItem*)mCargoData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return (mask & MASK_SHIFT) ? ACCEPT_NO : ACCEPT_YES_SINGLE;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
EAcceptance LLToolDragAndDrop::dad3dWearItem(
|
EAcceptance LLToolDragAndDrop::dad3dWearItem(
|
||||||
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
|
LLViewerObject* obj, S32 face, MASK mask, BOOL drop)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -249,17 +249,20 @@ public:
|
||||||
ESource source,
|
ESource source,
|
||||||
const LLUUID& src_id,
|
const LLUUID& src_id,
|
||||||
bool all_faces,
|
bool all_faces,
|
||||||
|
bool replace_pbr,
|
||||||
S32 tex_channel = -1);
|
S32 tex_channel = -1);
|
||||||
static void dropTextureOneFace(LLViewerObject* hit_obj,
|
static void dropTextureOneFace(LLViewerObject* hit_obj,
|
||||||
S32 hit_face,
|
S32 hit_face,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
ESource source,
|
ESource source,
|
||||||
const LLUUID& src_id,
|
const LLUUID& src_id,
|
||||||
|
bool remove_pbr,
|
||||||
S32 tex_channel = -1);
|
S32 tex_channel = -1);
|
||||||
static void dropTextureAllFaces(LLViewerObject* hit_obj,
|
static void dropTextureAllFaces(LLViewerObject* hit_obj,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
ESource source,
|
ESource source,
|
||||||
const LLUUID& src_id);
|
const LLUUID& src_id,
|
||||||
|
bool remove_pbr);
|
||||||
static void dropMaterial(LLViewerObject* hit_obj,
|
static void dropMaterial(LLViewerObject* hit_obj,
|
||||||
S32 hit_face,
|
S32 hit_face,
|
||||||
LLInventoryItem* item,
|
LLInventoryItem* item,
|
||||||
|
|
|
||||||
|
|
@ -730,8 +730,8 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot)
|
||||||
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 2")
|
LL_PROFILE_ZONE_NAMED_CATEGORY_DISPLAY("display - 2")
|
||||||
if (gResizeScreenTexture)
|
if (gResizeScreenTexture)
|
||||||
{
|
{
|
||||||
gResizeScreenTexture = FALSE;
|
|
||||||
gPipeline.resizeScreenTexture();
|
gPipeline.resizeScreenTexture();
|
||||||
|
gResizeScreenTexture = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gGL.setColorMask(true, true);
|
gGL.setColorMask(true, true);
|
||||||
|
|
|
||||||
|
|
@ -290,6 +290,7 @@ void handle_disconnect_viewer(void *);
|
||||||
|
|
||||||
void force_error_breakpoint(void *);
|
void force_error_breakpoint(void *);
|
||||||
void force_error_llerror(void *);
|
void force_error_llerror(void *);
|
||||||
|
void force_error_llerror_msg(void*);
|
||||||
void force_error_bad_memory_access(void *);
|
void force_error_bad_memory_access(void *);
|
||||||
void force_error_infinite_loop(void *);
|
void force_error_infinite_loop(void *);
|
||||||
void force_error_software_exception(void *);
|
void force_error_software_exception(void *);
|
||||||
|
|
@ -2426,6 +2427,15 @@ class LLAdvancedForceErrorLlerror : public view_listener_t
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class LLAdvancedForceErrorLlerrorMsg: public view_listener_t
|
||||||
|
{
|
||||||
|
bool handleEvent(const LLSD& userdata)
|
||||||
|
{
|
||||||
|
force_error_llerror_msg(NULL);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
|
class LLAdvancedForceErrorBadMemoryAccess : public view_listener_t
|
||||||
{
|
{
|
||||||
bool handleEvent(const LLSD& userdata)
|
bool handleEvent(const LLSD& userdata)
|
||||||
|
|
@ -8412,6 +8422,11 @@ void force_error_llerror(void *)
|
||||||
LLAppViewer::instance()->forceErrorLLError();
|
LLAppViewer::instance()->forceErrorLLError();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void force_error_llerror_msg(void*)
|
||||||
|
{
|
||||||
|
LLAppViewer::instance()->forceErrorLLErrorMsg();
|
||||||
|
}
|
||||||
|
|
||||||
void force_error_bad_memory_access(void *)
|
void force_error_bad_memory_access(void *)
|
||||||
{
|
{
|
||||||
LLAppViewer::instance()->forceErrorBadMemoryAccess();
|
LLAppViewer::instance()->forceErrorBadMemoryAccess();
|
||||||
|
|
@ -9639,6 +9654,7 @@ void initialize_menus()
|
||||||
// Advanced > Debugging
|
// Advanced > Debugging
|
||||||
view_listener_t::addMenu(new LLAdvancedForceErrorBreakpoint(), "Advanced.ForceErrorBreakpoint");
|
view_listener_t::addMenu(new LLAdvancedForceErrorBreakpoint(), "Advanced.ForceErrorBreakpoint");
|
||||||
view_listener_t::addMenu(new LLAdvancedForceErrorLlerror(), "Advanced.ForceErrorLlerror");
|
view_listener_t::addMenu(new LLAdvancedForceErrorLlerror(), "Advanced.ForceErrorLlerror");
|
||||||
|
view_listener_t::addMenu(new LLAdvancedForceErrorLlerrorMsg(), "Advanced.ForceErrorLlerrorMsg");
|
||||||
view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccess(), "Advanced.ForceErrorBadMemoryAccess");
|
view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccess(), "Advanced.ForceErrorBadMemoryAccess");
|
||||||
view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccessCoro(), "Advanced.ForceErrorBadMemoryAccessCoro");
|
view_listener_t::addMenu(new LLAdvancedForceErrorBadMemoryAccessCoro(), "Advanced.ForceErrorBadMemoryAccessCoro");
|
||||||
view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
|
view_listener_t::addMenu(new LLAdvancedForceErrorInfiniteLoop(), "Advanced.ForceErrorInfiniteLoop");
|
||||||
|
|
|
||||||
|
|
@ -5041,11 +5041,6 @@ void LLViewerObject::updateTEMaterialTextures(U8 te)
|
||||||
LLViewerObject* obj = gObjectList.findObject(id);
|
LLViewerObject* obj = gObjectList.findObject(id);
|
||||||
if (obj)
|
if (obj)
|
||||||
{
|
{
|
||||||
LLViewerRegion* region = obj->getRegion();
|
|
||||||
if(region)
|
|
||||||
{
|
|
||||||
region->loadCacheMiscExtras(obj->getLocalID());
|
|
||||||
}
|
|
||||||
obj->markForUpdate();
|
obj->markForUpdate();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -1879,8 +1879,6 @@ LLViewerObject* LLViewerRegion::addNewObject(LLVOCacheEntry* entry)
|
||||||
addActiveCacheEntry(entry);
|
addActiveCacheEntry(entry);
|
||||||
}
|
}
|
||||||
|
|
||||||
loadCacheMiscExtras(entry->getLocalID());
|
|
||||||
|
|
||||||
return obj;
|
return obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3655,15 +3653,6 @@ std::string LLViewerRegion::getSimHostName()
|
||||||
return std::string("...");
|
return std::string("...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLViewerRegion::loadCacheMiscExtras(U32 local_id)
|
|
||||||
{
|
|
||||||
auto iter = mImpl->mGLTFOverridesLLSD.find(local_id);
|
|
||||||
if (iter != mImpl->mGLTFOverridesLLSD.end())
|
|
||||||
{
|
|
||||||
LLGLTFMaterialList::loadCacheOverrides(iter->second);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
|
void LLViewerRegion::applyCacheMiscExtras(LLViewerObject* obj)
|
||||||
{
|
{
|
||||||
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
|
LL_PROFILE_ZONE_SCOPED_CATEGORY_DISPLAY;
|
||||||
|
|
|
||||||
|
|
@ -435,8 +435,6 @@ private:
|
||||||
bool isNonCacheableObjectCreated(U32 local_id);
|
bool isNonCacheableObjectCreated(U32 local_id);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void loadCacheMiscExtras(U32 local_id);
|
|
||||||
|
|
||||||
void applyCacheMiscExtras(LLViewerObject* obj);
|
void applyCacheMiscExtras(LLViewerObject* obj);
|
||||||
|
|
||||||
struct CompareDistance
|
struct CompareDistance
|
||||||
|
|
|
||||||
|
|
@ -121,8 +121,17 @@ void LLViewerTextureList::doPreloadImages()
|
||||||
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
|
LLTexUnit::sWhiteTexture = LLViewerFetchedTexture::sWhiteImagep->getTexName();
|
||||||
LLUIImageList* image_list = LLUIImageList::getInstance();
|
LLUIImageList* image_list = LLUIImageList::getInstance();
|
||||||
|
|
||||||
// Set the default flat normal map
|
// Set the default flat normal map
|
||||||
LLViewerFetchedTexture::sFlatNormalImagep = LLViewerTextureManager::getFetchedTextureFromFile("flatnormal.tga", FTT_LOCAL_FILE, MIPMAP_NO, LLViewerFetchedTexture::BOOST_BUMP);
|
// BLANK_OBJECT_NORMAL has a version on dataserver, but it has compression artifacts
|
||||||
|
LLViewerFetchedTexture::sFlatNormalImagep =
|
||||||
|
LLViewerTextureManager::getFetchedTextureFromFile("flatnormal.tga",
|
||||||
|
FTT_LOCAL_FILE,
|
||||||
|
MIPMAP_NO,
|
||||||
|
LLViewerFetchedTexture::BOOST_BUMP,
|
||||||
|
LLViewerTexture::FETCHED_TEXTURE,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
BLANK_OBJECT_NORMAL);
|
||||||
|
|
||||||
// PBR: irradiance
|
// PBR: irradiance
|
||||||
LLViewerFetchedTexture::sDefaultIrradiancePBRp = LLViewerTextureManager::getFetchedTextureFromFile("default_irradiance.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
|
LLViewerFetchedTexture::sDefaultIrradiancePBRp = LLViewerTextureManager::getFetchedTextureFromFile("default_irradiance.png", FTT_LOCAL_FILE, MIPMAP_YES, LLViewerFetchedTexture::BOOST_UI);
|
||||||
|
|
|
||||||
|
|
@ -1957,7 +1957,11 @@ LLViewerWindow::LLViewerWindow(const Params& p)
|
||||||
// Initialize OpenGL Renderer
|
// Initialize OpenGL Renderer
|
||||||
LLVertexBuffer::initClass(mWindow);
|
LLVertexBuffer::initClass(mWindow);
|
||||||
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
|
LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ;
|
||||||
gGL.init(true);
|
if (!gGL.init(true))
|
||||||
|
{
|
||||||
|
LLError::LLUserWarningMsg::show(LLTrans::getString("MBVideoDrvErr"));
|
||||||
|
LL_ERRS() << "gGL not initialized" << LL_ENDL;
|
||||||
|
}
|
||||||
|
|
||||||
if (LLFeatureManager::getInstance()->isSafe()
|
if (LLFeatureManager::getInstance()->isSafe()
|
||||||
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
|
|| (gSavedSettings.getS32("LastFeatureVersion") != LLFeatureManager::getInstance()->getVersion())
|
||||||
|
|
|
||||||
|
|
@ -5267,8 +5267,9 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||||
|
|
||||||
//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
|
//drawable->getVObj()->setDebugText(llformat("%d", drawable->isState(LLDrawable::ANIMATED_CHILD)));
|
||||||
|
|
||||||
U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? facep->getTextureEntry()->getBumpmap() : 0;
|
const LLTextureEntry* te = facep->getTextureEntry();
|
||||||
U8 shiny = facep->getTextureEntry()->getShiny();
|
U8 bump = (type == LLRenderPass::PASS_BUMP || type == LLRenderPass::PASS_POST_BUMP) ? te->getBumpmap() : 0;
|
||||||
|
U8 shiny = te->getShiny();
|
||||||
|
|
||||||
LLViewerTexture* tex = facep->getTexture();
|
LLViewerTexture* tex = facep->getTexture();
|
||||||
|
|
||||||
|
|
@ -5278,22 +5279,22 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||||
|
|
||||||
LLUUID mat_id;
|
LLUUID mat_id;
|
||||||
|
|
||||||
auto* gltf_mat = (LLFetchedGLTFMaterial*) facep->getTextureEntry()->getGLTFRenderMaterial();
|
auto* gltf_mat = (LLFetchedGLTFMaterial*)te->getGLTFRenderMaterial();
|
||||||
llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(facep->getTextureEntry()->getGLTFRenderMaterial()) != nullptr);
|
llassert(gltf_mat == nullptr || dynamic_cast<LLFetchedGLTFMaterial*>(te->getGLTFRenderMaterial()) != nullptr);
|
||||||
if (gltf_mat != nullptr)
|
if (gltf_mat != nullptr)
|
||||||
{
|
{
|
||||||
mat_id = gltf_mat->getHash(); // TODO: cache this hash
|
mat_id = gltf_mat->getHash(); // TODO: cache this hash
|
||||||
if (!facep->hasMedia())
|
if (!facep->hasMedia() || (tex && tex->getType() != LLViewerTexture::MEDIA_TEXTURE))
|
||||||
{ // no media texture, face texture will be unused
|
{ // no media texture, face texture will be unused
|
||||||
tex = nullptr;
|
tex = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mat = facep->getTextureEntry()->getMaterialParams().get();
|
mat = te->getMaterialParams().get();
|
||||||
if (mat)
|
if (mat)
|
||||||
{
|
{
|
||||||
mat_id = facep->getTextureEntry()->getMaterialParams()->getHash();
|
mat_id = te->getMaterialParams()->getHash();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5303,7 +5304,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
||||||
|
|
||||||
if (mat)
|
if (mat)
|
||||||
{
|
{
|
||||||
BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (facep->getTextureEntry()->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
|
BOOL is_alpha = (facep->getPoolType() == LLDrawPool::POOL_ALPHA) || (te->getColor().mV[3] < 0.999f) ? TRUE : FALSE;
|
||||||
if (type == LLRenderPass::PASS_ALPHA)
|
if (type == LLRenderPass::PASS_ALPHA)
|
||||||
{
|
{
|
||||||
shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
|
shader_mask = mat->getShaderMask(LLMaterial::DIFFUSE_ALPHA_MODE_BLEND, is_alpha);
|
||||||
|
|
|
||||||
|
|
@ -8359,7 +8359,7 @@ void LLPipeline::doWaterHaze()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//render water patches like LLDrawPoolWater does
|
//render water patches like LLDrawPoolWater does
|
||||||
LLGLDepthTest depth(GL_FALSE);
|
LLGLDepthTest depth(GL_TRUE, GL_FALSE);
|
||||||
LLGLDisable cull(GL_CULL_FACE);
|
LLGLDisable cull(GL_CULL_FACE);
|
||||||
|
|
||||||
gGLLastMatrix = NULL;
|
gGLLastMatrix = NULL;
|
||||||
|
|
|
||||||
|
|
@ -2716,6 +2716,12 @@ function="World.EnvPreset"
|
||||||
<menu_item_call.on_click
|
<menu_item_call.on_click
|
||||||
function="Advanced.ForceErrorLlerror" />
|
function="Advanced.ForceErrorLlerror" />
|
||||||
</menu_item_call>
|
</menu_item_call>
|
||||||
|
<menu_item_call
|
||||||
|
label="Force LLError, Message And Crash"
|
||||||
|
name="Force LLError And Crash">
|
||||||
|
<menu_item_call.on_click
|
||||||
|
function="Advanced.ForceErrorLlerrorMsg" />
|
||||||
|
</menu_item_call>
|
||||||
<menu_item_call
|
<menu_item_call
|
||||||
label="Force Bad Memory Access"
|
label="Force Bad Memory Access"
|
||||||
name="Force Bad Memory Access">
|
name="Force Bad Memory Access">
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,6 @@ Draw distance: [DRAW_DISTANCE]m
|
||||||
Bandwidth: [NET_BANDWITH]kbit/s
|
Bandwidth: [NET_BANDWITH]kbit/s
|
||||||
LOD factor: [LOD_FACTOR]
|
LOD factor: [LOD_FACTOR]
|
||||||
Render quality: [RENDER_QUALITY]
|
Render quality: [RENDER_QUALITY]
|
||||||
Advanced Lighting Model: [GPU_SHADERS]
|
|
||||||
Texture memory: [TEXTURE_MEMORY]MB
|
Texture memory: [TEXTURE_MEMORY]MB
|
||||||
Disk cache: [DISK_CACHE_INFO]
|
Disk cache: [DISK_CACHE_INFO]
|
||||||
</string>
|
</string>
|
||||||
|
|
@ -3020,8 +3019,19 @@ Running in window.
|
||||||
|
|
||||||
If you continue to receive this message, contact the [SUPPORT_SITE].
|
If you continue to receive this message, contact the [SUPPORT_SITE].
|
||||||
</string>
|
</string>
|
||||||
|
<string name="MBOutOfMemoryTitle">Out Of Memory</string>
|
||||||
|
<string name="MBOutOfMemoryErr">
|
||||||
|
[APP_NAME]'s request for memory failed. Application can't proceed and will be closed.
|
||||||
|
|
||||||
<!-- Avatar Shape Information -->
|
If your computer's RAM is low, quit any heavy applications before runing Second Life, allocate a page file or reduce graphical settings like draw distance.
|
||||||
|
</string>
|
||||||
|
<string name="MBMissingFile">
|
||||||
|
[APP_NAME] couldn't access or find some of the files it needs and will be closed.
|
||||||
|
|
||||||
|
Please reinstall viewer from https://secondlife.com/support/downloads/ and contact https://support.secondlife.com if issue persists after reinstall.
|
||||||
|
</string>
|
||||||
|
|
||||||
|
<!-- Avatar Shape Information -->
|
||||||
<string name="5 O'Clock Shadow">5 O'Clock Shadow</string>
|
<string name="5 O'Clock Shadow">5 O'Clock Shadow</string>
|
||||||
|
|
||||||
<string name="All White">All White</string>
|
<string name="All White">All White</string>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue