Skip to content

Python3#1

Open
stijnstijn wants to merge 3 commits intoFOTMarut:masterfrom
stijnstijn:python3
Open

Python3#1
stijnstijn wants to merge 3 commits intoFOTMarut:masterfrom
stijnstijn:python3

Conversation

@stijnstijn
Copy link

@stijnstijn stijnstijn commented Apr 13, 2020

I rewrote the import and export scripts. They're now more simple and take advantage of a few libraries to streamline e.g. command-line argument parsing.

There are backwards-incompatible changes that may make you not want to merge this PR. The scripts require Python 3 now (probably, I haven't tested them with Python 2). The folder and file structure has also changed. I think the new structure makes things more flexible - instead of requiring a very specific file naming convention, files are simply imported according to their alphanumeric order, so you can use whatever file names you want for your sprites.

Instead of storing hotspot, coldspot, etc in the file names, each animation now has a single .settings file that defines these properties for all frames as a yaml file. This has the advantage, for sprites that share a common origin or coldspot across multiple frames, of being able to define one 'default' set of properties. This can be overridden on a per-frame basis, and changing them is now done by editing a single file instead of having to rename each individual frame's file.

I like this better and think it's more flexible. But YMMV and, as said, it breaks backwards compatibility. So I understand if you prefer the old way of doing things, in which case I'll just maintain my own fork.

- Use argparse to interpret command-line arguments
- Change output file and folder structure
- Require Python 3
- Add requirements.txt
- Add parameter for palette file to use
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.

1 participant