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

Remove double quotes in the mtl and texture paths #297

Merged
merged 2 commits into from
Oct 9, 2023

Conversation

chetan-set
Copy link
Contributor

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.

This pull request sould fix this isse.

@lilleyse
Copy link
Contributor

lilleyse commented Oct 6, 2023

@chetan-set looks good. Could you update CHANGES.md?

@chetan-set
Copy link
Contributor Author

Hi @lilleyse. Ok sure, I have added the change to Changes.md

@lilleyse lilleyse merged commit 3704326 into CesiumGS:main Oct 9, 2023
@lilleyse
Copy link
Contributor

lilleyse commented Oct 9, 2023

Thanks @chetan-set

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