SH-2029 FIX - persist the model name in SLM

meow-7.2.2
Brad Payne (Vir Linden) 2011-08-15 16:59:46 -04:00
parent 832d972fe8
commit 2d24203e59
1 changed files with 13 additions and 1 deletions

View File

@ -106,7 +106,7 @@
#include <boost/algorithm/string.hpp>
const S32 SLM_SUPPORTED_VERSION = 2;
const S32 SLM_SUPPORTED_VERSION = 3;
//static
S32 LLFloaterModelPreview::sUploadAmount = 10;
@ -2076,6 +2076,14 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
return false;
}
// Set name.
std::string name = data["name"];
if (!name.empty())
{
model[LLModel::LOD_HIGH][0]->mLabel = data["name"];
}
//load instance list
model_instance_list instance_list;
@ -3295,6 +3303,10 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw
LLSD data;
data["version"] = SLM_SUPPORTED_VERSION;
if (!mBaseModel.empty())
{
data["name"] = mBaseModel[0]->getName();
}
S32 mesh_id = 0;