EsotericSoftware / EsotericSoftware/spine-editor

PSD Import: Retain the existing mesh if the image shifts but the size stays the same

Open
#894 1 comment 0 reactions 1 assignee Claimed by @davidetan View on GitHub
enhancement
Dominant language
No language data
Stars
33
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Currently, when importing a PSD with the "Replace existing attachments" option selected in the "Import PSD" dialog and the position and size are identical, the layer can be imported while retaining its mesh and weight settings. However, if the size is the same but the position is different, the mesh cannot be retained and will be turned into a region attachment. This can be inconvenient for workflows where you first confirm the layout in the PSD and then animate the images in Spine.

This issue can be reproduced by the following steps:

1. Download the attached .zip file: [flower.zip](https://github.com/user-attachments/files/20276249/flower.zip)
The contents of the .psd file are displayed in Photoshop as follows (The grid is only displayed in Photoshop options and does not exist as an image):
![Image](https://github.com/user-attachments/assets/26be8bd9-90cb-470b-b20e-e8951bbbc60e)
1. Open the latest Spine Editor and import it from PSD Import:
![Image](https://github.com/user-attachments/assets/01a26f00-1a60-461b-9c98-698cd335c1da)
1. Select the `flower` attachment, check the Mesh option in the properties section, and then set the vertices using `Edit-Mesh -> Trace`.
![Image](https://github.com/user-attachments/assets/c3b22f75-0330-4aee-a17f-7b1eb82a6e36)
1. Return to Photoshop and move the flower layer:
![Image](https://github.com/user-attachments/assets/0eb7133c-ee0f-4539-8c5e-085ea711ac73)
1. Return to Spine and re-import the PSD, making sure the `Replace existing attachments` checkbox is checked.
![Image](https://github.com/user-attachments/assets/459352a4-d27f-4ad4-837a-322f8837bbcd)
1. The image is positioned correctly, but the mesh settings are cleared and become a region attachment.
![Image](https://github.com/user-attachments/assets/6964af90-431a-499b-82d2-13cbf952ebf7)

This behavior has been around for a long time and is expected, but there is room for improvement in future versions.

Related forum thread:
https://esotericsoftware.com/forum/d/28660-spine%E5%AF%BC%E5%85%A5json%E6%95%B0%E6%8D%AE%E4%BC%98%E5%8C%96%E5%BB%BA%E8%AE%AE

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.