Pixelorama Command Line Interface #579
Replies: 2 comments 2 replies
-
I'm adding some notes, as I've been doing research on this in the hopes that someone would get enough to work. Here is a discussion about parsing command line arguments in a game: https://www.reddit.com/r/godot/comments/bomjhc/is_there_any_way_to_pass_arguments_to_the_game/ Here is a version of Godot Server that we could use to run headless. I have no idea if godot has code to determine if we are running via server or a normal version of godot. https://godotengine.org/download/server What I am not sure about is whether we can use the same pixelorama project and run it headless based on command-line arguments. I took a look around to see if I could find another godot project that has similar capabilities, but didn't find anything. |
Beta Was this translation helpful? Give feedback.
-
Ideas for CLIUsagepixelorama [command] [flags...] [files...] Passing no flags or commands would print data about pixelorama (version, help, etc.) Example usagesCreating# create a gif scaled by 200% of frames 4-8 of total frames with a "backwards"
# animation direction, taking frames made in "example.pxo", and outputing as "example.gif"
pixelorama -t image -f gif -d backwards -r "4-8" -s 2.0 example.pxo -o example.gif # create a gif from list of png files
pixelorama -t image -f gif *.png -o example.gif # create a spritesheet from list of png files (assuming they are ordered e.g.`file_01` comes before `file_02`)
pixelorama -t spritesheet ./frames/*.png -o example.gif Extracting information# get dimensions of a single frame from project file
$ pixelorama --framesize example.pxo
16x32
# get dimensions of a spritesheet from project file
$ pixelorama --size example.pxo
128x64
# get total frames from project file
$ pixelorama --framecount example.pxo
8 CommandsMaybe instead of the
Flags
This is just an idea. More can be added, removed, or modified to better fit the capabilities of the editor. |
Beta Was this translation helpful? Give feedback.
-
It would be useful to be able to use Pixelorama's functions directly from the command line, like this https://www.aseprite.org/docs/cli/. I imagine it would help a lot with automation.
It should be possible to do given that Godot has an
OS.get_cmdline_args()
method for running projects with command line arguments.Beta Was this translation helpful? Give feedback.
All reactions