Fix bug with no materials

This commit is contained in:
Sean Lilley 2016-08-08 11:35:21 -04:00
parent 2d6e0d16c9
commit 20deda83e3
1 changed files with 3 additions and 5 deletions

View File

@ -291,13 +291,11 @@ function getImages(inputPath, materials) {
}
function getMaterials(mtlPath, hasMaterialGroups) {
if (!hasMaterialGroups) {
return;
}
if (defined(mtlPath)) {
if (hasMaterialGroups && defined(mtlPath)) {
return Material.parse(mtlPath);
}
return {};
}
function getObjInfo(objFile, inputPath) {