summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorMnikolenko Productengine <mnikolenko@productengine.com>2016-10-20 16:15:36 +0300
committerMnikolenko Productengine <mnikolenko@productengine.com>2016-10-20 16:15:36 +0300
commit5d1f6223eb39e2bf6eb2c57428d2957c3bc7ffc7 (patch)
tree8853514e08e63e89e6df17499de971f7636d2137 /indra
parentfceaa9ddf1170390c06c04d7de352fcb846acf62 (diff)
MAINT-6835 Material of model is not a subset of reference, cause upload model dialog to stick with error
Diffstat (limited to 'indra')
-rw-r--r--indra/llprimitive/lldaeloader.cpp2
-rw-r--r--indra/newview/llfloatermodelpreview.cpp20
-rw-r--r--indra/newview/llfloatermodelpreview.h1
3 files changed, 12 insertions, 11 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index 8071d716da..031befe63a 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -851,6 +851,8 @@ struct ModelSort
bool LLDAELoader::OpenFile(const std::string& filename)
{
+ setLoadState( READING_FILE );
+
//no suitable slm exists, load from the .dae file
DAE dae;
domCOLLADA* dom;
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: