Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support MTL files with escaped whitespace #285

Merged
merged 2 commits into from
Nov 19, 2020
Merged

Support MTL files with escaped whitespace #285

merged 2 commits into from
Nov 19, 2020

Conversation

chapulina
Copy link
Contributor

As suggested on comment #46 (comment), this adds support for MTL files containing whitespaces, as long as the whitespaces are escaped with \ inside an OBJ file.

I wasn't sure if it was ok to change the signature of the SplitString function. I could hardcode the escape character inside the function if that's preferred.

Added a test that demonstrates a combination of files with and without spaces.

I tried to keep the code style from the rest of the files, but please let me know if anything needs to be udpated.

I also added a couple of dependencies that weren't listed on the viewer example and that I needed to make it work.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@syoyo
Copy link
Collaborator

syoyo commented Nov 18, 2020

@chapulina Awesome!

TinyObjLoader still want to support C++03, so C++11 for loop need to rewrite(And I need to setup CI build with C++03 mode)

Others looks nice. Let me give some time to test PR on my local environment.

Signed-off-by: Louise Poubel <louise@openrobotics.org>
@chapulina
Copy link
Contributor Author

TinyObjLoader still want to support C++03, so C++11 for loop need to rewrite

Oops, muscle memory. Updated in 350d32a.

Let me give some time to test PR on my local environment.

Thanks!

@syoyo syoyo merged commit ea74ce1 into tinyobjloader:master Nov 19, 2020
@syoyo
Copy link
Collaborator

syoyo commented Nov 19, 2020

Updated in 350d32a.

Thanks! My local tests works well so merged!

Also, I made C++03 mode default in Travis CI.

@chapulina chapulina deleted the chapulina/whitespace branch November 19, 2020 20:56
@chapulina
Copy link
Contributor Author

Thanks, @syoyo ! What's the process to get a new version tagged? Would it be possible to get a v1.8 anytime soon?

@syoyo
Copy link
Collaborator

syoyo commented Nov 20, 2020

@chapulina I have already tagged new version as v2.0.0rc8(we are moving to v2.0.0): https://github.com/tinyobjloader/tinyobjloader/releases/tag/v2.0.0rc8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants