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

[Feature request] Export image with its name rather than just the GLTF's name + number #220

Open
MeltyPlayer opened this issue Mar 2, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@MeltyPlayer
Copy link
Contributor

One small issue I've noticed with SharpGLTF is that it exports satellite images as [GLTF name]_0.png, [GLTF name]_1.png, etc. rather than using the name passed into ImageBuilder.Name. I noticed that this is because of the following line in the export logic:

var iname = this._images.Count != 1 ? $"{baseName}_{i}" : $"{baseName}";

I was hoping to request that the actual name be used instead, only falling back to the number approach if the name(s) were null.

@MeltyPlayer MeltyPlayer added the bug Something isn't working label Mar 2, 2024
@vpenades
Copy link
Owner

vpenades commented Mar 4, 2024

This is not as trivial is it might look.

The reason because the library renames the images is because there's case scenarios (embedded images) where the texture file names are lost, and the library needs a unified way of handling texture names on export for all cases.

In fact, the code line you highlighted, and depending on the context, there is no guarantee to have texture file names at all.

it is doable for the use cases when texture names do exist, but it would require a case by case solution.

@vpenades vpenades added enhancement New feature or request and removed bug Something isn't working labels Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants