JeremyAnsel / JeremyAnsel.Media.WavefrontObj

A .Net library to handle Wavefront Obj .obj and .mtl files.
https://jeremyansel.github.io/JeremyAnsel.Media.WavefrontObj/
MIT License
10 stars 7 forks source link

Material with whitespaces cannot be read by ObjFileReader.FromStream #6

Closed MGerdel closed 1 year ago

MGerdel commented 1 year ago

https://github.com/JeremyAnsel/JeremyAnsel.Media.WavefrontObj/blob/7b83ffbde616f021e6f1b3821097799d7f7da7e4/JeremyAnsel.Media.WavefrontObj/JeremyAnsel.Media.WavefrontObj/ObjFileReader.cs#L784

If an obj with "mtllib my cool material.mtl" is read, an exception is beeing thrown that the file has no extension.

Could this be fixed accordingly to https://github.com/JeremyAnsel/JeremyAnsel.Media.WavefrontObj/issues/3?

JeremyAnsel commented 1 year ago

Hello, I've modified the code to allow spaces in the mtllib instruction.