Commits
Click on a commit to change the comparison rangefix: prevent duplicate image buffer data on export
When find_or_create_image was called for an image that already existed
in image_name_to_index_dict, the function would still:
1. Create a new bufferView
2. Append the image bytes to buffer0
3. Only then check if the image already existed
This caused exported VRM files to contain duplicate image data, with
orphan bufferViews that were never referenced. The file size would
grow significantly - in one test case from 48MB to 150MB+.
The fix moves the existence check to the beginning of the function,
returning early if the image has already been processed.
Fixes #579