From 18f4ad27b6b18f3ea32f610136858b64a816cc85 Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Thu, 10 Dec 2015 19:28:26 +0200 Subject: MAINT-5956 FIXED Certain dae will not upload with the new importer code --- indra/llprimitive/lldaeloader.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llprimitive') diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp index 4d8acb2808..9a1f8d09e8 100644 --- a/indra/llprimitive/lldaeloader.cpp +++ b/indra/llprimitive/lldaeloader.cpp @@ -239,7 +239,10 @@ LLModel::EModelStatus load_face_from_dom_triangles(std::vector& fa // Don't share verts within the same tri, degenerate // - if ((indices.size() % 3) && (indices[indices.size()-1] != shared_index)) + U32 indx_size = indices.size(); + U32 verts_new_tri = indx_size % 3; + if ((verts_new_tri < 1 || indices[indx_size - 1] != shared_index) + && (verts_new_tri < 2 || indices[indx_size - 2] != shared_index)) { found = true; indices.push_back(shared_index); -- cgit v1.2.3