summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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: