Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sprite user data when exporting documents #4294

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

skypjack
Copy link

@skypjack skypjack commented Feb 3, 2024

I agree that my contributions are licensed under the Individual Contributor License Agreement V4.0 ("CLA") as stated in https://github.com/igarastudio/cla/blob/main/cla.md

I have signed the CLA following the steps given in https://github.com/igarastudio/cla#signing


As discussed here on discord, sprite user data are not exported when creating the json file.
This PR adds them to the "meta" section, as in:

 "meta": {
  "app": "https://www.aseprite.org/",
  "version": "1.x-dev",
  "image": "test.png",
  "format": "RGBA8888",
  "size": { "w": 64, "h": 64 },
  "scale": "1",
  "documents": [
   { "name": "test.aseprite", "data": "my data" }
  ],
  "frameTags": [ ... ],
  "layers": [ ... ],
  "slices": [ ... ]
 }

I've no idea if this is a correct result for the spirit of this software but I had to start somewhere, right? 馃檪
Let me know if this doesn't meet your tastes and what I can do to have this data in the final json.
I find this data to be pointless otherwise since one cannot export and thus use them properly.

@skypjack skypjack requested a review from dacap as a code owner February 3, 2024 23:34
@dacap dacap self-assigned this Feb 6, 2024
@dacap
Copy link
Member

dacap commented Feb 6, 2024

Hi @skypjack! thanks for your contribution, I have to think a little more about the output format. For a one sprite -> sprite sheet, it looks like a "data" field instead of the "documents" might be preferable.

For multiple sprites -> texture atlas, at the moment we have the same issues with tags/layers/slices info from those multiple sprites/docs. Not sure what would be the best solution in these cases.

@skypjack
Copy link
Author

skypjack commented Feb 7, 2024

Let me know if you want me to change anything in the PR. 馃憤

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants