diff options
| author | Rider Linden <rider@lindenlab.com> | 2026-03-18 15:43:26 -0700 |
|---|---|---|
| committer | Rider Linden <rider@lindenlab.com> | 2026-03-18 15:43:26 -0700 |
| commit | 248bab36f76161831c1d84550d85782bc14dfeff (patch) | |
| tree | 9a31cd58e3df15a6e765e179c2e3216dc7e2c082 | |
| parent | 7e7ae1c04ad73c0543729d79e8d24985fec91781 (diff) | |
Issue #5547: When sending the request for a cost estimate for texture upload, include metadata about the texture size.
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 20bda5039d..8a3eabf46e 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2847,8 +2847,20 @@ void LLMeshUploadThread::packModelIntance( texture_index.find(texture) == texture_index.end()) { texture_index[texture] = texture_num; - std::string str = texture_str.str(); - res["texture_list"][texture_num] = LLSD::Binary(str.begin(), str.end()); + if (include_textures) + { + std::string str = texture_str.str(); + res["texture_list"][texture_num] = LLSD::Binary(str.begin(), str.end()); + } + else + { // When not including the whole texture, we need to send some metadata about the image + // to ensure accurate price estimation. If not included, the server will assume all + // textures are 1024 x 1024, which could lead to a low estimate. + LLSD info = LLSD::emptyMap(); + info["width"] = texture->getFullWidth(); + info["height"] = texture->getFullHeight(); + res["texture_info"][texture_num] = info; + } // store indexes for error handling; texture_list_dest.push_back(material.mDiffuseMapFilename); texture_num++; @@ -2881,8 +2893,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, std::vector<std::string>& LLSD res; if (mDestinationFolderId.isNull()) { - result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); - result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); + result["folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_OBJECT); + result["texture_folder_id"] = gInventory.findUserDefinedCategoryUUIDForType(LLFolderType::FT_TEXTURE); } else { |
