summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerassetupload.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-07-20 18:50:14 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2022-07-20 18:50:14 +0300
commit206d8a0e3124caee7778c9a1e1d44a9aaa4150de (patch)
tree292b6c7558adbe914145a4bd802a0cd9062e9578 /indra/newview/llviewerassetupload.cpp
parent40a1154ec9e5b98bdeec408aa8cce7a10919d602 (diff)
SL-17690 Uploaded material asset references wrong texture UUIDs
Upload textures first, then get ids and upload material on callback
Diffstat (limited to 'indra/newview/llviewerassetupload.cpp')
-rw-r--r--indra/newview/llviewerassetupload.cpp22
1 files changed, 18 insertions, 4 deletions
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index c4211fcb19..8e1ebdf6fa 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -510,11 +510,13 @@ LLNewBufferedResourceUploadInfo::LLNewBufferedResourceUploadInfo(
U32 groupPerms,
U32 everyonePerms,
S32 expectedCost,
- bool show_inventory) :
- LLResourceUploadInfo(name, description, compressionInfo,
+ bool show_inventory,
+ uploadFinish_f finish)
+ : LLResourceUploadInfo(name, description, compressionInfo,
destinationType, inventoryType,
- nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory),
- mBuffer(buffer)
+ nextOWnerPerms, groupPerms, everyonePerms, expectedCost, show_inventory)
+ , mBuffer(buffer)
+ , mFinishFn(finish)
{
setAssetType(assetType);
setAssetId(asset_id);
@@ -543,6 +545,18 @@ LLSD LLNewBufferedResourceUploadInfo::exportTempFile()
return LLSD();
}
+LLUUID LLNewBufferedResourceUploadInfo::finishUpload(LLSD &result)
+{
+ LLUUID newItemId = LLResourceUploadInfo::finishUpload(result);
+
+ if (mFinishFn)
+ {
+ mFinishFn(result["new_asset"].asUUID(), result);
+ }
+
+ return newItemId;
+}
+
//=========================================================================
LLBufferedAssetUploadInfo::LLBufferedAssetUploadInfo(LLUUID itemId, LLAssetType::EType assetType, std::string buffer, invnUploadFinish_f finish) :
LLResourceUploadInfo(std::string(), std::string(), 0, LLFolderType::FT_NONE, LLInventoryType::IT_NONE,