From 02ccdd90ec47a7865838fa7e61d88c74ba6c07b0 Mon Sep 17 00:00:00 2001 From: cignoni Date: Sat, 12 Sep 2009 05:22:51 +0000 Subject: [PATCH] small changed to improve the parsing of collada files that has a lot of line breaks inside --- wrap/dae/util_dae.h | 7 ++++++- wrap/io_trimesh/import_dae.h | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/wrap/dae/util_dae.h b/wrap/dae/util_dae.h index 24c0b1c5..7e454c8c 100644 --- a/wrap/dae/util_dae.h +++ b/wrap/dae/util_dae.h @@ -308,9 +308,14 @@ namespace io { QDomNodeList list = srcnode.toElement().elementsByTagName(tag); assert(list.size() == 1); QString nd = list.at(0).firstChild().nodeValue(); - res = nd.split(" "); + res = nd.simplified().split(" ",QString::SkipEmptyParts); if (res.last() == "") res.removeLast(); + +// int emptyCount = res.removeAll(QString("")); +// if(emptyCount>0) qDebug("- - - - - - - - valueStringList: Removed %i null strings when parsing tag %s",emptyCount,qPrintable(tag)); +// for(int i =0;i, std for(int tt = 0;tt < curFaceVertNum ;++tt) // for each vertex of the polygon { int indvt = faceIndexList.at(faceIndexCnt).toInt(); - QDEBUG("******* Reading face[%3i].V(%i) = %4i (%i-th of the index list) (face has %i vertices)",ff,tt,indvt,faceIndexCnt,curFaceVertNum); + if(faceSizeList.size()<100) QDEBUG("******* Reading face[%3i].V(%i) = %4i (%i-th of the index list) (face has %i vertices)",ff,tt,indvt,faceIndexCnt,curFaceVertNum); assert(indvt + offset < m.vert.size()); polyTemp._pv[tt] = &(m.vert[indvt + offset]); faceIndexCnt +=faceAttributeNum;