obj file loader now allows using mtl files with spaces in the filename.

mtllib commands previously used only the first word, now they use the rest of the line.
Different obj format descriptions describe the mtllib command in 2 different ways:
- http://paulbourke.net says it can load several mtl files separated by spaces
- Wikipedia says it can load one mtl file (but there can be several mtllib commands)
We previously loaded 1 file - using the name up to the first space character, so it basically was not correct for either solution. We now go with Wikipedia, because it allows using space in filenames and I tested several other tools and they all handled it like this.

Also COBJMeshFileLoader::copyLine no longer copies the newline character (didn't do that always anyway and we don't need it)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6275 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
cutealien
2021-12-22 16:19:59 +00:00
parent e037502141
commit e7c7e36347
2 changed files with 15 additions and 7 deletions

View File

@ -1,5 +1,8 @@
--------------------------
Changes in 1.9 (not yet released)
- obj file loader now allows using mtl files with spaces in the filename.
Note that this means it no longer handles obj files which have multiple mtl files behind the mtllib command.
But Irrlicht ignored all but the first name anyway and this way of handling mtllib commands seems to be more common.
- Many defines changed because they were using names which are reserved identifiers in c++.
Mostly it's about replacing __IRRxxx or _IRRxxx identifiers by versions without underscores
Sometimes underscores at end also got removed.