summaryrefslogtreecommitdiff
path: root/indra/newview/llmeshrepository.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2011-03-22 17:23:48 -0500
committerDave Parks <davep@lindenlab.com>2011-03-22 17:23:48 -0500
commit6ff87e2840c585711e2927028a11ba5ce78a192a (patch)
treeef91c0fe1d81a9e338ee16dd98d759f6980d113a /indra/newview/llmeshrepository.cpp
parent51a4867ae6bcf0ec71882ba77b1c995d98834126 (diff)
SH-1169 Import from slm instead of dae when appropriate.
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;