Merge branch 'master' of https://vcs.firestormviewer.org/phoenix-firestorm
commit
aa7fa3a3c2
|
|
@ -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
|
||||
|
|
@ -27,21 +27,29 @@ 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: 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:
|
||||
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 +65,39 @@ 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(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 }}
|
||||
fi
|
||||
echo "platform=${platform}" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- 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'
|
||||
run: echo "AUTOBUILD_VSVER=170" >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Install certificate
|
||||
if: runner.os == 'macOS'
|
||||
env:
|
||||
|
|
@ -115,48 +116,57 @@ 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
|
||||
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 (32 bit)
|
||||
if: runner.os == 'Windows' && matrix.addrsize == 32
|
||||
- name: test macOS bundles are present
|
||||
if: runner.os == 'MacOS'
|
||||
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'
|
||||
dirlisting="$(ls -l ${{ github.workspace }}${path_sep}${pattern})"
|
||||
echo "${dirlisting}"
|
||||
shell: bash
|
||||
|
||||
- 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'
|
||||
path_sep="/"
|
||||
if [[ "${{ runner.os }}" == "Windows" ]]; then
|
||||
path_sep="\\"
|
||||
fi
|
||||
function find_most_recent_bundle() {
|
||||
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
|
||||
}
|
||||
packages=("fmodstudio" "llphysicsextensions_tpv" "kdu")
|
||||
for package in "${packages[@]}"; do
|
||||
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 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
|
||||
|
||||
- name: Configure
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2994,6 +2994,18 @@ void LLInventoryAction::doToSelected(LLInventoryModel* model, LLFolderView* root
|
|||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// <FS:Ansariel> 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;
|
||||
// </FS:Ansariel>
|
||||
|
||||
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();
|
||||
|
||||
}); // <FS:Ansariel> FIRE-32736: Add confirmation before ungrouping folder
|
||||
|
||||
}
|
||||
}
|
||||
// <FS:Ansariel> FIRE-22851: Show texture "Save as" file picker subsequently instead all at once
|
||||
|
|
|
|||
|
|
@ -5740,7 +5740,7 @@ void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep,
|
|||
}
|
||||
}
|
||||
|
||||
if (type == LLRenderPass::PASS_ALPHA)
|
||||
// if (type == LLRenderPass::PASS_ALPHA) // <FS:Beq/> always populate the draw_info ptr
|
||||
{ //for alpha sorting
|
||||
facep->setDrawInfo(draw_info);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -262,7 +262,9 @@
|
|||
|
||||
|
||||
<!-- UI Colors -->
|
||||
|
||||
<color
|
||||
name="TextFgColor"
|
||||
value="0.102 0.102 0.102 1" />
|
||||
<color
|
||||
name="BottomTrayAlphaColor"
|
||||
reference="Transparent" />
|
||||
|
|
|
|||
|
|
@ -5646,4 +5646,8 @@ URL auf Standard zurücksetzen?
|
|||
|
||||
[SOURCES]
|
||||
</notification>
|
||||
<notification label="Ordner-Gruppierung aufheben" name="UngroupFolder">
|
||||
Gruppierung durch den Ordner „[FOLDER_NAME]“ aufheben?
|
||||
<usetemplate name="okcancelbuttons" notext="Abbrechen" yestext="Okay"/>
|
||||
</notification>
|
||||
</notifications>
|
||||
|
|
|
|||
|
|
@ -14049,4 +14049,18 @@ Camera reset might be inhibited by the following objects:
|
|||
[SOURCES]
|
||||
</notification>
|
||||
|
||||
<notification
|
||||
icon="alertmodal.tga"
|
||||
label="Ungroup folder"
|
||||
name="UngroupFolder"
|
||||
type="alertmodal">
|
||||
<unique/>
|
||||
Ungroup the folder "[FOLDER_NAME]"?
|
||||
<tag>confirm</tag>
|
||||
<usetemplate
|
||||
name="okcancelbuttons"
|
||||
notext="Cancel"
|
||||
yestext="Okay"/>
|
||||
</notification>
|
||||
|
||||
</notifications>
|
||||
|
|
|
|||
|
|
@ -1897,7 +1897,7 @@ jusqu'à [MAX_PREMIUM_PLUS]. [https://secondlife.com/my/account/membership.php?
|
|||
</form>
|
||||
</notification>
|
||||
<notification name="KickAllUsers">
|
||||
Éjecter tous les résidents actuellement en ligne avec quel message ?
|
||||
Avec quel message éjecter tous les résidents actuellement en ligne ?
|
||||
<form name="form">
|
||||
<input name="message">
|
||||
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.
|
||||
</notification>
|
||||
<notification name="NoVoice">
|
||||
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.
|
||||
</notification>
|
||||
<notification name="NoBuild">
|
||||
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]
|
||||
</notification>
|
||||
<notification label="Dégrouper le dossier" name="UngroupFolder">
|
||||
Dégrouper le dossier "[FOLDER_NAME]" ?
|
||||
<usetemplate name="okcancelbuttons" notext="Annuler" yestext="Ok"/>
|
||||
</notification>
|
||||
</notifications>
|
||||
|
|
|
|||
|
|
@ -5215,4 +5215,8 @@ Zresetować adres URL do domyślnego?
|
|||
|
||||
[SOURCES]
|
||||
</notification>
|
||||
<notification label="Rozgrupuj folder" name="UngroupFolder">
|
||||
Rozgrupować folder "[FOLDER_NAME]"?
|
||||
<usetemplate name="okcancelbuttons" notext="Anuluj" yestext="Tak" />
|
||||
</notification>
|
||||
</notifications>
|
||||
|
|
|
|||
|
|
@ -5331,4 +5331,8 @@ https://wiki.firestormviewer.org/fs_voice
|
|||
|
||||
[SOURCES]
|
||||
</notification>
|
||||
<notification name="UngroupFolder">
|
||||
Разгруппировать папку "[FOLDER_NAME]"?
|
||||
<usetemplate name="okcancelbuttons" notext="Отмена" yestext="Да"/>
|
||||
</notification>
|
||||
</notifications>
|
||||
|
|
|
|||
|
|
@ -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,39 @@ void LLLocalMeshFile::applyToVObject(LLUUID viewer_object_id, int object_index,
|
|||
|
||||
auto current_lod = static_cast<LLLocalMeshFileLOD>(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;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
void LLLocalMeshFile::pushLog(const std::string& who, const std::string& what, bool is_error)
|
||||
|
|
|
|||
|
|
@ -107,13 +107,14 @@ class LLLocalMeshObject
|
|||
// getters
|
||||
std::vector<std::unique_ptr<LLLocalMeshFace>>& getFaces(LLLocalMeshFileLOD lod) { return mFaces[lod]; };
|
||||
std::pair<LLVector4, LLVector4>& 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<LLMeshSkinInfo> getObjectMeshSkinInfo() { return mMeshSkinInfoPtr; };
|
||||
void setObjectMeshSkinInfo(LLPointer<LLMeshSkinInfo> 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<LLMeshSkinInfo> mMeshSkinInfoPtr{nullptr};
|
||||
LLUUID mSculptID;
|
||||
LLVolumeParams mVolumeParams;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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<LLMeshSkinInfo> 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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,2 +1,3 @@
|
|||
llbase==1.2.11
|
||||
git+https://github.com/Nicky-D/autobuild@main_nd#egg=autobuild
|
||||
git+https://github.com/FirestormViewer/autobuild-3.0#egg=autobuild
|
||||
# git+https://github.com/Nicky-D/autobuild@main_nd#egg=autobuild
|
||||
|
|
@ -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
|
||||
|
||||
if [ $WANTS_BUILD -eq $TRUE ] ; then
|
||||
echo "Building $TARGET_PLATFORM..."
|
||||
if [ $TARGET_PLATFORM == "darwin" ] ; then
|
||||
|
|
@ -627,5 +626,5 @@ if [ $WANTS_BUILD -eq $TRUE ] ; then
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
echo "finished"
|
||||
|
||||
echo "Finished"
|
||||
|
|
|
|||
Loading…
Reference in New Issue