Skip to content
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

CLI function "merge" is overwriting textures with the same name #586

Closed
freddida opened this issue May 19, 2022 · 1 comment · Fixed by #677
Closed

CLI function "merge" is overwriting textures with the same name #586

freddida opened this issue May 19, 2022 · 1 comment · Fixed by #677
Labels
bug Something isn't working package:cli
Milestone

Comments

@freddida
Copy link

Describe the bug
I am using the CLI function gltf-transform merge to combine two gltf files.
When I try to merge tho files that refer to a texture with the same name (but PNG is different), the merge function overwrites the first texture.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://drive.google.com/drive/folders/17PogH2JWp7Pw8Hb_3LUS_KZ8EPusKTAN?usp=sharing'
  2. Run gltf-transform merge BoomBox.gltf BoomBox_inked.gltf merged\output.gltf
  3. Check the merged folder
  4. Note that the BoomBox_baseColor texture from the ink folder is overwritten from the orignal texture file.

Expected behavior
What I want is that the exported model doesn't overwrite textures with the same name but outputs them separately.

Versions:

  • Version: [2.1.5]
  • Environment: [Tested in CLI]
@freddida freddida added the bug Something isn't working label May 19, 2022
@donmccurdy donmccurdy added this to the Backlog milestone May 19, 2022
@donmccurdy
Copy link
Owner

Hi, thanks for reporting the issue! As a workaround, if you have the option of outputing to a .glb instead of .gltf I believe it will avoid this problem. The error occurs when writing to disk, since both images have the same URI basenames (e.g. BoomBox_normal.png) and the I/O classes do not create separate directories for the textures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working package:cli
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants