diff options
author | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-09-01 11:00:08 -0400 |
---|---|---|
committer | Nyx (Neal Orman) <nyx@lindenlab.com> | 2010-09-01 11:00:08 -0400 |
commit | ce3e83270606b064afbe77d8f8a8d268cfa3772a (patch) | |
tree | 87275407e8cadc8adbc147b6a06a289bf896ad9f /indra/newview/llmeshrepository.cpp | |
parent | af3f9004ef486f9eed14eb65ee3c95d1e9a22917 (diff) | |
parent | e3fec30097a28689a7022d06005d7d59a3004f0c (diff) |
Automated merge with ssh://hg.lindenlab.com/davep/viewer-mesh/
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r-- | indra/newview/llmeshrepository.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 96a170ef07..069642b711 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2104,6 +2104,30 @@ void LLMeshRepository::uploadModel(std::vector<LLModelInstance>& data, LLVector3 thread->start(); } +S32 LLMeshRepository::getMeshSize(const LLUUID& mesh_id, S32 lod) +{ + if (mThread) + { + LLMeshRepoThread::mesh_header_map::iterator iter = mThread->mMeshHeader.find(mesh_id); + if (iter != mThread->mMeshHeader.end()) + { + LLSD& header = iter->second; + + if (header.has("404")) + { + return -1; + } + + S32 size = header[header_lod[lod]]["size"].asInteger(); + return size; + } + + } + + return -1; + +} + void LLMeshUploadThread::sendCostRequest(LLMeshUploadData& data) { //write model file to memory buffer |