Erika wroteHello Nick, did you already try the Path tag?
Hi Erika, I know about the [path] tag. It only affect the file name but the slot name still need to be unique which does not solve the issue.
The main idea of this [clone] tag suggestion is to avoid any works to maintain the layer names once the [clone] tag is added. It is more on trying to solve the repeated name issue, which usually caused by cloning a layer, than making sure the attachment is pointing to the same image.
Good try but this could be worse than renaming the layers manually. Using a separate renaming addon like this require user to select all the layers before running the batch rename process plus the naming pattern setup on every execution.
For example, if I cloned a bunch of trees, corrected their layer z-orders by scattering them in the scene PSD. After a while, I decided to add more trees some where. If I am using the rename script approach, I need to find and select all the same trees to be able to run the batch rename, which could be very difficult based on the complexity of the PSD.
On the other hand, if it is using the [clone] implementation. Nothing need to be worried. The layer just need to be the named "[clone]Tree" no matter where they are, the actual export name is generated during the export process.
Erika wroteOne reason I can think of, as to why your suggestion may not be ideal is that if the PhotoshopToSpine creates the progressive numbering on export, and you re-export, you may mess with the numbering and position of the instances.
So I think making sure your layers are organized well before launching the script is a more ideal solution.
You are right about numbering and position problem if people happen to duplicate a clone in between the existing clones and do a re-import on top of existing spine project. In reality, It is not that bad. The odd of this happening is quite low (at least from my understanding). Not to mention those [clone] layers are in theory pointing to the same cloned images. Swapping their positions shouldn't affect the result.