MAINT-3818 FIXED Certain dae files that used to display skin weights successfully now crash when ticking skin weights in model preview on ALL viewers
parent
e712a5230e
commit
06f50c52e1
|
|
@ -260,25 +260,33 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector<LLVolumeFace>& fa
|
|||
}
|
||||
|
||||
if (indices.size()%3 == 0 && verts.size() >= 65532)
|
||||
{
|
||||
std::string material;
|
||||
|
||||
if (tri->getMaterial())
|
||||
{
|
||||
face_list.push_back(face);
|
||||
face_list.rbegin()->fillFromLegacyData(verts, indices);
|
||||
LLVolumeFace& new_face = *face_list.rbegin();
|
||||
if (!norm_source)
|
||||
{
|
||||
//ll_aligned_free_16(new_face.mNormals);
|
||||
new_face.mNormals = NULL;
|
||||
}
|
||||
|
||||
if (!tc_source)
|
||||
{
|
||||
//ll_aligned_free_16(new_face.mTexCoords);
|
||||
new_face.mTexCoords = NULL;
|
||||
}
|
||||
|
||||
face = LLVolumeFace();
|
||||
point_map.clear();
|
||||
material = std::string(tri->getMaterial());
|
||||
}
|
||||
|
||||
materials.push_back(material);
|
||||
face_list.push_back(face);
|
||||
face_list.rbegin()->fillFromLegacyData(verts, indices);
|
||||
LLVolumeFace& new_face = *face_list.rbegin();
|
||||
if (!norm_source)
|
||||
{
|
||||
//ll_aligned_free_16(new_face.mNormals);
|
||||
new_face.mNormals = NULL;
|
||||
}
|
||||
|
||||
if (!tc_source)
|
||||
{
|
||||
//ll_aligned_free_16(new_face.mTexCoords);
|
||||
new_face.mTexCoords = NULL;
|
||||
}
|
||||
|
||||
face = LLVolumeFace();
|
||||
point_map.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (!verts.empty())
|
||||
|
|
@ -497,6 +505,14 @@ LLModel::EModelStatus load_face_from_dom_polylist(std::vector<LLVolumeFace>& fac
|
|||
|
||||
if (indices.size()%3 == 0 && indices.size() >= 65532)
|
||||
{
|
||||
std::string material;
|
||||
|
||||
if (poly->getMaterial())
|
||||
{
|
||||
material = std::string(poly->getMaterial());
|
||||
}
|
||||
|
||||
materials.push_back(material);
|
||||
face_list.push_back(face);
|
||||
face_list.rbegin()->fillFromLegacyData(verts, indices);
|
||||
LLVolumeFace& new_face = *face_list.rbegin();
|
||||
|
|
|
|||
|
|
@ -3787,7 +3787,7 @@ BOOL LLModelPreview::render()
|
|||
|
||||
if (!model->mSkinWeights.empty())
|
||||
{
|
||||
for (U32 i = 0; i < mVertexBuffer[mPreviewLOD][model].size(); ++i)
|
||||
for (U32 i = 0, e = mVertexBuffer[mPreviewLOD][model].size(); i < e; ++i)
|
||||
{
|
||||
LLVertexBuffer* buffer = mVertexBuffer[mPreviewLOD][model][i];
|
||||
|
||||
|
|
@ -3856,6 +3856,7 @@ BOOL LLModelPreview::render()
|
|||
position[j] = v;
|
||||
}
|
||||
|
||||
llassert(model->mMaterialList.size() > i);
|
||||
const std::string& binding = instance.mModel->mMaterialList[i];
|
||||
const LLImportMaterial& material = instance.mMaterial[binding];
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue