summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorvyacheslavsproductengine <vyacheslavsproductengine@lindenlab.com>2015-06-01 21:02:35 +0400
committervyacheslavsproductengine <vyacheslavsproductengine@lindenlab.com>2015-06-01 21:02:35 +0400
commit1491c23d9b7850d91518b689572716026c0bacc8 (patch)
tree05d42b4b479ca15b34f7cb989ada1562d013b0d0 /indra
parent4fa3e33c4df9ed4e225ee0a089232e83bce8ce5e (diff)
MAINT-4761 FIXED viewer crash (Crash after selecting 'Skin weights' checkbox when uploading the second model.)
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 2cad67a47f..20760001fd 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -3815,11 +3815,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();
@@ -5143,8 +5140,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)
@@ -5248,6 +5248,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
@@ -5268,11 +5278,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)