summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llfloaterbulkupload.cpp4
-rw-r--r--indra/newview/llfloaterbulkupload.h1
-rw-r--r--indra/newview/llinventoryfunctions.cpp3
-rw-r--r--indra/newview/llmaterialeditor.cpp4
-rw-r--r--indra/newview/llviewerassetupload.cpp21
-rw-r--r--indra/newview/llviewerassetupload.h4
-rw-r--r--indra/newview/llviewermenufile.cpp20
-rw-r--r--indra/newview/llviewermenufile.h5
8 files changed, 35 insertions, 27 deletions
diff --git a/indra/newview/llfloaterbulkupload.cpp b/indra/newview/llfloaterbulkupload.cpp
index b898cb28b6..e3664c61bf 100644
--- a/indra/newview/llfloaterbulkupload.cpp
+++ b/indra/newview/llfloaterbulkupload.cpp
@@ -41,6 +41,8 @@ LLFloaterBulkUpload::LLFloaterBulkUpload(const LLSD& key)
mUploadCost = key["upload_cost"].asInteger();
mUploadCount = key["upload_count"].asInteger();
mHas2kTextures = key["has_2k_textures"].asBoolean();
+ mDest = key["dest"].asUUID();
+
if (key["files"].isArray())
{
const LLSD& files = key["files"];
@@ -125,7 +127,7 @@ void LLFloaterBulkUpload::onUpload2KCheckBox()
void LLFloaterBulkUpload::onClickUpload()
{
- do_bulk_upload(mFiles, mAllow2kTextures);
+ do_bulk_upload(mFiles, mAllow2kTextures, mDest);
closeFloater();
}
diff --git a/indra/newview/llfloaterbulkupload.h b/indra/newview/llfloaterbulkupload.h
index d07dc8eabe..48e07b664f 100644
--- a/indra/newview/llfloaterbulkupload.h
+++ b/indra/newview/llfloaterbulkupload.h
@@ -61,6 +61,7 @@ private:
bool mHas2kTextures = false;
S32 mUploadCost = 0;
S32 mUploadCount = 0;
+ LLUUID mDest = LLUUID::null;
};
#endif
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 3a583c7d99..2be6a91bbf 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -3792,8 +3792,7 @@ void LLInventoryAction::fileUploadLocation(const LLUUID& dest_id, const std::str
}
else if (action == "upload_bulk")
{
- //LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, dest_id), LLFilePicker::FFLOAD_ALL, true);
- LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true), LLFilePicker::FFLOAD_ALL, true); // TODO: merge conflict; fix this
+ LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true, dest_id), LLFilePicker::FFLOAD_ALL, true);
}
}
diff --git a/indra/newview/llmaterialeditor.cpp b/indra/newview/llmaterialeditor.cpp
index 6b337150a1..355fb78ad2 100644
--- a/indra/newview/llmaterialeditor.cpp
+++ b/indra/newview/llmaterialeditor.cpp
@@ -2438,14 +2438,14 @@ void LLMaterialEditor::onSaveObjectsMaterialAsMsgCallback(const LLSD& notificati
}
-void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k);
+void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k, const LLUUID& dest);
void LLMaterialEditor::loadMaterial(const tinygltf::Model &model_in, const std::string &filename, S32 index, bool open_floater)
{
if (index == model_in.materials.size())
{
// bulk upload all the things
- upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true);
+ upload_bulk({ filename }, LLFilePicker::FFLOAD_MATERIAL, true, LLUUID::null);
return;
}
diff --git a/indra/newview/llviewerassetupload.cpp b/indra/newview/llviewerassetupload.cpp
index 7d5386110d..07921e472c 100644
--- a/indra/newview/llviewerassetupload.cpp
+++ b/indra/newview/llviewerassetupload.cpp
@@ -301,16 +301,19 @@ void LLResourceUploadInfo::assignDefaults()
mDescription = "(No Description)";
}
- if (mAssetType == LLAssetType::AT_GLTF ||
- mAssetType == LLAssetType::AT_GLTF_BIN)
+ if (mFolderId.isNull())
{
- mFolderId = LLUUID::null;
- }
- else
- {
- mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
- (mDestinationFolderType == LLFolderType::FT_NONE) ?
- (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ if (mAssetType == LLAssetType::AT_GLTF ||
+ mAssetType == LLAssetType::AT_GLTF_BIN)
+ {
+ mFolderId = LLUUID::null;
+ }
+ else
+ {
+ mFolderId = gInventory.findUserDefinedCategoryUUIDForType(
+ (mDestinationFolderType == LLFolderType::FT_NONE) ?
+ (LLFolderType::EType)mAssetType : mDestinationFolderType);
+ }
}
}
diff --git a/indra/newview/llviewerassetupload.h b/indra/newview/llviewerassetupload.h
index c627e9dbb8..3e168fd879 100644
--- a/indra/newview/llviewerassetupload.h
+++ b/indra/newview/llviewerassetupload.h
@@ -54,7 +54,7 @@ public:
U32 groupPerms,
U32 everyonePerms,
S32 expectedCost,
- const LLUUID &destFolderId = LLUUID::null,
+ const LLUUID& destFolderId = LLUUID::null,
bool showInventory = true);
virtual ~LLResourceUploadInfo()
@@ -157,7 +157,7 @@ public:
U32 groupPerms,
U32 everyonePerms,
S32 expectedCost,
- const LLUUID &destFolderId = LLUUID::null,
+ const LLUUID& destFolderId = LLUUID::null,
bool show_inventory = true);
virtual LLSD prepareUpload();
diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp
index 6c8de6590b..02667a3ff6 100644
--- a/indra/newview/llviewermenufile.cpp
+++ b/indra/newview/llviewermenufile.cpp
@@ -529,7 +529,7 @@ void upload_single_file(
return;
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest)
{
for (std::vector<std::string>::const_iterator in_iter = filenames.begin(); in_iter != filenames.end(); ++in_iter)
{
@@ -576,7 +576,8 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
LLFloaterPerms::getNextOwnerPerms("Uploads"),
LLFloaterPerms::getGroupPerms("Uploads"),
LLFloaterPerms::getEveryonePerms("Uploads"),
- expected_upload_cost);
+ expected_upload_cost,
+ dest);
if (!allow_2k)
{
@@ -601,14 +602,14 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k)
// Todo:
// 1. Decouple bulk upload from material editor
// 2. Take into account possiblity of identical textures
- LLMaterialEditor::uploadMaterialFromModel(filename, model, i);
+ LLMaterialEditor::uploadMaterialFromModel(filename, model, i, dest);
}
}
}
}
}
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response)
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLSD& notification, const LLSD& response, const LLUUID& dest)
{
S32 option = LLNotificationsUtil::getSelectedOption(notification, response);
if (option != 0)
@@ -617,7 +618,7 @@ void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLS
return;
}
- do_bulk_upload(filenames, allow_2k);
+ do_bulk_upload(filenames, allow_2k, dest);
}
bool get_bulk_upload_expected_cost(
@@ -715,7 +716,7 @@ bool get_bulk_upload_expected_cost(
return file_count > 0;
}
-const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k)
+const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool allow_2k, const LLUUID& dest)
{
S32 expected_upload_cost;
S32 expected_upload_count;
@@ -727,6 +728,7 @@ const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool
key["upload_cost"] = expected_upload_cost;
key["upload_count"] = expected_upload_count;
key["has_2k_textures"] = (textures_2k_count > 0);
+ key["dest"] = dest;
LLSD array;
for (const std::string& str : filtered_filenames)
@@ -760,7 +762,7 @@ const void upload_bulk(const std::vector<std::string>& filtered_filenames, bool
}
-void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k)
+void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadFilter type, bool allow_2k, const LLUUID& dest)
{
// TODO:
// Check user balance for entire cost
@@ -782,7 +784,7 @@ void upload_bulk(const std::vector<std::string>& filenames, LLFilePicker::ELoadF
filtered_filenames.push_back(filename);
}
}
- upload_bulk(filtered_filenames, allow_2k);
+ upload_bulk(filtered_filenames, allow_2k, dest);
}
class LLFileUploadImage : public view_listener_t
@@ -851,7 +853,7 @@ class LLFileUploadBulk : public view_listener_t
gAgentCamera.changeCameraToDefault();
}
- LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true), LLFilePicker::FFLOAD_ALL, true);
+ LLFilePickerReplyThread::startPicker(boost::bind(&upload_bulk, _1, _2, true, LLUUID::null), LLFilePicker::FFLOAD_ALL, true);
return true;
}
diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h
index e222c6cfb0..0b0de38c94 100644
--- a/indra/newview/llviewermenufile.h
+++ b/indra/newview/llviewermenufile.h
@@ -72,7 +72,7 @@ bool get_bulk_upload_expected_cost(
S32& bvh_count,
S32& textures_2k_count);
-void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k);
+void do_bulk_upload(std::vector<std::string> filenames, bool allow_2k, const LLUUID& dest);
void close_all_windows();
@@ -84,7 +84,8 @@ void upload_single_file(
void upload_bulk(
const std::vector<std::string>& filenames,
LLFilePicker::ELoadFilter type,
- bool allow_2k);
+ bool allow_2k,
+ const LLUUID& dest);
//consider moving all file pickers below to more suitable place
class LLFilePickerThread : public LLThread