AssimpImporter: Fix loading of embedded textures from FBX files#128
Merged
mosra merged 2 commits intomosra:masterfrom Aug 8, 2022
Merged
AssimpImporter: Fix loading of embedded textures from FBX files#128mosra merged 2 commits intomosra:masterfrom
mosra merged 2 commits intomosra:masterfrom
Conversation
Signed-off-by: Squareys <squareys@googlemail.com>
bb255f4 to
60a8a4e
Compare
Signed-off-by: Squareys <squareys@googlemail.com>
60a8a4e to
8e92178
Compare
Contributor
Author
|
linux-arm64 failed with |
Owner
|
Thanks! Especially for the extra care to put the test in an earlier commit. Merged with one minor change -- I just made the |
Contributor
Author
|
Amazing, thank you! 🎉 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @mosra,
As promised, here's the fix for #127 .
The test file was created with Blender 3.1.0 as follows:
The file now has the absolute path of the PNG embedded (C:/Users/Squareys/Desktop/embedded.png), similar to how I've seen it in "real world files", but the image data is embedded, so the loader doesn't actually access this file ever. This was ensured by renaming the image file and opening it with the Windows 3D viewer, the texture was still correctly displayed.
The test was added first, to ensure this was actually the culprit, it fails on the
imageexpression, i.e. image was not found, exactly what I was observing in #127.Since the
GetEmbeddedImage()was added with 5.0.0, I kept the legacy path behind theASSIMP_IS_VERSION_5_OR_GREATER, but I did not test the code (really hoping the CI does this, would be a hassle to set upthe CI is testing this, luckily).I double checked the drive-by std::string => StringView/String changes, let's hope that won't blow up in my face like on the EmscriptenApplication 😅
Looking forward to the review!
Best,
Jonathan