nimbling

Hey y'all!
• Can we make a forum area dedicated to command line export?

Speaking of command line export :)

• We really need a way to export skins to their own atlas. For some files, at runtime, I only want to load the skin I need, not everything in my spine project.

• When exporting per skin, we'd like an option to put all the "default skin" attachments into said skin atlas (We have trouble getting our phaser web runtime to use multiple atlas pages). And hey, if it fits, it's an atlas less to ship.

The current advice to "use the folder packing" and somehow manually strip things we don't need is very cumbersome, and when I'm searching the forums I see the conversation being more about "why" - and offering elaborate workarounds while there's a clear need, asked for the first time four years ago: http://zh.esotericsoftware.com/forum/Export-just-one-skin-5494

We're a bit stuck right now. We're upgrading spine and cleaning house in the process, but this feature would make our life a lot easier, and we're just puzzled why it didn't make it in yet.

I'd suggest something along this line:
spine -i spineproject.spine -splitskins -adddefaulttoskin -o folder -p texture_export_settings.json
where the folder would the contain all atlasses split by skins, and because of the -adddefaulttoskin flag would also contain the default skin in them.

I know it's a big ask, but I see more people struggling with the same thing and having trouble wording their needs, as it's complicated. Thanks for having a look!
User avatar
nimbling
  • Posts: 177

Nick

+1
I will be facing similar situation soon. Native support within spine would be very helpful.
Nick
  • Posts: 151

Nate

nimbling wrote:this feature would make our life a lot easier, and we're just puzzled why it didn't make it in yet.
You could replace the feature you want with any one of thousands of features. ;) There's a lot to do and we can't do everything at once. Things that have a workaround must be prioritized below others that don't. Some releases are a smattering of relatively small features like this, others focus on big features (and usually still include many smaller features). We are currently focused on a curve editor for Spine and the things needed to support it. I guarantee it will be an amazing addition.

I agree it would be a good feature to be able to pack images based on skins. Since we don't have that yet, all we can offer at this time are workarounds.

If you dump lots of images into your folders, you can "clean" the folders by packing and unpacking an atlas (just don't use PMA), leaving you with only the files your skeleton uses.

If you organize your images using folders for each skin, you can pretty easily pack each one into its own atlas using the command line export. If you want to include the images not in any skin into each skin atlas, you can simply copy your skin and non-skin images into a temporary folder and pack them there. You can write shell scripts to make this easier or include it in your application's build system.

I think it is easiest to manage your images using folders but for other needs you could write a tool that parses the skeleton JSON and does something for each image based on what skin it is in. That could be copying it somewhere for packing or anything else you like.
User avatar
Nate

Nate
  • Posts: 9839

nimbling

Thank you. Again. And again. And again :)

We're also super looking forward to that curve editor! (Separate X & Y?) (I've been keeping an eye out on that sweet Spine: Changelog: v3.9.00 beta ;)

I'll give the pack/repack flow a shot, thanks for that! We ran into some complications with multiple skins, multiple skeletons, multiple animations, unity / web / stuff.

We're going to try a sneaky image swap in materials in the unity UI, and for exporting just rely on me manually prepping our export files before pulling them through our build scripts.

Given this bigger picture (yay curves, yay huge backlog ;) we're unpuzzled as to why it's not in yet, and just glad it's on your radar somewhere :)

Keep up the good work!
thank you :)
User avatar
nimbling
  • Posts: 177

mfedorov

As an option, mark attachments as belonging to the atlas 1, 2, 3, etc. Will be comfortable.
User avatar
mfedorov
  • Posts: 262


Return to Editor