Skip to content

Commit 54c0228

Browse files
author
gaoxing
committed
fix a bug when there is no uv map
1 parent fbea29c commit 54c0228

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/src/c3mx.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,10 @@ namespace seed
467467

468468
CTMexporter ctm;
469469
ctm.DefineMesh(aVertices.data(), aVertices.size() / 3, aIndices.data(), aIndices.size() / 3, aNormals.data());
470-
ctm.AddUVMap(aUVCoords.data(), nullptr, nullptr);
470+
if (aUVCoords.size())
471+
{
472+
ctm.AddUVMap(aUVCoords.data(), nullptr, nullptr);
473+
}
471474
ctm.SaveCustom(_ctm_write_buf, &bufferData);
472475
return bb;
473476
}

0 commit comments

Comments
 (0)