diff options
author | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-10-20 16:15:36 +0300 |
---|---|---|
committer | Mnikolenko Productengine <mnikolenko@productengine.com> | 2016-10-20 16:15:36 +0300 |
commit | 5d1f6223eb39e2bf6eb2c57428d2957c3bc7ffc7 (patch) | |
tree | 8853514e08e63e89e6df17499de971f7636d2137 /indra/newview | |
parent | fceaa9ddf1170390c06c04d7de352fcb846acf62 (diff) |
MAINT-6835 Material of model is not a subset of reference, cause upload model dialog to stick with error
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 20 | ||||
-rw-r--r-- | indra/newview/llfloatermodelpreview.h | 1 |
2 files changed, 10 insertions, 11 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 745ad4a834..a07f3311f1 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1184,6 +1184,7 @@ void LLFloaterModelPreview::onMouseCaptureLostModelPreview(LLMouseHandler* handl LLModelPreview::LLModelPreview(S32 width, S32 height, LLFloater* fmp) : LLViewerDynamicTexture(width, height, 3, ORDER_MIDDLE, FALSE), LLMutex(NULL) , mLodsQuery() +, mLodsWithParsingError() , mPelvisZOffset( 0.0f ) , mLegacyRigValid( false ) , mRigValidJointUpload( false ) @@ -1902,9 +1903,16 @@ void LLModelPreview::loadModelCallback(S32 loaded_lod) { mLoading = false ; mModelLoader = NULL; + mLodsWithParsingError.push_back(loaded_lod); return ; } + mLodsWithParsingError.erase(std::remove(mLodsWithParsingError.begin(), mLodsWithParsingError.end(), loaded_lod), mLodsWithParsingError.end()); + if(mLodsWithParsingError.empty()) + { + mFMP->childEnable( "calculate_btn" ); + } + // Copy determinations about rig so UI will reflect them // setRigValidForJointPositionUpload(mModelLoader->isRigValidForJointPositionUpload()); @@ -2639,17 +2647,7 @@ void LLModelPreview::updateStatusMessages() setLoadState( LLModelLoader::ERROR_MATERIALS ); mFMP->childDisable( "calculate_btn" ); } - - int refFaceCnt = 0; - int modelFaceCnt = 0; - - if (!lod_model->matchMaterialOrder(model_high_lod, refFaceCnt, modelFaceCnt ) ) - { - setLoadState( LLModelLoader::ERROR_MATERIALS ); - mFMP->childDisable( "calculate_btn" ); - } - - if (lod_model) + else { //for each model in the lod S32 cur_tris = 0; diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index a73ca50260..184315f604 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -307,6 +307,7 @@ public: static bool sIgnoreLoadedCallback; std::vector<S32> mLodsQuery; + std::vector<S32> mLodsWithParsingError; protected: |