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

Packing two images with the same name but different paths will omit one of them #131

Closed
Rubonnek opened this issue Jun 12, 2022 · 3 comments

Comments

@Rubonnek
Copy link
Contributor

Just as the title says, packing two images with the same name but different paths will omit one of them.

For example, adding the following two PNGs individually to the pack files list:

same_name_but_different_textures
├── same_name.png
└── subdir
    └── same_name.png

and then packing them, will omit one of the images in the emitted atlas. I expected a warning or an error but that was not the case.

Archive used in the example above: same_name_but_different_textures.zip

@agvoron
Copy link

agvoron commented Jun 12, 2022

I don't maintain this repo, just happened to be playing with it today. See the flattenPaths option. "If true, subdirectory prefixes are stripped from image file names. Image file names should be unique." Maybe that's what you're looking for.

https://libgdx.com/wiki/tools/texture-packer

@Rubonnek
Copy link
Contributor Author

Thanks for mentioning it. I did test the flatten paths option before opening the issue and the same happens with it enabled. Disabling the path flattening will make both images show up in the atlas.

I don't mind the behavior, but omitting these images shouldn't happen silently.

@metaphore
Copy link
Member

Hi @Rubonnek
Thanks for the report.

In fact the warning is present, but it is only visible in the output console
image

The app's behavior is to halt the packing process and display the output only on errors. Warnings are more or less go silent. I think it's a good idea to somehow at least notify the user about them.

WIll add this to the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants