diff options
author | Richard Linden <none@none> | 2011-04-06 15:15:33 -0700 |
---|---|---|
committer | Richard Linden <none@none> | 2011-04-06 15:15:33 -0700 |
commit | 75ddf612ad29240d6d34b5044ae09e4295217766 (patch) | |
tree | 70eeb78247ef3ae779809485afaaf592aa495b34 /indra/newview/llpolymesh.cpp | |
parent | 4dd471d055bea672f5eb21cfcc4d07e6b3ba3f9b (diff) | |
parent | 80efbeead1d59b64b615f8a33cb0966cf7fef9f1 (diff) |
Automated merge with ssh://hg.lindenlab.com/richard/viewer-social-2
Diffstat (limited to 'indra/newview/llpolymesh.cpp')
-rw-r--r-- | indra/newview/llpolymesh.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/indra/newview/llpolymesh.cpp b/indra/newview/llpolymesh.cpp index 363b0b8e9d..6d6fb2fa0e 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.03f), + "Belly_Physics_Torso_UpDown_Driven")); + } + + if (!strcmp(morphName, "Big_Belly_Legs")) + { + mMorphData.insert(clone_morph_param(morph_data, + LLVector3(0,0,0.03f), + "Belly_Physics_Legs_UpDown_Driven")); + } + + if (!strcmp(morphName, "skirt_belly")) + { + mMorphData.insert(clone_morph_param(morph_data, + LLVector3(0,0,0.03f), + "Belly_Physics_Skirt_UpDown_Driven")); + } + + if (!strcmp(morphName, "Small_Butt")) + { + mMorphData.insert(clone_morph_param(morph_data, + LLVector3(0,0,0.015f), + "Butt_Physics_UpDown_Driven")); + } + if (!strcmp(morphName, "Small_Butt")) + { + mMorphData.insert(clone_morph_param(morph_data, + LLVector3(0,0.015f,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 |