mapeditor / tiled

Flexible level editor
https://www.mapeditor.org/
Other
11.05k stars 1.75k forks source link

Move art assets into 'asset' folder #3769

Open webb-version-control opened 1 year ago

webb-version-control commented 1 year ago

It's frustrating having to manually move art assets into the Tiled asset folders before importing them into the Tiled Project. This problem arises when using Tiled in a git repo as part of a CI pipeline where the file paths to asset files must originate inside the Tiled project.

A solution I would love to see is an option to automatically copy any imported art asset tile sheet or object, into the asset folders.

This would help art/environment teams manage a single 'bible' for art assets used in Tiled without fear of importing from a path on their local machines into the git repo.

bjorn commented 1 year ago

Right, the support for projects in Tiled is still relatively new, but if a project is loaded, it would indeed make sense to warn when assets are selected that aren't in any current project folder, and to provide a quick way to have those assets be copied over. This would require a way to configure a default location if we want to avoid needing to choose the location within the project every time.

eishiya commented 1 year ago

It would be nice for this to extend to File references in custom properties rather than only those assets actually loaded by Tiled, and to be able to configure the destination location based on file type, so e.g. images go in /images/ and referenced text files go in /scripts/ or something. The UI for this could perhaps be a table where you can add rows for pairs of <location, list of file extensions>.

I have a pretty solid habit of sorting my files correctly before I use them, perhaps because I make my own, but I've noticed a looot of users who download stock assets tend to just use the default downloads folder instead of putting them directly where they belong, and this feature would help them a lot I think.