diff options
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x[-rw-r--r--] | indra/newview/llfloatermodelpreview.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 881f087d7b..4f683076a8 100644..100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -496,6 +496,11 @@ BOOL LLFloaterModelPreview::postBuild() { validate_url = "http://secondlife.com/my/account/mesh.php"; } + else if (current_grid == "damballah") + { + // Staging grid has its own naming scheme. + validate_url = "http://secondlife-staging.com/my/account/mesh.php"; + } else { validate_url = llformat("http://secondlife.%s.lindenlab.com/my/account/mesh.php",current_grid.c_str()); @@ -744,6 +749,11 @@ void LLFloaterModelPreview::draw() if (!mModelPreview->mLoading) { + if ( mModelPreview->getLoadState() == LLModelLoader::ERROR_MATERIALS ) + { + childSetTextArg("status", "[STATUS]", getString("status_material_mismatch")); + } + else if ( mModelPreview->getLoadState() > LLModelLoader::ERROR_PARSING ) { childSetTextArg("status", "[STATUS]", getString(LLModel::getStatusString(mModelPreview->getLoadState() - LLModelLoader::ERROR_PARSING))); @@ -3304,7 +3314,7 @@ void LLModelPreview::rebuildUploadData() F32 max_scale = 0.f; //reorder materials to match mBaseModel - for (U32 i = 0; i < LLModel::NUM_LODS; i++) + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) { if (mBaseModel.size() == mModel[i].size()) { @@ -3316,6 +3326,7 @@ void LLModelPreview::rebuildUploadData() if ( !mModel[i][j]->matchMaterialOrder(mBaseModel[j], refFaceCnt, modelFaceCnt ) ) { + setLoadState( LLModelLoader::ERROR_MATERIALS ); mFMP->childDisable( "calculate_btn" ); } } @@ -4351,11 +4362,6 @@ void LLModelPreview::updateStatusMessages() { skinAndRigOk = false; } - else - if ( !isLegacyRigValid() ) - { - mFMP->childDisable("calculate_btn"); - } } if(upload_ok && mModelLoader) @@ -5071,6 +5077,8 @@ BOOL LLModelPreview::render() if (!mModel[mPreviewLOD].empty()) { + mFMP->childEnable("reset_btn"); + bool regen = mVertexBuffer[mPreviewLOD].empty(); if (!regen) { @@ -5083,7 +5091,7 @@ BOOL LLModelPreview::render() } //make sure material lists all match - for (U32 i = 0; i < LLModel::NUM_LODS; i++) + for (U32 i = 0; i < LLModel::NUM_LODS-1; i++) { if (mBaseModel.size() == mModel[i].size()) { @@ -5568,6 +5576,7 @@ void LLFloaterModelPreview::onReset(void* user_data) assert_main_thread(); LLFloaterModelPreview* fmp = (LLFloaterModelPreview*) user_data; + fmp->childDisable("reset_btn"); LLModelPreview* mp = fmp->mModelPreview; std::string filename = mp->mLODFile[3]; |