diff options
author | vyacheslavsproductengine <vyacheslavsproductengine@lindenlab.com> | 2015-06-01 21:02:35 +0400 |
---|---|---|
committer | vyacheslavsproductengine <vyacheslavsproductengine@lindenlab.com> | 2015-06-01 21:02:35 +0400 |
commit | cfe009cbf6937feaf5baf03e0bf6147b45662cb0 (patch) | |
tree | e628112e74b666755d1ac2c0aa9ce584439c30d3 /indra/newview/llfloatermodelpreview.cpp | |
parent | 2574d1c1fee9b6deffd8d9224d62e91848c1d0e3 (diff) |
MAINT-4761 FIXED viewer crash (Crash after selecting 'Skin weights' checkbox when uploading the second model.)
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a4dde62056..6804b21b28 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -3810,11 +3810,8 @@ void LLModelPreview::loadModelCallback(S32 lod) mFMP->getChild<LLCheckBoxCtrl>("confirm_checkbox")->set(FALSE); if (!mBaseModel.empty()) { - if (mFMP->getChild<LLUICtrl>("description_form")->getValue().asString().empty()) - { - const std::string& model_name = mBaseModel[0]->getName(); - mFMP->getChild<LLUICtrl>("description_form")->setValue(model_name); - } + const std::string& model_name = mBaseModel[0]->getName(); + mFMP->getChild<LLUICtrl>("description_form")->setValue(model_name); } } refresh(); @@ -5138,8 +5135,11 @@ BOOL LLModelPreview::render() mViewOption["show_skin_weight"] = false; fmp->disableViewOption("show_skin_weight"); fmp->disableViewOption("show_joint_positions"); + + skin_weight = false; + mFMP->childSetValue("show_skin_weight", false); + fmp->setViewOptionEnabled("show_skin_weight", skin_weight); } - skin_weight = false; } if (upload_skin && !has_skin_weights) @@ -5243,6 +5243,16 @@ BOOL LLModelPreview::render() const LLVertexBuffer* buff = vb_vec[0]; regen = buff->hasDataType(LLVertexBuffer::TYPE_WEIGHT4) != skin_weight; } + else + { + LL_INFOS(" ") << "Vertex Buffer[" << mPreviewLOD << "]" << " is EMPTY!!!" << LL_ENDL; + regen = TRUE; + } + } + + if (regen) + { + genBuffers(mPreviewLOD, skin_weight); } //make sure material lists all match @@ -5263,11 +5273,6 @@ BOOL LLModelPreview::render() } } - if (regen) - { - genBuffers(mPreviewLOD, skin_weight); - } - if (!skin_weight) { for (LLMeshUploadThread::instance_list::iterator iter = mUploadData.begin(); iter != mUploadData.end(); ++iter) |