-
-
Notifications
You must be signed in to change notification settings - Fork 19.9k
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
Fix GLTF texture filename decoding #57685
Fix GLTF texture filename decoding #57685
Conversation
There's another |
I think |
Oh I meant import has a flow and then export has one. I only saw one in this pr. |
aac95d5
to
47b8060
Compare
@fire was right, there was another similar case in I force pushed a rebase to include it, fix another typo, and switch to |
47b8060
to
f66200e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with the attached project, it works fine 👍
Thanks! |
Cherry-picked for 3.4.5. |
This PR backports a specific fix to gltf filename decoding. GLTF files uri-encode references to external filenames. When importing into Godot, if the filename or a directory have any special characters, Godot fails to find the file. The solution is to decode the uri before looking for the file. On the master branch this is done using
String::uri_decode
but this is not available on 3.x. For these versions, and in this PR, I usedString::percent_decode
which covers most of the cases of uri encoding for GLFT files.A more complete solution would be to backport the
String::uri_(en|de)code
methods and use those.Test Project
gltf-tests.zip
Output without this PR: