Spine watches your images folder and reloads image files that change. That never changes attachment positions. It may change mesh UVs, but if so Spine will show you a dialog asking what you want.
The image for a region attachment is drawn so the center of the image is at the region attachment position. If you change the image size, the new image is centered and it may appear that the region attachment has moved, but it has not. If you want to use placeholder art, you can make it large enough to contain whatever the final art will be. That way your placeholder and final art images can be the same size and so will be positioned the same when centered at the region attachment position.
The position of mesh attachments is a list of mesh vertices. Each vertex has a position. Like the region attachment position, those are never moved automatically from changing the image size. Each vertex maps to a position on the image, called a UV or "texture coordinate". The image is stretched so that the UV is under each vertex, allowing you to move a vertex to deform the image. UVs are stored as a percentage of the image dimensions, eg 30%,20%. This means when you resize an image, the UVs stretch too. If you resized the image only to add whitespace around the edges then you don't want the UVs to stretch
that is what answering Yes
on the dialog linked above is for. If you answer know, then Spine changes nothing and continues using the same UV percentages. If you do answer Yes
, you can use undo to undo the UV adjustment so you can better understand the change that is made (look in Edit Mesh
mode, with Deformed
unchecked).
For placeholder art you might want to use region attachments, only making a region attachment into a mesh attachment when you have final art. It's still useful to understand how updating mesh images works, as final art is seldom actually final. 🙂
One way to have your attachment images large enough for future art is to not trim whitespace. Every image will be full size, with lots of whitespace. This will work fine in Spine, which is smart about making selections. When you pack an atlas at runtime, you can use whitespace stripping so the large images don't take up any extra space.
If you prefer more control over the size of each of your attachment images, you can use layer masks:
https://github.com/EsotericSoftware/spine-scripts/tree/master/photoshop#layer-masks
I like the idea of the PhotoshopToSpine script writing some extra data to the JSON file. We've done that in the latest script, v7.31. Spine just ignores the extra information.
"PhotoshopToSpine": { "scale": 1, "padding": 1, "trim": true },