diff options
| author | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-06 02:00:03 +0200 |
|---|---|---|
| committer | Andrey Lihatskiy <alihatskiy@productengine.com> | 2025-03-06 02:00:03 +0200 |
| commit | 359f604a8d92294c782f41a4383ffe6f63753589 (patch) | |
| tree | f2a3d64dc75ae9d8067716bef76e78cd2cf7de4d | |
| parent | 7c5297d7e61704c5d1812e693e2350a64bf9d221 (diff) | |
#3615 WIP: Store correct script compile target in inventory
| -rw-r--r-- | indra/newview/llpreviewscript.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llviewerassetupload.cpp | 6 | ||||
| -rw-r--r-- | indra/newview/llviewerassetupload.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/indra/newview/llpreviewscript.cpp b/indra/newview/llpreviewscript.cpp index 82cb419c17..28988f9564 100644 --- a/indra/newview/llpreviewscript.cpp +++ b/indra/newview/llpreviewscript.cpp @@ -1879,11 +1879,12 @@ void LLPreviewLSL::saveIfNeeded(bool sync /*= true*/) mPendingUploads++; if (!url.empty()) { + std::string compile_target(mScriptEd->mCompileTarget->getValue()); std::string buffer(mScriptEd->mEditor->getText()); LLUUID old_asset_id = inv_item->getAssetUUID().isNull() ? mScriptEd->getAssetID() : inv_item->getAssetUUID(); - LLResourceUploadInfo::ptr_t uploadInfo(std::make_shared<LLScriptAssetUpload>(mItemUUID, buffer, + LLResourceUploadInfo::ptr_t uploadInfo(std::make_shared<LLScriptAssetUpload>(mItemUUID, compile_target, buffer, [old_asset_id](LLUUID itemId, LLUUID, LLUUID, LLSD response) { LLFileSystem::removeFile(old_asset_id, LLAssetType::AT_LSL_TEXT); LLPreviewLSL::finishedLSLUpload(itemId, response); diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp index 1784179237..1e74e32817 100644 --- a/indra/newview/llviewerassetupload.cpp +++ b/indra/newview/llviewerassetupload.cpp @@ -801,10 +801,10 @@ bool LLBufferedAssetUploadInfo::failedUpload(LLSD &result, std::string &reason) //========================================================================= -LLScriptAssetUpload::LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed): +LLScriptAssetUpload::LLScriptAssetUpload(LLUUID itemId, std::string compileTarget, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed) : LLBufferedAssetUploadInfo(itemId, LLAssetType::AT_LSL_TEXT, buffer, finish, failed), mExerienceId(), - mCompileTarget("mono"), + mCompileTarget(compileTarget), mIsRunning(false) { } @@ -825,7 +825,7 @@ LLSD LLScriptAssetUpload::generatePostBody() if (getTaskId().isNull()) { body["item_id"] = getItemId(); - body["target"] = "mono"; + body["target"] = getCompileTarget(); } else { diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h index c3c570efb2..3eaba6461d 100644 --- a/indra/newview/llviewerassetupload.h +++ b/indra/newview/llviewerassetupload.h @@ -251,7 +251,7 @@ private: class LLScriptAssetUpload : public LLBufferedAssetUploadInfo { public: - LLScriptAssetUpload(LLUUID itemId, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed); + LLScriptAssetUpload(LLUUID itemId, std::string compileTarget, std::string buffer, invnUploadFinish_f finish, uploadFailed_f failed); LLScriptAssetUpload(LLUUID taskId, LLUUID itemId, std::string compileTarget, bool isRunning, LLUUID exerienceId, std::string buffer, taskUploadFinish_f finish, uploadFailed_f failed); |
