-
Notifications
You must be signed in to change notification settings - Fork 64
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
Handling of duplicate URIs #115
Comments
In many ways, I see glTF-Transform as ... "a source of inspiration" at least, but often as a reference for sensible ways of approaching things like this. And I just tried it - i.e. creating a Now, the conceptual handling of images and textures in glTF-Transform is a bit special, and "structurally different" to a verbatim translation of glTF itself. There is no texture0.setURI("test.png");
texture1.setURI("test.png"); Writing that out will also overwrite the "file" (resource) of the first texture with the data from the second. Sooo... one could just say that this is the behavior that the user has to expect when doing something like this... However: When no URIs are assigned explicitly, then they will be assigned automatically. And by default, the URIs are (Now... glTF-Transform is doing many things right, but ... how can one start counting at After seeing that, I followed my usual behavior of "being nasty", and tried //texture0.setURI("test.png");
texture1.setURI("texture_1.png"); and this also causes the first texture to be called For JglTF, one overarching question is whether any deduplication should happen in the model, or only at the time of writing. Both could have undesired implications, so there might not be a silver bullet. However, when using Maybe I'll just close this... |
Just a back-pointer to a related question in the glTF repo: KhronosGroup/glTF#2446 |
Right now, it is not clear how duplicate URIs should be handled.
For example:
ImageModel
objects (and add them to a model/builder)image.png
The latter is happening silently and certainly not desired.
Simply appending some
_0
suffix to the file name might be a reasonable solution. But different mechanisms could be considered...(Note: The same might apply to buffers - to be verified - but for images, it is much more apparent)
The text was updated successfully, but these errors were encountered: