small changed to improve the parsing of collada files that has a lot of line breaks inside
This commit is contained in:
parent
1b7adbe035
commit
02ccdd90ec
|
@ -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<res.size();++i)
|
||||
// qDebug("- - - - - - - - - - - - %3i = '%s'",i,qPrintable(res.at(i)));
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,7 @@ class ColladaMesh : public vcg::tri::TriMesh< std::vector<ColladaVertex>, 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;
|
||||
|
|
Loading…
Reference in New Issue