diff options
author | Dave Parks <davep@lindenlab.com> | 2011-03-22 17:24:10 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-03-22 17:24:10 -0500 |
commit | 89e09646824122e20194400e93bcdb0b212f96fe (patch) | |
tree | ef91c0fe1d81a9e338ee16dd98d759f6980d113a /indra/newview/llmeshrepository.cpp | |
parent | 380f9402557aaa3e1f5b6902f0aef52608f114ea (diff) | |
parent | 6ff87e2840c585711e2927028a11ba5ce78a192a (diff) |
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-x | indra/newview/llmeshrepository.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 47dc343f5e..a227627bc1 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -3584,6 +3584,19 @@ void LLPhysicsDecomp::Request::setStatusMessage(const std::string& msg) mStatusMessage = msg; } +LLModelInstance::LLModelInstance(LLSD& data) +{ + mLocalMeshID = data["mesh_id"].asInteger(); + mLabel = data["label"].asString(); + mTransform.setValue(data["transform"]); + + for (U32 i = 0; i < data["material"].size(); ++i) + { + mMaterial.push_back(LLImportMaterial(data["material"][i])); + } +} + + LLSD LLModelInstance::asLLSD() { LLSD ret; @@ -3600,6 +3613,15 @@ LLSD LLModelInstance::asLLSD() return ret; } +LLImportMaterial::LLImportMaterial(LLSD& data) +{ + mDiffuseMapFilename = data["diffuse"]["filename"].asString(); + mDiffuseMapLabel = data["diffuse"]["label"].asString(); + mDiffuseColor.setValue(data["diffuse"]["color"]); + mFullbright = data["fullbright"].asBoolean(); +} + + LLSD LLImportMaterial::asLLSD() { LLSD ret; |