Each cel can contain some user data associated (if you want to associate data to a frame, you could create a invisible layer called “data” and then on each cel of that layer associate the user data).
- Right-click a cel and select properties (or Frame > Cel Properties menu, or just double-click a cel)
- Click the “user data” icon in the Cel Properties dialog
- Write down what data you want to see associated to that cel:
Then the user data (text) can be accessed through the scripting API (Layer.data, Cel.data) or when exporting the sprite sheet in the JSON metadata (using -data and -list-layers).
Can this data be exported via the Export Spritesheet GUI?
Is it possible to associate data with tags, or even the whole file? I see that it’s possible to modify data for all selected cels at once, but it would be nice to avoid that redundancy in those cases where the data is shared by all the cels in a tag (and where individual cels may contain other data, making mass setting not always appropriate).
For example, I have an anchor point in my character animations that specifies where the sprites should be positioned relative to the in-game entity’s hitbox. I’ve authored my art so that this point is the same for all the frames so I can specify it more easily (by hand) prior to importing the sprite data into my game. It would’ve been more convenient to have the anchor be positioned differently for a few of the animations, and I’d love to be able to set the data within Aseprite to this end.
The Output example in the
-data documentation does not seem to contain any custom data, so I’m reluctant to mess with the feature (especially if it requires use of the CLI just to export the data).
Hello, I am using Aseprite v1.2.25-x64 and when I click the “user data” icon, nothing happens.
Hi @snarlynarwhal, remember that you can associate data to non-empty cels only:
It works! Thank you for clearing that up. I added additional feedback on the GitHub issue.