If the mtl and/or texture paths are enclosed in double-quotes, they will fail to be read.
For example, if within theobj file, the mtl path is defined as follows:
mtllib "OBJ - Berlin Bridge.mtl"
The mtl file will not be loaded because when we try to compare the extension of the file to confirm that it ends with .mtl, that fails because the last token is .mtl"
The same thing happens to texture files.
This pull request strips the mtl and texture file of its double quotes if they exists. If they don't , nothing happens.
There is at least one OBJ export tool (metashape from agisoft) that adds double quotes to filemanes that contains spaces in them.
If the mtl and/or texture paths are enclosed in double-quotes, they will fail to be read.
For example, if within the
obj
file, the mtl path is defined as follows:mtllib "OBJ - Berlin Bridge.mtl"
The
mtl
file will not be loaded because when we try to compare the extension of the file to confirm that it ends with.mtl
, that fails because the last token is.mtl"
The same thing happens to texture files.
This pull request strips the mtl and texture file of its double quotes if they exists. If they don't , nothing happens.
There is at least one OBJ export tool (metashape from agisoft) that adds double quotes to filemanes that contains spaces in them.
This pull request sould fix this isse.