Skip to content

Commit

Permalink
fix a bug when there is no uv map
Browse files Browse the repository at this point in the history
  • Loading branch information
gaoxing committed Feb 1, 2021
1 parent fbea29c commit 54c0228
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/src/c3mx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,10 @@ namespace seed

CTMexporter ctm;
ctm.DefineMesh(aVertices.data(), aVertices.size() / 3, aIndices.data(), aIndices.size() / 3, aNormals.data());
ctm.AddUVMap(aUVCoords.data(), nullptr, nullptr);
if (aUVCoords.size())
{
ctm.AddUVMap(aUVCoords.data(), nullptr, nullptr);
}
ctm.SaveCustom(_ctm_write_buf, &bufferData);
return bb;
}
Expand Down

0 comments on commit 54c0228

Please sign in to comment.