summaryrefslogtreecommitdiff
path: root/indra/newview/llpolymesh.cpp
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2011-03-31 16:47:35 -0400
committerOz Linden <oz@lindenlab.com>2011-03-31 16:47:35 -0400
commit4047349ade461fa6bac43da2a14c6e7689918aa1 (patch)
treec1414bf26449ede2ff338b8ab286c19b754697fe /indra/newview/llpolymesh.cpp
parent4aad5ee313f580e08f9689b7ff4c4c088c20f831 (diff)
parent67316ada5a51e1dc1e4d40a805312dddaa653ae2 (diff)
merge out latest viewer-autobuild2010 changes
Diffstat (limited to 'indra/newview/llpolymesh.cpp')
-rw-r--r--indra/newview/llpolymesh.cpp54
1 files changed, 54 insertions, 0 deletions
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp
index 363b0b8e9d..a28357b4a9 100644
--- a/indra/newview/llpolymesh.cpp
+++ b/indra/newview/llpolymesh.cpp
@@ -46,6 +46,10 @@
extern LLControlGroup gSavedSettings; // read only
+LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data,
+ const LLVector3 &direction,
+ const std::string &name);
+
//-----------------------------------------------------------------------------
// Global table of loaded LLPolyMeshes
//-----------------------------------------------------------------------------
@@ -602,6 +606,40 @@ BOOL LLPolyMeshSharedData::loadMesh( const std::string& fileName )
}
mMorphData.insert(morph_data);
+
+ if (!strcmp(morphName, "Big_Belly_Torso"))
+ {
+ mMorphData.insert(clone_morph_param(morph_data,
+ LLVector3(0,0,0.05f),
+ "Belly_Torso_Physics_UpDown_Driven"));
+ }
+
+ if (!strcmp(morphName, "Big_Belly_Legs"))
+ {
+ mMorphData.insert(clone_morph_param(morph_data,
+ LLVector3(0,0,0.05f),
+ "Belly_Legs_Physics_UpDown_Driven"));
+ }
+
+ if (!strcmp(morphName, "skirt_belly"))
+ {
+ mMorphData.insert(clone_morph_param(morph_data,
+ LLVector3(0,0,0.05f),
+ "Belly_Skirt_Physics_UpDown_Driven"));
+ }
+
+ if (!strcmp(morphName, "Small_Butt"))
+ {
+ mMorphData.insert(clone_morph_param(morph_data,
+ LLVector3(0,0,0.01f),
+ "Butt_Physics_UpDown_Driven"));
+ }
+ if (!strcmp(morphName, "Small_Butt"))
+ {
+ mMorphData.insert(clone_morph_param(morph_data,
+ LLVector3(0,0.01f,0),
+ "Butt_Physics_LeftRight_Driven"));
+ }
}
S32 numRemaps;
@@ -1158,4 +1196,20 @@ void LLPolySkeletalDistortion::apply( ESex avatar_sex )
mLastWeight = mCurWeight;
}
+
+LLPolyMorphData *clone_morph_param(const LLPolyMorphData *src_data,
+ const LLVector3 &direction,
+ const std::string &name)
+{
+ LLPolyMorphData* cloned_morph_data = new LLPolyMorphData(*src_data);
+ cloned_morph_data->mName = name;
+ for (U32 v=0; v < cloned_morph_data->mNumIndices; v++)
+ {
+ cloned_morph_data->mCoords[v] = direction;
+ cloned_morph_data->mNormals[v] = LLVector3(0,0,0);
+ cloned_morph_data->mBinormals[v] = LLVector3(0,0,0);
+ }
+ return cloned_morph_data;
+}
+
// End