summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmeshrepository.h')
-rw-r--r--indra/newview/llmeshrepository.h29
1 files changed, 19 insertions, 10 deletions
diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h
index 0c3a3559c2..4c3901408f 100644
--- a/indra/newview/llmeshrepository.h
+++ b/indra/newview/llmeshrepository.h
@@ -674,7 +674,22 @@ public:
typedef std::vector<LLModelInstance> instance_list;
instance_list mInstanceList;
- typedef std::map<LLPointer<LLModel>, instance_list> instance_map;
+ // Upload should happen in deterministic order, so sort instances by model name.
+ struct LLUploadModelInstanceLess
+ {
+ inline bool operator()(const LLPointer<LLModel>& a, const LLPointer<LLModel>& b) const
+ {
+ if (a.isNull() || b.isNull())
+ {
+ llassert(false); // We are uploading these models, they shouldn't be null.
+ return true;
+ }
+ // Note: probably can sort by mBaseModel->mSubmodelID here as well to avoid
+ // running over the list twice in wholeModelToLLSD.
+ return a->mLabel < b->mLabel;
+ }
+ };
+ typedef std::map<LLPointer<LLModel>, instance_list, LLUploadModelInstanceLess> instance_map;
instance_map mInstance;
LLMutex* mMutex;
@@ -690,13 +705,10 @@ public:
LLHost mHost;
std::string mWholeModelFeeCapability;
std::string mWholeModelUploadURL;
- LLUUID mDestinationFolderId;
LLMeshUploadThread(instance_list& data, LLVector3& scale, bool upload_textures,
bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position,
- const std::string & upload_url,
- const LLUUID destination_folder_id = LLUUID::null,
- bool do_upload = true,
+ const std::string & upload_url, bool do_upload = true,
LLHandle<LLWholeModelFeeObserver> fee_observer = (LLHandle<LLWholeModelFeeObserver>()),
LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>()));
~LLMeshUploadThread();
@@ -712,7 +724,7 @@ public:
void doWholeModelUpload();
void requestWholeModelFee();
- void wholeModelToLLSD(LLSD& dest, std::vector<std::string>& texture_list_dest, bool include_textures);
+ void wholeModelToLLSD(LLSD& dest, bool include_textures);
void decomposeMeshMatrix(LLMatrix4& transformation,
LLVector3& result_pos,
@@ -733,7 +745,6 @@ private:
bool mDoUpload; // if false only model data will be requested, otherwise the model will be uploaded
LLSD mModelData;
- std::vector<std::string> mTextureFiles;
// llcorehttp library interface objects.
LLCore::HttpStatus mHttpStatus;
@@ -856,9 +867,7 @@ public:
void uploadModel(std::vector<LLModelInstance>& data, LLVector3& scale, bool upload_textures,
bool upload_skin, bool upload_joints, bool lock_scale_if_joint_position,
- std::string upload_url,
- const LLUUID& destination_folder_id = LLUUID::null,
- bool do_upload = true,
+ std::string upload_url, bool do_upload = true,
LLHandle<LLWholeModelFeeObserver> fee_observer= (LLHandle<LLWholeModelFeeObserver>()),
LLHandle<LLWholeModelUploadObserver> upload_observer = (LLHandle<LLWholeModelUploadObserver>()));