"Remove Unused Tilesets" export option
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 12.9k
- Forks
- 2k
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 8
Description
It is usually a waste of space and parsing effort to deal with unused Tilesets in production maps, but it may be useful to leave the references in the working files. To solve this issue, it would be great if Tiled had an export option that removed unused tilesets.
There's a script available to remove unused tilesets, but it doesn't fully solve the problem: it affects the working map as well, and Tiled scripting has no good way to only affect exports. The script could be modified to re-add the removed tilesets after the asset has been saved, but then the order of tilesets will be changed, and the order is important for some engines.
This was requested by mingw on Discord.
Well, more accurately, they requested that Tiled should (provide the option to) remove unused tilesets automatically when tiles are removed. I think in practice this would be quite annoying, so I think an export option is better. If a user actually wants tilesets removed from their working map, the script linked above can be used to automatically remove tilesets on save, which should be less annoying than doing so whenever tiles are erased/replaced.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked remove-unused-tilesets.js script first, then trace Tiled's export handling to find where an export-only option could fit. Done means exported maps omit unused tilesets while working files retain their references and original tileset order.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- desktop, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100