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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CLI: export Sprite with a specific palette #1245

Closed
Nodragem opened this issue Sep 4, 2016 · 6 comments
Closed

CLI: export Sprite with a specific palette #1245

Nodragem opened this issue Sep 4, 2016 · 6 comments
Assignees
Labels
feature Feature request, or something should be improved
Milestone

Comments

@Nodragem
Copy link

Nodragem commented Sep 4, 2016

I made a character animation with color indexing and I use different palettes to get different types of character (e.g., purple, green, yellow).

I would have thought that the command --palette <filename> could be used to export my character animation with the color palette that I want, but it seems not to do so...

It is actually possible to do what I am speaking of for now?

@dacap
Copy link
Member

dacap commented Sep 4, 2016

Hi @Nodragem, the --palette is an old parameter used to change the default palette of the program (almost useless nowadays). You are the second user that found the same problem so I'll change the meaning of --palette parameter so we can change the palette and save the sprite with different palettes (it makes a lot more sense).

Anyway, there is a quite "hidden" feature that I made some time ago for that other user. You might try to use the script inside the attached .zip (save-with-other-palette-test.zip) and execute Aseprite in this way:

./aseprite -b --script test.js 

See the content of the test.js file. You will see that it's straight forward to change it for your needs. I hope you find it useful for your specific case.

@dacap dacap added the feature Feature request, or something should be improved label Sep 4, 2016
@dacap dacap added this to the v1.1 milestone Sep 4, 2016
@dacap dacap self-assigned this Sep 4, 2016
@dacap dacap modified the milestones: v1.2, v1.1 Sep 5, 2016
@dacap
Copy link
Member

dacap commented Sep 5, 2016

This will be available in v1.2-beta2. An example for the future usage syntax:

aseprite -b test.bmp --palette pal2.bmp --save-as test2.bmp

@dacap dacap closed this as completed Sep 5, 2016
@Nodragem
Copy link
Author

Nodragem commented Sep 5, 2016

Thank you!

Concerning the hidden feature. Are you telling me that we can simulate an Aseprite session with a javascript file? that sounds really powerful!
I did not see the --script command in the doc, I think that it should be an official feature :)

@dacap
Copy link
Member

dacap commented Sep 5, 2016

You're welcome! The --script is a little hidden because there is no official API yet, as you said, it can simulate just a few commands (also it's quite easy to crash Aseprite using the API incorrectly). There is some features with more priority at this moment like #126 and #475 which I think would be better for most users.

@Nodragem
Copy link
Author

Nodragem commented Sep 5, 2016

isn't #475 requiring the API we just spoke about?

@dacap
Copy link
Member

dacap commented Sep 5, 2016

More or less. Actions could be recorded in an XML file to execute UI commands, which then are easier to be modified/edited (so then you can edit your macro/actions step by step). Instead the API is a more text-based/scripting like set of functions that might be bigger than the available UI commands, also it could be then impossible to edit the script step by step from the UI (because that would be like refactoring the JavaScript code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request, or something should be improved
Projects
None yet
Development

No branches or pull requests

2 participants