diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2024-08-02 14:33:22 +0300 |
---|---|---|
committer | Andrey Kleshchev <117672381+akleshchev@users.noreply.github.com> | 2024-08-02 15:41:52 +0300 |
commit | a37590b45220cc21f038e715527c35e2b74b5a15 (patch) | |
tree | 91ff6c418d556d89fbc0a8e38b7eb4fd1a71436d /indra/newview/llmeshrepository.cpp | |
parent | db8adab2a32412afaa3cab48fe431aa7c786aae5 (diff) |
viewer#853 Fix upload losing face data.
Multiple faces can share same mMaterial
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 4c5cc37766..349df11f35 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2363,10 +2363,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures) // We want to be able to allow more than 8 materials... // - S32 end = llmin((S32)instance.mMaterial.size(), instance.mModel->getNumVolumeFaces()) ; + S32 end = llmin((S32)data.mBaseModel->mMaterialList.size(), instance.mModel->getNumVolumeFaces()) ; for (S32 face_num = 0; face_num < end; face_num++) { + // multiple faces can reuse the same material LLImportMaterial& material = instance.mMaterial[data.mBaseModel->mMaterialList[face_num]]; LLSD face_entry = LLSD::emptyMap(); |