- Uređeno
Photoshop Script "Layer name is not a valid attachment name"
Hi, I'm getting the same problem for all my layers when I try to export them via the script. I've used the program before and it usually works, so now I don't know what I've done wrong.
Pro Spine version 3.7.94
Script version 3.8. (via the download)
Photoshop CS 2.
Here is a picture of the layout in PS. (attached).
Can you help me? Thanks!
Here's the errors.txt
Layer name is not a valid attachment name:
backLeg2Up
Layer name is not a valid attachment name:
backKnee2Stretch
Layer name is not a valid attachment name:
backFoot2
Layer name is not a valid attachment name:
backLeg2Down
Layer name is not a valid attachment name:
frontFoot2
Layer name is not a valid attachment name:
frontLeg2Down
Layer name is not a valid attachment name:
frontLeg2Up
Layer name is not a valid attachment name:
shoulder2
Layer name is not a valid attachment name:
Tail
Layer name is not a valid attachment name:
backThighStretch
Layer name is not a valid attachment name:
backFoot
Layer name is not a valid attachment name:
backLeg1Down
Layer name is not a valid attachment name:
backLeg1Up
Layer name is not a valid attachment name:
backKnee1Stretch
Layer name is not a valid attachment name:
frontFoot1
Layer name is not a valid attachment name:
frontLeg1Down
Layer name is not a valid attachment name:
frontLeg1Up
Layer name is not a valid attachment name:
neck
Layer name is not a valid attachment name:
shoulder1
Layer name is not a valid attachment name:
earBack
Multiple layers for the "default" skin have the same name:
y
Rename or use the [path:name] or [ignore] tag for these layers.
Layer name is not a valid attachment name:
antBack
Layer name is not a valid attachment name:
head
Layer name is not a valid attachment name:
antFront
Layer name is not a valid attachment name:
earFront
Multiple layers for the "default" skin have the same name:
y
Rename or use the [path:name] or [ignore] tag for these layers.
The latest script is 2.6. You can open the script with a text editor and you'll see var scriptVersion = 2.6;
near the top. Can you try with the latest script? You can right click this link and Save Link As
:
https://raw.githubusercontent.com/EsotericSoftware/spine-scripts/master/photoshop/PhotoshopToSpine.jsx
That's the script I have.
But in the link you supplied (if I click on it and view it) it actually says the script version is 3.8.
var scriptVersion = 3.8; // This is incremented every time the script is modified, so you know if you have the latest.
Is that an issue?
Ha, you're right, no idea where I got 2.6. I think it was because I am on a different computer and haven't updated it for a long time.
Your layer names look fine, of course. I'm guessing CS2 doesn't properly support the regex the script uses. Can you please try replacing this line:
name = name.replace(/[\x00-\x1f\x80-\x9f\\\/:"*?<>|]/g, "").replace(/^\.+$/, "").replace(/^__drag$/, ""); // Illegal.
With this:
name = name.replace(/[\\\/:"*?<>|]/g, "").replace(/^\.+$/, "").replace(/^__drag$/, ""); // Illegal.
That worked, thanks!
Yeah, I'm still using CS2
as I imagine others are
so if possible, for future updates, maybe give us that line again and where to change it, or a different version. In any case, thanks for the help!
Great! It's pretty unlikely that the part that CS2 chokes on is really needed, so we'll just change it.