diff options
author | Leyla Farazha <leyla@lindenlab.com> | 2011-03-30 15:09:02 -0700 |
---|---|---|
committer | Leyla Farazha <leyla@lindenlab.com> | 2011-03-30 15:09:02 -0700 |
commit | 9d28f8401d5b0d5772bb6e45dc2f9d136e9b9bbb (patch) | |
tree | 8e9c5354065d633387b9f0f99aec0a2890bbab26 | |
parent | 8a9686409861950f1e72dffcf8e8e2699bb80478 (diff) | |
parent | 483839c92b1f23314160e7d4b5383065760a57dc (diff) |
Merge
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 21 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 6 | ||||
-rwxr-xr-x | install.xml | 4 |
3 files changed, 22 insertions, 9 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3cb756a006..3da0c795d5 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -386,7 +386,8 @@ LLFloaterModelPreview::~LLFloaterModelPreview() sInstance = NULL; const LLModelLoader *model_loader = mModelPreview->mModelLoader; - if (model_loader && model_loader->mResetJoints) + + if ( mModelPreview && mModelPreview->getResetJointFlag() ) { gAgentAvatarp->resetJointPositions(); } @@ -394,7 +395,7 @@ LLFloaterModelPreview::~LLFloaterModelPreview() if ( mModelPreview ) { - delete mModelPreview; + delete mModelPreview; } if (mGLName) @@ -992,7 +993,7 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl // LLModelLoader //----------------------------------------------------------------------------- LLModelLoader::LLModelLoader(std::string filename, S32 lod, LLModelPreview* preview) -: LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE), mResetJoints( FALSE ) +: LLThread("Model Loader"), mFilename(filename), mLod(lod), mPreview(preview), mFirstTransform(TRUE) { mJointMap["mPelvis"] = "mPelvis"; mJointMap["mTorso"] = "mTorso"; @@ -1566,14 +1567,14 @@ bool LLModelLoader::doLoadModel() mPreview->setRigValid( doesJointArrayContainACompleteRig( model->mSkinInfo.mJointNames ) ); if ( !skeletonWithNoRootNode && !model->mSkinInfo.mJointNames.empty() && mPreview->isRigValid() ) { - mResetJoints = true; + mPreview->setResetJointFlag( true ); } if ( !missingSkeletonOrScene ) { //Set the joint translations on the avatar - if it's a full mapping //The joints are reset in the dtor - if ( mResetJoints ) + if ( mPreview->getResetJointFlag() ) { std::map<std::string, std::string> :: const_iterator masterJointIt = mJointMap.begin(); std::map<std::string, std::string> :: const_iterator masterJointItEnd = mJointMap.end(); @@ -2438,6 +2439,7 @@ LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex(NULL) , mPelvisZOffset( 0.0f ) , mRigValid( false ) +, mResetJoints( false ) { mNeedsUpdate = TRUE; mCameraDistance = 0.f; @@ -2535,6 +2537,15 @@ U32 LLModelPreview::calcResourceCost() instance.mLOD[LLModel::LOD_PHYSICS] ? instance.mLOD[LLModel::LOD_PHYSICS]->mPhysics.mHull : instance.mModel->mPhysics.mHull; + + //update instance skin info for each lods pelvisZoffset + for ( int j=0; j<LLModel::NUM_LODS; ++j ) + { + if ( instance.mLOD[j] ) + { + instance.mLOD[j]->mSkinInfo.mPelvisOffset = mPelvisZOffset; + } + } LLSD ret = LLModel::writeModel( "", diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 6542ed4fbe..3fcc1b3e57 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -126,7 +126,6 @@ public: //map of avatar joints as named in COLLADA assets to internal joint names std::map<std::string, std::string> mJointMap; std::deque<std::string> mMasterJointList; - bool mResetJoints; }; class LLFloaterModelPreview : public LLFloater @@ -310,6 +309,9 @@ public: void setLoadState( U32 state ) { mLoadState = state; } U32 getLoadState() { return mLoadState; } + void setResetJointFlag( bool state ) { mResetJoints = state; } + bool getResetJointFlag( void ) { return mResetJoints; } + protected: friend class LLModelLoader; friend class LLFloaterModelPreview; @@ -336,7 +338,7 @@ public: std::string mLODFile[LLModel::NUM_LODS]; bool mLoading; U32 mLoadState; - + bool mResetJoints; std::map<std::string, bool> mViewOption; //GLOD object parameters (must rebuild object if these change) diff --git a/install.xml b/install.xml index 1bc6746223..67de9c9cbc 100755 --- a/install.xml +++ b/install.xml @@ -70,9 +70,9 @@ <key>windows</key> <map> <key>md5sum</key> - <string>5f993f8092ddf4424ec3133dae9424dd</string> + <string>e40e1eac81dc57d8724f96fd977a3d58</string> <key>url</key> - <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glod-1.0pre4-windows-20100908a.tar.bz2</uri> + <uri>http://s3.amazonaws.com/viewer-source-downloads/install_pkgs/glod-1.0pre4-windows-20110330.tar.bz2</uri> </map> </map> </map> |