diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-15 16:59:46 -0400 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2011-08-15 16:59:46 -0400 |
commit | 2d24203e5912bc6a9c8fa0e5c44cfe0711cb121a (patch) | |
tree | f1237c7ce1afc5fd3df9b4ddd87dd84f2469f65d | |
parent | 832d972fe86325bfafad542c7c548dbecaf5ee65 (diff) |
SH-2029 FIX - persist the model name in SLM
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 737fdd4919..6783d3d1dc 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -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; |