From 69a01606c1c2ec3fd8622fb74a25c186ce075ece Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 17 Feb 2023 15:24:31 +0100 Subject: [PATCH 01/10] FIRE-32736: Add confirmation before ungrouping folder --- indra/newview/llinventoryfunctions.cpp | 15 +++++++++++++++ .../skins/default/xui/de/notifications.xml | 4 ++++ .../skins/default/xui/en/notifications.xml | 14 ++++++++++++++ 3 files changed, 33 insertions(+) diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp index 4c0b285193..579279d1d8 100644 --- a/indra/newview/llinventoryfunctions.cpp +++ b/indra/newview/llinventoryfunctions.cpp @@ -2994,6 +2994,18 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root { return; } + + // FIRE-32736: Add confirmation before ungrouping folder + LLSD args; + args["FOLDER_NAME"] = inv_cat->getName(); + LLNotificationsUtil::add("UngroupFolder", args, LLSD(), + [inv_cat](const LLSD& notification, const LLSD& response) + { + S32 opt = LLNotificationsUtil::getSelectedOption(notification, response); + if (opt == 1) + return; + // + const LLUUID &new_cat_uuid = inv_cat->getParentUUID(); LLInventoryModel::cat_array_t* cat_array; LLInventoryModel::item_array_t* item_array; @@ -3019,6 +3031,9 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root } gInventory.removeCategory(inv_cat->getUUID()); gInventory.notifyObservers(); + + }); // FIRE-32736: Add confirmation before ungrouping folder + } } // FIRE-22851: Show texture "Save as" file picker subsequently instead all at once diff --git a/indra/newview/skins/default/xui/de/notifications.xml b/indra/newview/skins/default/xui/de/notifications.xml index 9eb7abb4b9..78d8a0e43c 100644 --- a/indra/newview/skins/default/xui/de/notifications.xml +++ b/indra/newview/skins/default/xui/de/notifications.xml @@ -5600,4 +5600,8 @@ URL auf Standard zurücksetzen? [SOURCES] + + Gruppierung durch den Ordner „[FOLDER_NAME]“ aufheben? + + diff --git a/indra/newview/skins/default/xui/en/notifications.xml b/indra/newview/skins/default/xui/en/notifications.xml index b0085f906a..c839aa4880 100644 --- a/indra/newview/skins/default/xui/en/notifications.xml +++ b/indra/newview/skins/default/xui/en/notifications.xml @@ -13930,4 +13930,18 @@ Camera reset might be inhibited by the following objects: [SOURCES] + + + Ungroup the folder "[FOLDER_NAME]"? + confirm + + + From dc4a2c2b4cb706ef10ca2ef8dde544b785026335 Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Fri, 17 Feb 2023 22:24:47 +0100 Subject: [PATCH 02/10] Updated Polish translation --- indra/newview/skins/default/xui/pl/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/pl/notifications.xml b/indra/newview/skins/default/xui/pl/notifications.xml index 9fdeeb52b5..299ec43fae 100644 --- a/indra/newview/skins/default/xui/pl/notifications.xml +++ b/indra/newview/skins/default/xui/pl/notifications.xml @@ -5215,4 +5215,8 @@ Zresetować adres URL do domyślnego? [SOURCES] + + Rozgrupować folder "[FOLDER_NAME]"? + + From 4286f0b112e281bd1b570cb41b3567aa1ee215e1 Mon Sep 17 00:00:00 2001 From: Beq Date: Sat, 18 Feb 2023 14:29:02 +0000 Subject: [PATCH 03/10] Restore Perf tracking for non-alpha blend Verified that this does not impact the previously associated JIRAs FIRE-31986, FIRE-31979 --- indra/newview/llvovolume.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index ebf8746368..665ec905ce 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -5727,7 +5727,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, } } - if (type == LLRenderPass::PASS_ALPHA) + // if (type == LLRenderPass::PASS_ALPHA) // always populate the draw_info ptr { //for alpha sorting facep->setDrawInfo(draw_info); } From 3e96187edf3fa185b8a18bbd0bfdb723ec05d6f2 Mon Sep 17 00:00:00 2001 From: Beq Date: Mon, 6 Feb 2023 00:23:31 +0000 Subject: [PATCH 04/10] Improve GHA builds - make sure we use the latest bundles provided - rearrange things a little. - make some initial steps towards trying to make things fail when config/build fails. Improve OS/SL config switch always use latest package version (by timestamp) try another method that deals with not found (looking at you linux havok) oops I hate shell bl@*&y scripts fix pattern revert the autobuild version wth this makes no sense fs-variables must be imported after the code --- .github/workflows/build_viewer.yml | 117 ++++++++++++----------------- requirements.txt | 3 +- scripts/configure_firestorm.sh | 8 +- 3 files changed, 57 insertions(+), 71 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 3b45984df8..14061d1e0d 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -27,21 +27,17 @@ jobs: python-version: '3.11' cache: 'pip' - run: pip3 install -r requirements.txt + - name: Check python version run: python -V - - name: Checkout build var - uses: actions/checkout@v3 - with: - repository: FirestormViewer/fs-build-variables - path: build-variables + - name: Setup rclone and download the folder uses: beqjanus/setup-rclone@main with: rclone_config: ${{ secrets.RCLONE_CONFIG }} - - name: Set OS flag - if: matrix.grid == 'os' - run: echo "FS_GRID=-DOPENSIM:BOOL=ON" >> $GITHUB_ENV + - name: Set OS/SL flags + run: echo "FS_GRID=-DOPENSIM:BOOL=$([ "${{ matrix.grid }}" == "os" ] && echo "ON" || echo "OFF") -DHAVOK_TPV:BOOL=$([ "${{ matrix.grid }}" == "sl" ] && echo "ON" || echo "OFF")" >> $GITHUB_ENV shell: bash - name: find channel from Branch name @@ -57,46 +53,38 @@ jobs: echo "FS_RELEASE_CHAN=\"${FS_RELEASE_CHAN}\"" >> $GITHUB_ENV echo "Building for channel ${FS_RELEASE_CHAN}" shell: bash - - # - name: Set channel name - # if: matrix.addrsize == '64' - # run: echo "FS_RELEASE_CHAN=Releasex64" >> $GITHUB_ENV - # shell: bash - - # - name: Set channel name for 32 bit - # if: matrix.addrsize == '32' - # shell: bash - - - name: Set SL flag - if: matrix.grid == 'sl' - run: echo "FS_GRID=-DOPENSIM:BOOL=OFF -DHAVOK_TPV:BOOL=ON" >> $GITHUB_ENV - shell: bash - name: Get the code uses: actions/checkout@v3 with: fetch-depth: 0 - - name: Checkout build var + - name: Checkout build vars (after the main code) uses: actions/checkout@v3 with: repository: FirestormViewer/fs-build-variables path: build-variables - - name: rclone the private 3p packages on Windows - if: runner.os == 'Windows' - run: 'rclone copy fs_bundles: --include "*windows*bz2" .' - - name: rclone the private 3p packages on MacOS - if: runner.os == 'MacOS' - run: 'rclone copy fs_bundles: --include "*darwin*bz2" .' - - name: rclone the private 3p packages on Linux - if: runner.os == 'Linux' - run: 'rclone copy fs_bundles: --include "*linux*bz2" .' + - name: Define platform variable + run: | + declare -A os_map + os_map=( ["Windows"]="windows" ["Linux"]="linux" ["macOS"]="darwin" ) + platform="${os_map[${{ runner.os}}]}" + if [ ${{ matrix.addrsize }} -ne 32 ]; + then + platform+=${{ matrix.addrsize }} + fi + echo "platform=${platform}" >> $GITHUB_ENV + shell: bash + + - name: rclone the private 3p packages for this platform + run: 'rclone copy fs_bundles: --include "*${{ env.platform }}*bz2" .' - name: set VSVER for Windows builds if: runner.os == 'Windows' run: echo "AUTOBUILD_VSVER=170" >> $GITHUB_ENV shell: bash + - name: Install certificate if: runner.os == 'macOS' env: @@ -115,48 +103,41 @@ jobs: security import ${build_secrets_checkout}/code-signing-osx/fs-cert.p12 -P "$FS_CERT_PASS" -A -t cert -f pkcs12 -k ~/Library/Keychains/viewer.keychain security set-key-partition-list -S apple-tool:,apple:, -s -k "$FS_KEYCHAIN_PASS" -t private ~/Library/Keychains/viewer.keychain security list-keychain -d user -s ~/Library/Keychains/viewer.keychain + - name: Install required Ubuntu packages if: runner.os == 'Linux' - run: sudo apt-get install python3-setuptools mesa-common-dev libgl1-mesa-dev libxinerama-dev libxrandr-dev libpulse-dev libglu1-mesa-dev - - name: install autobuild - run: pip3 install git+https://github.com/Nicky-D/autobuild@main_nd - - - name: install autobuild - run: pip3 install llbase - - - name: edit installables (64 bit) - if: runner.os == 'Windows' && matrix.addrsize == 64 run: | - autobuild installables edit llphysicsextensions_tpv platform=windows${{matrix.addrsize}} url='file:///\${{ github.workspace }}\llphysicsextensions_tpv-1.0.571939-windows${{matrix.addrsize}}-571939.tar.bz2' - autobuild installables edit fmodstudio platform=windows${{matrix.addrsize}} url='file:///\${{ github.workspace }}\fmodstudio-2.02.09-windows${{matrix.addrsize}}-222890941.tar.bz2' - shell: bash - - - name: edit installables (32 bit) - if: runner.os == 'Windows' && matrix.addrsize == 32 - run: | - autobuild installables edit llphysicsextensions_tpv platform=windows url='file:///\${{ github.workspace }}\llphysicsextensions_tpv-1.0.571939-windows-571939.tar.bz2' - autobuild installables edit fmodstudio platform=windows url='file:///\${{ github.workspace }}\fmodstudio-2.02.09-windows-222890940.tar.bz2' - shell: bash - - - name: edit installables (32/64 agnostic) - if: runner.os == 'Windows' - run: | - autobuild installables edit kdu platform=windows url='file:///\${{ github.workspace }}\kdu-8.2-windows-212351246.tar.bz2' - shell: bash - - - name: edit installables - if: runner.os == 'macOS' - run: | - autobuild installables edit llphysicsextensions_tpv platform=darwin${{matrix.addrsize}} url='file:////${{ github.workspace }}/llphysicsextensions_tpv-1.0.571939-darwin${{matrix.addrsize}}-571939.tar.bz2' - autobuild installables edit kdu platform=darwin url='file:////${{ github.workspace }}/kdu-8.2-darwin-212431232.tar.bz2' - autobuild installables --debug edit fmodstudio platform=darwin${{matrix.addrsize}} url='file:////${{ github.workspace }}/fmodstudio-2.02.09-darwin${{matrix.addrsize}}-5.tar.bz2' - shell: bash + dependencies=("python3-setuptools" "mesa-common-dev" "libgl1-mesa-dev" "libxinerama-dev" "libxrandr-dev" "libpulse-dev" "libglu1-mesa-dev" "libfreetype6-dev" "libfontconfig1") + sudo apt-get update + sudo apt-get install -y "${dependencies[@]}" - name: edit installables - if: runner.os == 'Linux' run: | - autobuild installables edit kdu platform=linux${{matrix.addrsize}} url='file:////${{ github.workspace }}/kdu-8.2-linux${{matrix.addrsize}}_bionic-220911445.tar.bz2' - autobuild installables edit fmodstudio platform=linux${{matrix.addrsize}} url='file:////${{ github.workspace }}/fmodstudio-2.02.09-linux${{matrix.addrsize}}-222891103.tar.bz2' + function find_most_recent_bundle() { + local pattern="$1*${{ env.platform }}*" + local most_recent_file=$(find "${{ github.workspace }}" -name "$pattern" -printf '%T@ %f\n' 2>/dev/null | sort -n | tail -1 | awk '{print $2}') + if [ -z "$most_recent_file" ]; then + echo "" + else + echo "$most_recent_file" + fi + } + if [[ "${{ runner.os }}" == "Windows" ]]; then + path_sep="\\" + else + path_sep="/" + fi + packages=("fmodstudio" "llphysicsextensions_tpv" "kdu") + for package in "${packages[@]}"; do + package_file=$(find_most_recent_bundle $package) + full_package_path="${{ github.workspace }}${path_sep}${package_file}" + if [ -n "$package_file" ]; then + echo "Installing ${package_file}" + autobuild installables edit ${package} platform=${{ env.platform }} url="file:///${full_package_path}" + else + echo "No bundle found for ${package} on ${{ env.platform }}" + fi + done shell: bash - name: Configure diff --git a/requirements.txt b/requirements.txt index 25bcb223a5..9272ca6a2c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ llbase==1.2.11 -git+https://github.com/Nicky-D/autobuild@main_nd#egg=autobuild \ No newline at end of file +git+https://github.com/FirestormViewer/autobuild-3.0#egg=autobuild +# git+https://github.com/Nicky-D/autobuild@main_nd#egg=autobuild \ No newline at end of file diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index a65f0f05c6..88196d906e 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -595,7 +595,7 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then ../indra/tools/vstool/VSTool.exe --solution Firestorm.sln --startup firestorm-bin --workingdir firestorm-bin "..\\..\\indra\\newview" --config $BTYPE fi fi - +status = 0 if [ $WANTS_BUILD -eq $TRUE ] ; then echo "Building $TARGET_PLATFORM..." if [ $TARGET_PLATFORM == "darwin" ] ; then @@ -626,6 +626,10 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then -verbosity:normal -toolsversion:15.0 -p:"VCBuildAdditionalOptions= /incremental" fi fi + if [ $? -ne 0 ]; then + status=1 + fi fi +echo "Finished status=$status" +exit $status -echo "Finished" From 7d5c93ce8bc176b327cb2c5310fb5a4595d22912 Mon Sep 17 00:00:00 2001 From: Beq Date: Tue, 7 Feb 2023 14:24:42 +0000 Subject: [PATCH 05/10] Update GHA to improve handling of new 3p bundles. also Update ubuntu to 20.04 deal with macOS being out of date (not to mention BSD) handle case where some 3ps are generic (32/64) --- .github/workflows/build_viewer.yml | 57 ++++++++++++++++++++++-------- scripts/configure_firestorm.sh | 7 +--- 2 files changed, 44 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_viewer.yml b/.github/workflows/build_viewer.yml index 14061d1e0d..1671216199 100644 --- a/.github/workflows/build_viewer.yml +++ b/.github/workflows/build_viewer.yml @@ -9,11 +9,11 @@ jobs: build_matrix: strategy: matrix: - os: [macos-10.15,ubuntu-18.04,windows-2022] + os: [macos-10.15,ubuntu-20.04,windows-2022] grid: [sl,os] addrsize: [64,32] exclude: - - os: ubuntu-18.04 + - os: ubuntu-20.04 addrsize: 32 - os: macos-10.15 addrsize: 32 @@ -31,6 +31,18 @@ jobs: - name: Check python version run: python -V + - name: Install Bash 4 and GNU sed on Mac + if: runner.os == 'macOS' + run: | + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + brew update + + brew install bash + brew install gnu-sed + + echo "/usr/local/bin" >> $GITHUB_PATH + echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH + - name: Setup rclone and download the folder uses: beqjanus/setup-rclone@main with: @@ -65,11 +77,12 @@ jobs: repository: FirestormViewer/fs-build-variables path: build-variables - - name: Define platform variable + - name: Define platform variable(s) run: | declare -A os_map os_map=( ["Windows"]="windows" ["Linux"]="linux" ["macOS"]="darwin" ) platform="${os_map[${{ runner.os}}]}" + echo "fallback_platform=${platform}" >> $GITHUB_ENV if [ ${{ matrix.addrsize }} -ne 32 ]; then platform+=${{ matrix.addrsize }} @@ -77,8 +90,8 @@ jobs: echo "platform=${platform}" >> $GITHUB_ENV shell: bash - - name: rclone the private 3p packages for this platform - run: 'rclone copy fs_bundles: --include "*${{ env.platform }}*bz2" .' + - name: rclone the private 3p packages for this platform (both 64 & 32) + run: 'rclone copy fs_bundles: --include "*${{ env.fallback_platform }}*bz2" .' - name: set VSVER for Windows builds if: runner.os == 'Windows' @@ -111,31 +124,47 @@ jobs: sudo apt-get update sudo apt-get install -y "${dependencies[@]}" + - name: test macOS bundles are present + if: runner.os == 'MacOS' + run: | + dirlisting="$(ls -l ${{ github.workspace }}${path_sep}${pattern})" + echo "${dirlisting}" + shell: bash + - name: edit installables run: | + path_sep="/" + if [[ "${{ runner.os }}" == "Windows" ]]; then + path_sep="\\" + fi function find_most_recent_bundle() { - local pattern="$1*${{ env.platform }}*" - local most_recent_file=$(find "${{ github.workspace }}" -name "$pattern" -printf '%T@ %f\n' 2>/dev/null | sort -n | tail -1 | awk '{print $2}') + local pattern="$1.*$2.*" + local most_recent_file=$(ls -t "${{ github.workspace }}" | grep "$pattern" | head -1) if [ -z "$most_recent_file" ]; then echo "" else echo "$most_recent_file" fi } - if [[ "${{ runner.os }}" == "Windows" ]]; then - path_sep="\\" - else - path_sep="/" - fi packages=("fmodstudio" "llphysicsextensions_tpv" "kdu") for package in "${packages[@]}"; do - package_file=$(find_most_recent_bundle $package) + package_file=$(find_most_recent_bundle $package ${{ env.platform }}) full_package_path="${{ github.workspace }}${path_sep}${package_file}" if [ -n "$package_file" ]; then echo "Installing ${package_file}" - autobuild installables edit ${package} platform=${{ env.platform }} url="file:///${full_package_path}" + autobuild installables remove ${package} + autobuild installables add ${package} platform=${{ env.platform }} url="file:///${full_package_path}" else echo "No bundle found for ${package} on ${{ env.platform }}" + package_file=$(find_most_recent_bundle $package ${{ env.fallback_platform }}) + full_package_path="${{ github.workspace }}${path_sep}${package_file}" + if [ -n "$package_file" ]; then + echo "Installing ${package_file}" + autobuild installables remove ${package} + autobuild installables add ${package} platform=${{ env.fallback_platform }} url="file:///${full_package_path}" + else + echo "No bundle found for ${package} on ${{ env.fallback_platform }}. Package will not be available for build." + fi fi done shell: bash diff --git a/scripts/configure_firestorm.sh b/scripts/configure_firestorm.sh index 88196d906e..7d59304cb2 100755 --- a/scripts/configure_firestorm.sh +++ b/scripts/configure_firestorm.sh @@ -595,7 +595,6 @@ if [ $WANTS_CONFIG -eq $TRUE ] ; then ../indra/tools/vstool/VSTool.exe --solution Firestorm.sln --startup firestorm-bin --workingdir firestorm-bin "..\\..\\indra\\newview" --config $BTYPE fi fi -status = 0 if [ $WANTS_BUILD -eq $TRUE ] ; then echo "Building $TARGET_PLATFORM..." if [ $TARGET_PLATFORM == "darwin" ] ; then @@ -626,10 +625,6 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then -verbosity:normal -toolsversion:15.0 -p:"VCBuildAdditionalOptions= /incremental" fi fi - if [ $? -ne 0 ]; then - status=1 - fi fi -echo "Finished status=$status" -exit $status +echo "finished" From ea2fa8db13844f41fa6cca3d82f3e44a45f95efc Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Sun, 19 Feb 2023 06:26:24 +0100 Subject: [PATCH 06/10] FIRE-32739 French translation update, by Laurent Bechir --- indra/newview/skins/default/xui/fr/notifications.xml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/indra/newview/skins/default/xui/fr/notifications.xml b/indra/newview/skins/default/xui/fr/notifications.xml index aa081f0967..48a86dbc64 100644 --- a/indra/newview/skins/default/xui/fr/notifications.xml +++ b/indra/newview/skins/default/xui/fr/notifications.xml @@ -1897,7 +1897,7 @@ jusqu'à [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php? - Éjecter tous les résidents actuellement en ligne avec quel message ? + Avec quel message éjecter tous les résidents actuellement en ligne ?
Un administrateur vous a déconnecté. @@ -3047,7 +3047,7 @@ Vous ne pouvez pas voler ici. Les bousculades sont interdites dans cette zone. Vous ne pouvez pas pousser les autres à moins que vous soyez propriétaire de ce terrain. - Le chat vocal est interdit dans cette zone. Vous n'entendrez personne parler. + Les appels vocaux sont interdits dans cette zone. Vous n'entendrez personne parler. La construction est interdite dans cette zone. Vous ne pouvez pas construite ou rezzer d'objets ici. @@ -5415,4 +5415,8 @@ La réinitialisation de la caméra peut être empêchée par les objets suivants [SOURCES] + + Dégrouper le dossier "[FOLDER_NAME]" ? + + From 712031bb2f70d68c1087b224706b7c82ab485745 Mon Sep 17 00:00:00 2001 From: Beq Date: Wed, 8 Feb 2023 22:16:24 +0000 Subject: [PATCH 07/10] changes towards fixing rigged local mesh WiP --- indra/newview/vjlocalmesh.cpp | 53 +++++++++++++++++--------- indra/newview/vjlocalmesh.h | 17 +++++---- indra/newview/vjlocalmeshimportdae.cpp | 40 ++++++++++++------- 3 files changed, 70 insertions(+), 40 deletions(-) diff --git a/indra/newview/vjlocalmesh.cpp b/indra/newview/vjlocalmesh.cpp index 70e87b31b4..8351366077 100644 --- a/indra/newview/vjlocalmesh.cpp +++ b/indra/newview/vjlocalmesh.cpp @@ -113,8 +113,8 @@ void LLLocalMeshObject::computeObjectBoundingBox() // process any additional faces for (size_t face_iter = 1; face_iter < lod3_faces.size(); ++face_iter) { - auto& current_bbox_min = lod3_faces[face_iter]->getFaceBoundingBox().first; - auto& current_bbox_max = lod3_faces[face_iter]->getFaceBoundingBox().second; + const auto& [current_bbox_min, current_bbox_max] = lod3_faces[face_iter]->getFaceBoundingBox(); + for (size_t array_iter = 0; array_iter < 4; ++array_iter) { @@ -130,30 +130,30 @@ void LLLocalMeshObject::computeObjectTransform(const LLMatrix4& scene_transform) // most things here were tactfully stolen from LLModel::normalizeVolumeFaces() // translation of bounding box to origin + // We will use this to centre the object at the origin (hence the -ve 1/2) mObjectTranslation = mObjectBoundingBox.first; mObjectTranslation += mObjectBoundingBox.second; mObjectTranslation *= -0.5f; - // actual bounding box size - mObjectSize = mObjectBoundingBox.second; - mObjectSize -= mObjectBoundingBox.first; + // actual bounding box size (max-min) + mObjectSize = mObjectBoundingBox.second - mObjectBoundingBox.first; - // make sure all axes of mObjectSize are non zero - for (auto& axis_size : mObjectSize.mV) + // make sure all axes of mObjectSize are non zero (don't adjust the 4th dim) + for ( int i=0; i <3; i++ ) { + auto& axis_size = mObjectSize[i]; // set size of 1.0 if < F_APPROXIMATELY_ZERO if (axis_size <= F_APPROXIMATELY_ZERO) { axis_size = 1.0f; } } - // bounding box scale in a 1Mx3 cube - mObjectScale.set(1.f, 1.f, 1.f); + // object scale is the inverse of the object size + mObjectScale.set(1.f, 1.f, 1.f,1.f); for (int vec_iter = 0; vec_iter < 4; ++vec_iter) { - mObjectScale.mV[vec_iter] = mObjectScale.mV[vec_iter] / mObjectSize.mV[vec_iter]; - } - + mObjectScale[vec_iter] /= mObjectSize[vec_iter]; + } } void LLLocalMeshObject::normalizeFaceValues(LLLocalMeshFileLOD lod_iter) @@ -172,15 +172,18 @@ void LLLocalMeshObject::normalizeFaceValues(LLLocalMeshFileLOD lod_iter) // process current lod for (auto& current_face : lod_faces) { - // first transform the bounding boxes + // first transform the bounding boxes ro be centred at 0,0,0 auto& current_submesh_bbox = current_face->getFaceBoundingBox(); current_submesh_bbox.first += mObjectTranslation; current_submesh_bbox.second += mObjectTranslation; + + LL_INFOS("LocalMesh") << "before squish:" << current_submesh_bbox.first << " " << current_submesh_bbox.second << LL_ENDL; for (int vec_iter = 0; vec_iter < 4; ++vec_iter) { current_submesh_bbox.first.mV[vec_iter] *= mObjectScale.mV[vec_iter]; current_submesh_bbox.second.mV[vec_iter] *= mObjectScale.mV[vec_iter]; } + LL_INFOS("LocalMesh") << "after squish:" << current_submesh_bbox.first << " " << current_submesh_bbox.second << LL_ENDL; // then transform the positions auto& current_face_positions = current_face->getPositions(); @@ -309,13 +312,18 @@ void LLLocalMeshObject::attachSkinInfo() auto skinmap_seeker = gMeshRepo.mSkinMap.find(mSculptID); if (skinmap_seeker == gMeshRepo.mSkinMap.end()) { - gMeshRepo.mSkinMap[mSculptID] = &mMeshSkinInfo; + // Not found create it + mMeshSkinInfoPtr->mMeshID = mSculptID; + gMeshRepo.mSkinMap[mSculptID] = mMeshSkinInfoPtr; + LL_INFOS("LocalMesh") << "Skinmap entry for UUID " << mSculptID << " created with " << std::hex << std::showbase << (void *)mMeshSkinInfoPtr << LL_ENDL; } else { - // NOTE: seems necessary, not tested without. - skinmap_seeker->second = &mMeshSkinInfo; + // found but we will update it to ours + LL_INFOS("LocalMesh") << "Skinmap entry for UUID " << mSculptID << " updated from " << std::hex << std::showbase << (void *)skinmap_seeker->second << " to " << (void *)mMeshSkinInfoPtr << LL_ENDL; + skinmap_seeker->second = mMeshSkinInfoPtr; } + } bool LLLocalMeshObject::getIsRiggedObject() const @@ -326,6 +334,7 @@ bool LLLocalMeshObject::getIsRiggedObject() const // main lod isn't empty if (!main_lod_faces.empty()) { + LL_INFOS("LocalMesh") << "Main lod is not empty" << LL_ENDL; auto& skin = main_lod_faces[0]->getSkin(); if (!skin.empty()) { @@ -750,22 +759,30 @@ void LLLocalMeshFile::applyToVObject(LLUUID viewer_object_id, int object_index, auto current_lod = static_cast(lod_reverse_iter); mLoadedObjectList[object_index]->fillVolume(current_lod); + LL_INFOS("LocalMesh") << "Loaded LOD " << current_lod << LL_ENDL; } - + LL_INFOS("LocalMesh") << "Loaded Object " << object_index << LL_ENDL; if (mLoadedObjectList[object_index]->getIsRiggedObject()) { + LL_INFOS("LocalMesh") << "Object " << object_index << " is rigged" << LL_ENDL; mLoadedObjectList[object_index]->attachSkinInfo(); + target_object->notifySkinInfoLoaded(mLoadedObjectList[object_index]->getObjectMeshSkinInfo()); } if ((!target_object->isAttachment()) && use_scale) { + LL_INFOS("LocalMesh") << "Object " << object_index << " is not attachment" << LL_ENDL; auto scale = mLoadedObjectList[object_index]->getObjectSize(); target_object->setScale(LLVector3(scale), false); } // force refresh (selected/edit mode won't let it redraw otherwise) - gPipeline.markRebuild(target_object->mDrawable, LLDrawable::REBUILD_VOLUME, FALSE); + auto& target_drawable = target_object->mDrawable; + target_drawable->getVOVolume()->forceLOD(LLModel::LOD_LOW); + target_drawable->getVOVolume()->forceLOD(LLModel::LOD_HIGH); + gPipeline.markRebuild(target_drawable, LLDrawable::REBUILD_VOLUME, FALSE); // NOTE: this ^^ (or lod change) causes renderer crash on mesh with degenerate primitives. + LL_INFOS("LocalMesh") << "Object " << object_index << " marked for rebuild" << LL_ENDL; } void LLLocalMeshFile::pushLog(const std::string& who, const std::string& what, bool is_error) diff --git a/indra/newview/vjlocalmesh.h b/indra/newview/vjlocalmesh.h index aa4ce2e8ee..28b294b9a1 100644 --- a/indra/newview/vjlocalmesh.h +++ b/indra/newview/vjlocalmesh.h @@ -107,13 +107,14 @@ class LLLocalMeshObject // getters std::vector>& getFaces(LLLocalMeshFileLOD lod) { return mFaces[lod]; }; std::pair& getObjectBoundingBox() { return mObjectBoundingBox; }; - LLVector4 getObjectTranslation() const { return mObjectTranslation; }; - std::string getObjectName() const { return mObjectName; }; - LLVector4 getObjectSize() const { return mObjectSize; }; - LLVector4 getObjectScale() const { return mObjectScale; }; - LLMeshSkinInfo& getObjectMeshSkinInfo() { return mMeshSkinInfo; }; - LLVolumeParams getVolumeParams() const { return mVolumeParams; }; - bool getIsRiggedObject() const; + LLVector4 getObjectTranslation() const { return mObjectTranslation; }; + std::string getObjectName() const { return mObjectName; }; + LLVector4 getObjectSize() const { return mObjectSize; }; + LLVector4 getObjectScale() const { return mObjectScale; }; + LLPointer getObjectMeshSkinInfo() { return mMeshSkinInfoPtr; }; + void setObjectMeshSkinInfo(LLPointer skininfop ) { mMeshSkinInfoPtr = skininfop; }; + LLVolumeParams getVolumeParams() const { return mVolumeParams; }; + bool getIsRiggedObject() const; private: // internal data keeping @@ -125,7 +126,7 @@ class LLLocalMeshObject LLVector4 mObjectScale; // vovolume - LLMeshSkinInfo mMeshSkinInfo; + LLPointer mMeshSkinInfoPtr{nullptr}; LLUUID mSculptID; LLVolumeParams mVolumeParams; }; diff --git a/indra/newview/vjlocalmeshimportdae.cpp b/indra/newview/vjlocalmeshimportdae.cpp index fc0f63034e..8661496df9 100644 --- a/indra/newview/vjlocalmeshimportdae.cpp +++ b/indra/newview/vjlocalmeshimportdae.cpp @@ -485,8 +485,19 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll LLVector4 objct_size = current_object->getObjectSize(); // this is basically the data_out but for skinning data - auto& skininfo = current_object->getObjectMeshSkinInfo(); - + LLPointer skininfop = current_object->getObjectMeshSkinInfo(); + if (skininfop == nullptr) + { + try + { + skininfop = new LLMeshSkinInfo(); + } + catch (const std::bad_alloc& ex) + { + LL_WARNS() << "Failed to allocate skin info with exception: " << ex.what() << LL_ENDL; + return false; + } + } // basically copy-pasted from linden magic LLMatrix4 normalized_transformation; LLMatrix4 mesh_scale; @@ -513,10 +524,10 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll mat4_proxy.mMatrix[matrix_i][matrix_j] = bind_matrix_value[matrix_i + (matrix_j * 4)]; } } - skininfo.mBindShapeMatrix.loadu(mat4_proxy); + skininfop->mBindShapeMatrix.loadu(mat4_proxy); // matrix multiplication order matters, so this is as clean as it gets. LLMatrix4a transform{normalized_transformation}; - matMul(transform, skininfo.mBindShapeMatrix, skininfo.mBindShapeMatrix); + matMul(transform, skininfop->mBindShapeMatrix, skininfop->mBindShapeMatrix); } // setup joint map @@ -611,7 +622,7 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll // jointlist processing // moved this lambda definition out of the loop below. - auto lambda_process_joint_name = [&skininfo, &joint_map](std::string joint_name) + auto lambda_process_joint_name = [&skininfo = *skininfop, &joint_map](std::string joint_name) { // looking for internal joint name, otherwise use provided name? // seems weird, but ok. @@ -695,13 +706,13 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll } } - skininfo.mInvBindMatrix.push_back(LLMatrix4a(current_matrix)); + skininfop->mInvBindMatrix.push_back(LLMatrix4a(current_matrix)); } } } int jointname_number_iter = 0; - for (auto jointname_iterator = skininfo.mJointNames.begin(); jointname_iterator != skininfo.mJointNames.end(); ++jointname_iterator, ++jointname_number_iter) + for (auto jointname_iterator = skininfop->mJointNames.begin(); jointname_iterator != skininfop->mJointNames.end(); ++jointname_iterator, ++jointname_number_iter) { std::string name_lookup = jointname_iterator->mName; if (joint_map.find(name_lookup) == joint_map.end()) @@ -710,25 +721,25 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll continue; } - if (skininfo.mInvBindMatrix.size() <= jointname_number_iter) + if (skininfop->mInvBindMatrix.size() <= jointname_number_iter) { // doesn't seem like a critical fail that should invalidate the entire skin, just break and move on? pushLog("DAE Importer", "WARNING: Requesting out of bounds joint named " + name_lookup); break; } - LLMatrix4 newinverse = LLMatrix4(skininfo.mInvBindMatrix[jointname_number_iter].getF32ptr()); + LLMatrix4 newinverse = LLMatrix4(skininfop->mInvBindMatrix[jointname_number_iter].getF32ptr()); auto joint_translation = joint_transforms[name_lookup].getTranslation(); newinverse.setTranslation(joint_translation); - skininfo.mAlternateBindMatrix.push_back( LLMatrix4a(newinverse) ); + skininfop->mAlternateBindMatrix.push_back( LLMatrix4a(newinverse) ); } - size_t bind_count = skininfo.mAlternateBindMatrix.size(); - if ((bind_count > 0) && (bind_count != skininfo.mJointNames.size())) + size_t bind_count = skininfop->mAlternateBindMatrix.size(); + if ((bind_count > 0) && (bind_count != skininfop->mJointNames.size())) { // different number of binds vs jointnames, i hestiate to fail the entire skinmap over this // because it can just be a case of a few additional joints being ignored, unless i'm missing something? - pushLog("DAE Importer", "WARNING: " + std::to_string(skininfo.mJointNames.size()) + " joints were found, but " + std::to_string(bind_count) + " binds matrices were made."); + pushLog("DAE Importer", "WARNING: " + std::to_string(skininfop->mJointNames.size()) + " joints were found, but " + std::to_string(bind_count) + " binds matrices were made."); } //============================== @@ -964,7 +975,8 @@ bool LLLocalMeshImportDAE::processSkin(daeDatabase* collada_db, daeElement* coll weights.push_back(new_wght); } } - + skininfop->updateHash(); + current_object->setObjectMeshSkinInfo(skininfop); return true; } From 9d3470017904cf3bb1503712ee9919c929c16ae2 Mon Sep 17 00:00:00 2001 From: Beq Date: Fri, 10 Feb 2023 02:55:19 +0000 Subject: [PATCH 08/10] experimental workaround to non-rigged to rigged transition bug --- indra/newview/vjlocalmesh.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/indra/newview/vjlocalmesh.cpp b/indra/newview/vjlocalmesh.cpp index 8351366077..656525e0ab 100644 --- a/indra/newview/vjlocalmesh.cpp +++ b/indra/newview/vjlocalmesh.cpp @@ -778,9 +778,18 @@ void LLLocalMeshFile::applyToVObject(LLUUID viewer_object_id, int object_index, // force refresh (selected/edit mode won't let it redraw otherwise) auto& target_drawable = target_object->mDrawable; - target_drawable->getVOVolume()->forceLOD(LLModel::LOD_LOW); - target_drawable->getVOVolume()->forceLOD(LLModel::LOD_HIGH); - gPipeline.markRebuild(target_drawable, LLDrawable::REBUILD_VOLUME, FALSE); + + if( target_drawable.notNull() ) + { + target_object->markForUpdate(true); + // target_drawable->updateSpatialExtents(); + // target_drawable->movePartition(); + gPipeline.markRebuild(target_drawable, LLDrawable::REBUILD_ALL, true); + if(auto floater_ptr = LLLocalMeshSystem::getInstance()->getFloaterPointer(); floater_ptr != nullptr) + { + floater_ptr->toggleSelectTool(false); + } + } // NOTE: this ^^ (or lod change) causes renderer crash on mesh with degenerate primitives. LL_INFOS("LocalMesh") << "Object " << object_index << " marked for rebuild" << LL_ENDL; } From 72d606751b56034a900b9fdf669a0b4796a3344a Mon Sep 17 00:00:00 2001 From: PanteraPolnocy Date: Wed, 22 Feb 2023 02:45:27 +0100 Subject: [PATCH 09/10] FIRE-32749 Russian translation update, by Romka Swallowtail --- indra/newview/skins/default/xui/ru/notifications.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/skins/default/xui/ru/notifications.xml b/indra/newview/skins/default/xui/ru/notifications.xml index acdbdc4016..580eeb3915 100644 --- a/indra/newview/skins/default/xui/ru/notifications.xml +++ b/indra/newview/skins/default/xui/ru/notifications.xml @@ -5331,4 +5331,8 @@ https://wiki.firestormviewer.org/fs_voice [SOURCES] + + Разгруппировать папку "[FOLDER_NAME]"? + + From 0d72cb7f6e7b641f8df652a280a3a0b27048a9e7 Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 24 Feb 2023 14:48:46 +0100 Subject: [PATCH 10/10] Fix warning about missing color definition for NotecardTextColor --- indra/llui/lluicolortable.cpp | 2 +- indra/newview/skins/default/colors.xml | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/indra/llui/lluicolortable.cpp b/indra/llui/lluicolortable.cpp index 2503d391f0..d44c932b1f 100644 --- a/indra/llui/lluicolortable.cpp +++ b/indra/llui/lluicolortable.cpp @@ -163,7 +163,7 @@ void LLUIColorTable::insertFromParams(const Params& p, string_color_map_t& table iter != visited_refs.end(); ++iter) { - LL_WARNS() << iter->first << " references a non-existent color" << LL_ENDL; + LL_WARNS() << iter->first << " references a non-existent color: " << iter->second->second << LL_ENDL; unresolved_refs.erase(iter->second); } diff --git a/indra/newview/skins/default/colors.xml b/indra/newview/skins/default/colors.xml index 9049f45373..ef0eeab305 100644 --- a/indra/newview/skins/default/colors.xml +++ b/indra/newview/skins/default/colors.xml @@ -262,7 +262,9 @@ - +