summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rw-r--r--indra/newview/llmeshrepository.cpp17
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp
index 38fd2d777e..4e9ebec0f2 100644
--- a/indra/newview/llmeshrepository.cpp
+++ b/indra/newview/llmeshrepository.cpp
@@ -2190,6 +2190,7 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
std::map<LLModel*,S32> mesh_index;
std::string model_name;
+ std::string model_metric;
S32 instance_num = 0;
@@ -2219,6 +2220,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
model_name = data.mBaseModel->getName();
}
+ if (model_metric.empty())
+ {
+ model_metric = data.mBaseModel->getMetric();
+ }
+
std::stringstream ostr;
LLModel::Decomposition& decomp =
@@ -2373,6 +2379,11 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
model_name = data.mBaseModel->getName();
}
+ if (model_metric.empty())
+ {
+ model_metric = data.mBaseModel->getMetric();
+ }
+
std::stringstream ostr;
LLModel::Decomposition& decomp =
@@ -2503,7 +2514,8 @@ void LLMeshUploadThread::wholeModelToLLSD(LLSD& dest, bool include_textures)
if (model_name.empty()) model_name = "mesh model";
result["name"] = model_name;
- res["metric"] = "MUT_Unspecified";
+ if (model_metric.empty()) model_metric = "MUT_Unspecified";
+ res["metric"] = model_metric;
result["asset_resources"] = res;
dump_llsd_to_file(result,make_dump_name("whole_model_",dump_num));
@@ -3177,7 +3189,8 @@ void LLMeshHeaderHandler::processData(LLCore::BufferArray * /* body */, S32 /* b
if (header_bytes > 0
&& !header.has("404")
- && (!header.has("version") || header["version"].asInteger() <= MAX_MESH_VERSION))
+ && header.has("version")
+ && header["version"].asInteger() <= MAX_MESH_VERSION)
{
std::stringstream str;