BartNT

With command line export (also with json config file) the name of exported files are based on skeleton name from the project. I cannot find any way to change it without modifying project and manually changing skeleton name. Am I wrong?

Nate, can you consider adding additional command line parameter (or property in export config json) for setting custom name of exported files? It will help to keep game project better organized without modify source spines from artists.
BartNT
  • Postovi: 2

Nate

Projects can have multiple skeletons, so it doesn't make sense to export a project to a single file. Exporting a project can produce multiple files, that's why the output is a folder.

Maybe you can script what you want: export to a temp folder, then rename any .json or .skel file in that folder as you like.
Avatar
Nate

Nate
  • Postovi: 11531

BartNT

I see. I forgot about the possibility of having many skeletons in one project, so it is little more complicated.

In our typical scenario we have only one skeleton per spine project, for example:"dragon" and export for unity produces these files:
dragon.skel.bytes
dragon.png
dragon.atlas.txt
I can export to temp dir and rename these files to boss.* but I have to also fix the reference to image in atlas.

As an elegant solution I suggest to add something like this to export settings JSON:
"outputNames": [] // without renaming
"outputNames": ["boss"] // rename first skeleton to boss
"outputNames": ["boss1", "boss2"] // rename two skeletons etc.

What do you think?
BartNT
  • Postovi: 2

Nate

You can set a name for the atlas, so then you'd only need to rename the data file:
Spine -i <path> [-j <path>]... -o <path> [-n <name>] -p <path>
If you are packing as part of data export, you can easily pack separately. Hmm, unless you are using the option to pack only the attachment images that are in use, that is only available as part of data export.

Options in the export setting JSON are a possibility, but relying on the position isn't great. Might be better to allow a single name in the JSON, and error if there is more than one skeleton.

Really the best solution is to have your animators name their skeletons appropriately. :)
Avatar
Nate

Nate
  • Postovi: 11531


Natrag na Editor