From 2c7019a4d32bc78a76440da43385604b70868401 Mon Sep 17 00:00:00 2001 From: Mnikolenko ProductEngine Date: Wed, 22 Oct 2014 11:47:11 +0300 Subject: MAINT-4542 FIXED [loader mods] viewer does not display error when Material is not a subset of reference model. --- indra/newview/llfloatermodelpreview.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'indra/newview') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3aa191cf51..9d372766a8 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1550,7 +1550,21 @@ void LLModelPreview::rebuildUploadData() setLoadState( LLModelLoader::ERROR_MATERIALS ); mFMP->childDisable( "calculate_btn" ); } - } + else + { + if (mBaseModel.size() == mModel[i].size()) + { + for (U32 idx = 0; idx < mBaseModel.size(); ++idx) + { + if (mModel[i][idx] && !mModel[i][idx]->matchMaterialOrder(mBaseModel[idx], refFaceCnt, modelFaceCnt ) ) + { + setLoadState( LLModelLoader::ERROR_MATERIALS ); + mFMP->childDisable( "calculate_btn" ); + } + } + } + } + } } instance.mTransform = mat; mUploadData.push_back(instance); -- cgit v1.2.3