summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-22 17:24:10 -0500
committerDave Parks <davep@lindenlab.com>2011-03-22 17:24:10 -0500
commit89e09646824122e20194400e93bcdb0b212f96fe (patch)
treeef91c0fe1d81a9e338ee16dd98d759f6980d113a /indra/newview/llmeshrepository.cpp
parent380f9402557aaa3e1f5b6902f0aef52608f114ea (diff)
parent6ff87e2840c585711e2927028a11ba5ce78a192a (diff)
merge
Diffstat (limited to 'indra/newview/llmeshrepository.cpp')
-rwxr-xr-xindra/newview/llmeshrepository.cpp22
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;