• Editor
  • [PSD Import] Ruler Origin is not definable in other apps

Problem: Popular art applications like Clip Studio Paint, Krita, and Procreate can save as PSD and edit PSDs but don't have the option to define a ruler origin of a PSD.
In fact, when you re-save a PSD in Clip Studio Paint, the ruler origin information is lost.

This isn't a huge deal if you only had to import the PSD once, but if you had to edit or add several new parts, it would get really annoying.

Is there an alternate way to define the position origin for a PSD meant for Spine?

If not, can we have something like a new layer tag like [origin] which can just get it as the top-leftmost pixel or border of that layer?
So the user can just make a 1 pixel marker or rectangle or whatever is easiest in their application, and it'll be good enough and resilient against 1. changes in crop/canvas size 2. swapping between apps 3. not even having rulers available (Procreate)

Related Discussions
...

Yes, there is an alternate way to define the position origin for a PSD meant for Spine. In Spine 4.2.10-beta and later, you can use the first X and Y guides in the PSD to define the world origin in Spine. This method ensures that the origin remains consistent even if the PSD is edited in different applications. However, not all software that exports in PSD format stores guides in the file.

To address this, Spine has an [origin] tag. This tag allows you to set the world origin in Spine using the center of a layer with [origin] in its name. This method is more resilient against changes in crop/canvas size and swapping between applications. You can simply draw an X or any mark on a layer named [origin], and the center of that marker will be used as the origin.

For example, you can name a layer [origin] and draw a vertical line 5 pixels tall and another 5 pixels wide centered on the first. The intersection of these lines will be the origin. This approach is easier to hide and less dependent on the software's ability to save guides.

Here is a summary of the methods:

  1. Using Guides: Set the first X and Y guides in the PSD to define the origin.
  2. Using [origin] Tag: Name a layer [origin] and place a marker (e.g., an X) to define the origin.

These methods ensure that the origin remains consistent and are resilient against changes in the PSD file.

That bot reply was just confusing.

The bot nailed it, except it thought the [origin] tag was not yet implemented. It's there and ready to use in the latest 4.2. It's as you requested, except using the center of the origin layer rather than a corner pixel.

Score! Even better than I suggested.

Is this documented somewhere?

We have almost finished the documentation for import PSD. We actually had the documentation complete, then recently decided to make some changes on how things work. The dust has settled on that now. I'll check with Davide on how close we are to publishing the docs.

Until then, it's very similar to the PhotoshopToSpine script. It has all those features plus some very useful new ones like:

  • [name:value*], [slot:value*], [bone:value*], and [path:value*] patterns for groups. Layers in the group get a name/slot/bone/path from the pattern with asterisk * replaced by the layer name. The asterisk can be anywhere, eg [slot:val*ue]. You can nest multiple patterns too.
  • [!name], [!slot], [!bone], and [!path] for when you don't want a pattern to apply.
  • [bones] on a group is equivalent to adding [bone] to each layer in the group.
  • Probably other things. It's late and Davide is the wizard behind import PSD!

One last thing worth mentioning, if you use Photoshop (you probably don't but maybe others do) and you want to use features that can't be supported outside of Photoshop (adjustment layers, layer styles, etc) then you can just wrap your layers up in a "smart object". That causes Photoshop to store in the PSD the rasterized hard-to-support-effects and then Spine's import PSD will be able to read it just fine.

Aye, the forum search is quite bad. 🙁 I know things exist and still can't find them. It is supposed to improve in the next major version.

The "related discussions" is powered by the same fancy AI stuff Spinebot uses and works well.