• Editor
  • PSD Import feature request: bone length/rotation tags

Would it be possible to add something like [bone_len:x] and [bone_rot:x] tags to allow defining the bone length and rotate in a PSD? We have a lot of characters that we do regular clean imports as their art gets updated and it would save a lot of time by not having to do the changes in the editor every time and have them come in during the PSD import.

Thanks!

Related Discussions
...
  • Editado

Currently, Spine does not support tags like [bone_len:x] and [bone_rot:x] for defining bone length and rotation directly in a PSD file. The existing workflow involves using the [bone] tag to create bones at the center of layers during the initial import, and then adjusting bone properties such as length and rotation within the Spine editor.

The PSD can't have all features that the editor has -- we have to draw a line somewhere. How would you know what bone length to set? The PSD is not a great place to specify that information. For the same reason we don't have bone position, rotation, scale, or shear in the PSD, so length probably also doesn't make sense.

How would we know what bone length to set? From trial and error. As I said, we do clean re-imports regularly so we can just put the values we use in into the tag. Yes, position would be tricky because it rarely is ever whats intended, but the other values do actually make sense because they wouldn't really change. It could be a generic tag like [param:bone,len,10]. It's just an import tag like others that would give useful value and avoid having to do some json export -> custom script -> json import round trip process after every import. But sounds like that's something we'll have to do but would prefer to avoid if possible.

To be clear, we're open to being convinced, I just explained my current thoughts on it and the reasoning why.

Can you explain what you mean by clean re-imports? You import into a new project? That will of course lose all the editor work that has been done. I'd like to understand why you'd do this to better support your workflow.

Our intended workflow is to Import PSD into an existing project to update and create images and other items, most often with Replace existing unchecked. You shouldn't need to start over in a new project.

When doing that you will need to manage a couple things:

  • Image files on disk from previous imports will by overwritten if the PSD has the same names. However, if you renamed things, the image files will get new names and the files with the old names will remain. You can delete all the image files and folders created Import PSD, then run Import PSD and it will create only the image files used. We're considering writing metadata to the image files and a setting that would delete all Import PSD generated image files before creating new files. Alternatively, you can pack an atlas (turn of PMA) using Attachments and then unpack it to a new folder to obtain only the image files in use.
  • Similarly, if you renamed slots, attachments, bones, etc then the old items will still be in your project. You'll need to delete them to keep your project clean.

These things you need to delete manually are only if you are renaming things.

Note that currently Import PSD creates bones, but if bones already exists, it does not modify them, even if Replace existing is checked.

12 dias depois

Yes, we do clean re-imports, because we sometimes rename/change/re-parent things and its actually quicker to do a clean import than to have it break an existing rig and try to fix it. Most of the characters share animations, so we just import them from another project so it works pretty well.

We'll probably have 100+ individual characters in this game so I'm looking into automating as much as possible to save time.