Missing .mtl gives warning instead of error

This commit is contained in:
Lucas Dower 2022-05-15 14:22:29 +01:00
parent 20c92e9afd
commit 71ecb62ab0

View File

@ -308,7 +308,8 @@ export class ObjImporter extends IImporter {
private _parseMTL() {
for (const mtlLib of this._mtlLibs) {
if (!fs.existsSync(mtlLib)) {
throw new AppError(`Could not find ${mtlLib}`);
StatusHandler.Get.add('warning', `Could not find ${mtlLib}`);
continue;
}
const fileContents = fs.readFileSync(mtlLib, 'utf8');