Closed Mickeon closed 2 years ago
Note: Not in this PR, I reimplemented for myself the trimming, but only when Sheet Type is set to "Packed", and both disk, but especially VRAM usage, seem to be a major improvement, a bit more so when combined with viniciusgerevini/godot-aseprite-wizard/pull/48, but my word can't be taken at face value, because it really depends on a lot of factors.
Thanks. I don't really use this feature, but it looks like a good improvement.
I have a question. Do you usually use more than one artifact from an import? I mean, from a single .aseprite file, do you usually export both a SpriteFrames and sprite strip or atlas texture, or when using a sprite strip you don't care about the sprite frames?
Currently, they are all options in the same importer. I was just wondering if it makes sense to split them in separated importers. That would make more sense to me, but again, I don't use the feature, and this adds the limitation that a file would convert to just one type.
Non-related to this PR though. I was just curious. hehe
I personally would have loved to split them all into different Importers, as I'm pretty sure the circumstances where you need both SpriteFrames and Texture Strip (+ TextureAtlases and AnimatedTexture that all derive from the same Texture) at the same time are pretty rare. I imagine that in those cases, it also feels like the Texture Strip should be the main imported Resource and SpriteFrames the automatically generated one. I feel like it would benefit most users by reducing bloat, but I shouldn't speak for everyone. If I knew enough about plugins for a major change I would've proposed it along with this commit, but if the decision is to deprecate the Importer it'd be swell to leave it as is, too.
To give a bit of personal experience, I've attempted to use the Texture Strip import for TileSets, Backgrounds, custom fonts. Most of the times it's one or a few more frames for a simple animation or for grouping similar images together, but it does leave a main SpriteFrames Resource which isn't exactly useful, and should it be, I could just create on my own.
This PR adds a "Sheet Type" option to the Aseprite Importer. It can be one of the following:
All of the non-default settings are optimised to not generate duplicate across the Atlas, thanks to
--merge-duplicate
, yes this is an argument.This does not typically come useful for the default SpriteFrames import, but it can be handy in when exporting a Texture Strip, as the default Packed option causes the strip to inconsistently resize when adding or removing frames. Please feel free to cherry-pick or outright discard.