Updated tilesheet UI to support Sparrow atlas files. #2745
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current implementation of Tilesheets in Armory is very limited. It only provides support for grids of square sprites, and playing a range of frames from the grid in order. This is highly inefficient, as it does not allow the spritesheet to be optimized or frames to be reused.
This pull request implements user interface support for the Sparrow sprite format, which associates an XML file with the spritesheet, which looks like so:
These spritesheets can be generated by programs such as TexturePacker or Adobe Animate.
Developers can then specify frames by prefix, for example the Walk animation will use the frames with the name
walk
, in order.Care was taken to ensure only relevant options to the current atlas format display to the user, so the user is not prompted for a file when in Grid mode.
There is also room to add additional file formats as users request them.
TODO
Note
This pull request is associated with armory3d/iron#182, and will not function as intended without it.