summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorruslantproductengine <ruslantproductengine@lindenlab.com>2015-04-01 19:02:55 +0300
committerruslantproductengine <ruslantproductengine@lindenlab.com>2015-04-01 19:02:55 +0300
commit06f50c52e1bae3eb67c620c64879dcc6918280dc (patch)
tree581016c04788b047ab7bc6daeff56e166ae194f5 /indra/llprimitive
parente712a5230e4f6da7dd750aee2ca8aeb2e4371f72 (diff)
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
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/lldaeloader.cpp46
1 files changed, 31 insertions, 15 deletions
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index ed38c97b06..62801b8ed4 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -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;
- }
+ material = std::string(tri->getMaterial());
+ }
- if (!tc_source)
- {
- //ll_aligned_free_16(new_face.mTexCoords);
- new_face.mTexCoords = NULL;
- }
+ 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;
+ }
- face = LLVolumeFace();
- point_map.clear();
+ 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();