diff options
author | Xiaohong Bao <bao@lindenlab.com> | 2011-04-01 10:59:30 -0600 |
---|---|---|
committer | Xiaohong Bao <bao@lindenlab.com> | 2011-04-01 10:59:30 -0600 |
commit | e04b7f007f71be65395d01184264f18f1662246a (patch) | |
tree | 71e3ed8db4ee4b1cd0b976d728601d61b3a0de6f /indra/newview/llfloatermodelpreview.cpp | |
parent | b97c47c19cff4f33c6172bd18fd8b48063007a37 (diff) | |
parent | f0c70a4ee3739c34b1da2ce384bfcf420f8c6c72 (diff) |
Automated merge with http://hg.secondlife.com/mesh-development
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 66d80e3bc3..40c892f06a 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -577,7 +577,14 @@ void LLFloaterModelPreview::draw() if (!mModelPreview->mLoading) { - childSetTextArg("status", "[STATUS]", getString("status_idle")); + if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING ) + { + childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING))); + } + else + { + childSetTextArg("status", "[STATUS]", getString("status_idle")); + } } childSetTextArg("prim_cost", "[PRIM_COST]", llformat("%d", mModelPreview->mResourceCost)); @@ -1283,6 +1290,12 @@ bool LLModelLoader::doLoadModel() { LLPointer<LLModel> model = LLModel::loadModelFromDomMesh(mesh); + if(model->getStatus() != LLModel::NO_ERRORS) + { + setLoadState(ERROR_PARSING + model->getStatus()) ; + return true ; //abort + } + if (model.notNull() && validate_model(model)) { mModelList.push_back(model); @@ -2500,7 +2513,7 @@ U32 LLModelPreview::calcResourceCost() if (mFMP && mModelLoader) { - if ( getLoadState() != LLModelLoader::ERROR_PARSING ) + if ( getLoadState() < LLModelLoader::ERROR_PARSING ) { mFMP->childEnable("ok_btn"); } @@ -2854,7 +2867,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod) setPreviewLOD(lod); - if ( getLoadState() == LLModelLoader::ERROR_PARSING ) + if ( getLoadState() >= LLModelLoader::ERROR_PARSING ) { mFMP->childDisable("ok_btn"); } @@ -2936,8 +2949,14 @@ void LLModelPreview::loadModelCallback(S32 lod) LLMutexLock lock(this); if (!mModelLoader) { + mLoading = false ; return; } + if(getLoadState() >= LLModelLoader::ERROR_PARSING) + { + mLoading = false ; + return ; + } mModelLoader->loadTextures() ; @@ -3673,7 +3692,7 @@ void LLModelPreview::updateStatusMessages() } } - bool errorStateFromLoader = getLoadState() == LLModelLoader::ERROR_PARSING ? true : false; + bool errorStateFromLoader = getLoadState() >= LLModelLoader::ERROR_PARSING ? true : false; bool skinAndRigOk = true; bool uploadingSkin = mFMP->childGetValue("upload_skin").asBoolean(); |