-
-
Notifications
You must be signed in to change notification settings - Fork 391
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
Images are not saved to disk properly #473
Comments
Confirmed the issue. Passing something like...
We may also need to add |
Thanks for the quick investigation! Your proposal looks good to me! |
Let me give some time to figure out what is best solution for |
Describe the issue
Writing a glTF that contains images referenced as uris without embedding images does not save the images to the disk next to the glTF model.
To Reproduce
OS: MacOS
Compiler: Apple clang version 15.0.0
The following unit test fails with with the latest version of tinygltf:
Expected behaviour
I would expect that the writer saves the images to the disk at the relative location described in the image uri.
Additional context
I traced this issue down to the
WriteImageData()
function that is passed toUpdateImageObject()
. This function expects theFsCallback
passed as the user data. However, the defaultwrite_image_user_data
with is initialized withnullptr
, causing the file to never be written to disk. An experimental change the initializewrite_image_user_data
with a pointer to the default FsCallback (&fs
) fixed this issue, but caused a different unit test failure.The text was updated successfully, but these errors were encountered: