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

Rename Files for their actual formats #35

Open
2 tasks
BenjamenMeyer opened this issue Sep 13, 2021 · 4 comments
Open
2 tasks

Rename Files for their actual formats #35

BenjamenMeyer opened this issue Sep 13, 2021 · 4 comments
Labels
Milestone

Comments

@BenjamenMeyer
Copy link
Member

There are a number of files that have the incorrect file extension so the filename can be misleading.

  • Textures should be *.dds instead of *.png
  • Sprites should be *.spr

There may be others too.

@BenjamenMeyer BenjamenMeyer added this to the 0.9.x milestone Sep 13, 2021
@BenjamenMeyer
Copy link
Member Author

@ermo did a tool for PWCU to help with some of this. He's a good resource for some of these changes.
We may also need to change some hard coded stuff in the assets/engine too.

@ermo
Copy link

ermo commented Sep 14, 2021

As I said in the main gitter channel, the various image libraries in the VS engine already know how to decode based on the actual content of the files regardless of their extension. To wit, if this hadn't worked, then none of the current assets that are actually DDS encoded would've been able to load as their extension is currently .png.

Hence, it may make more sense to simply rename all image files foo.image and then update all sprites to reference the relevant foo.image files?

@ministerofinformation called this virtualised file types FWIW.

In the future, @ministerofinformation also suggested that we might tack on extra .image prefixes such as bar.stereo.image to provide more context in the file name.

@BenjamenMeyer
Copy link
Member Author

So my main objection to just .image is support tooling outside VS - GIMP, etc - that might not like using .image.

  1. It's not as intuitive
  2. Some programs make it harder to open if not using their recognized naming patterns
  3. Some operating systems (Windows) and even desktop environments use file extensions to register applications

So while VS itself may be fine; we do also need to consider the tooling and environments that contributors will be using.

Also, bar.stereo.dds is just as good as bar.stereo.image and will be recognized by tooling easier to recognize or filter via their Open Dialog filters.

@ermo
Copy link

ermo commented Sep 15, 2021

All fair points.

In that case, I think the sanest approach is to build a small python-tool (for distribution with the engine), which can take a look at a known list of (image) extensions, check their magic type and rename the extension to the proper format and update sprites accordingly? Possibly with a --report or --dry-run flag that allows asset maintainers to check and verify that no booboos have crept in unnoticed.

This is predicated on the idea that having to manually edit and change stuff which can be trivially machine checked/verified/changed is not a good use of maintainer time.

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

No branches or pull requests

2 participants