- 編集済み
Export to Photoshop script bugs
Bug.1
Not sure if the error is due to empty group or a group and a layer having the same name or both conditions causing the situation. Note: The export process is too slow so I didn't further test the cause. I ended up deleted that empty group to fix it.
In addition to this first bug. My psd is a 400mb world map. It take like 15 minutes to scan and just to tell me there are repeated name and the export stopped. I fixed that duplicated name issue and run the script again. It take another 15 minutes to tell me there are yet another duplicated name! This process repeated at least 4 times. Although I have something else to do while waiting. it is still a bad experience. I guess your export script has not separate validation and execution into two loops or is doing something very slow before validation. Also validation should loop till the end and tell me all the issues instead of show them one by one.
Bug.2
When there is a dot in the name of a layer, the exported file will not ended with .png.
Bug.3
The script is not working correctly under Photoshop CC 2018. There are always a set of layers visible on all sprites.
Note: the script is working fine in Photoshop CS 6. I only download CC 2018 trial version to see if export would run faster in newer version of PS and accidentally found this bug. I tried both checked and unchecked "Trim white space". No luck.
Moreover, there is once the export complete in CC 2018 but than I export again in CS6 and the script found another duplicated name and export process stopped there. Seems like the script is not stable in new version of PS.
Update:
About bug #2, I found that when there is a dot(.) in the name of a layer, that layer would not export at all in CS6. Exported files without .png extension seems to be from CC 2018.
Another issue I found is that in my last export attempt, I only have 17 layers visible (out of thousand in my large PSD) and I export with "Ignore hidden layer" but it still take a lot of time to export. I guess it is not optimized enough and still doing lots of unnecessary steps slowing down the whole thing.
Finally, I suggest changing the following line in the script: (The one already commented out in the screenshot)
This line set the progress window active. It will cause the export process keep popping up and stealing focus during the later export phase which make the computer not usable. e.g. typing an email than PS keep popping up over anything until the export is done. It prevent user from doing anything on the screen. A preferred behavior would be just to activate the popup once when everything is done (or failed) just to notify the user to take a look.
:smoke: :coffee:
Bug 1
This is not really a bug, but more the map too huge/a computer not very performative. You may have noticed the script first does the check, then starts exporting. I run into duplicate naming too a couple days ago and it's the first thing the script checks. You could consider shrinking the map for a test export if your computer can't handle it quickly. I used to have a less performative computer too, so I actually can relate. Q.Q
Bug2
I tested this, it all exported correctly (tried .png, tried exactly what you wrote in the captions, with and without space, .jpeg but everytime a correct pgn is exported) I think you might be using an older version of the script because I actually remember someone having this problem, please update yours by downloading the latest here: spine-scripts/photoshop at master · EsotericSoftware/spine-scripts (I am on CC 2018). I didn't clearly understand if this problem is present on CC 2018 or not from your comment.
On the last one, do you mean that you are unable to do other things in Photoshop during the process (which would be normal considering batches do the same) or in general? (which in my case doesn't happen, I just lower the window and do other things)
I am using the newest script as you can see from the first post second screenshot (2.7 on title).
Bug 1
The case is not handled. It is displaying an error instead of the usual "same name" warning:
Multiple layers for the "Layer Name" skin have the same name:"
Layer Name
Rename or use the [ignore] tag for the other layers.
So some user may not know whats going on when saw this happen.
Bug 2
Below is the video exporting to CS 6:
Note that I only renamed the script file to "_ Export to Spine" so I can find it easier but the script content is untouched in the test.
You can see from video that tree 1-3 is not exported in the 1st attempt.
After corrected the name, things back to normal in 2nd attempt.
Here is the video exporting to CS CC 2018:
The same problem occurs this time, missing files with layer named with dot.
Unlike the result I engaged before which still output the files without the extension (.png).
I guess it is due to different psd. This one is simplified just for testing as I don't want to wait 15 minutes in front of the screen.
Anyway, the behavior is still incorrect as CS6.
About not being able to use PC when exporting
You can see from the 1st video when PS writing files, it keep stealing focus from what I was doing. In this case, I was just looking at the export folder but that could be writing email, programming or any other task. You can see that PS keep popping up above my other application. When I click my window, PS gain the focus back each time it does something. This may not be an issue if user are dealing with small / simple PSD but for complex large PSD, the issue become headache.Thankfully, the solution is at the end of the first post.
P.S.
The gif video screen size is 1:1 captured but it maybe shrinked when viewing from forum. You can save the gif and view it with other image viewer like Faststone ImageViewer.
Update:
Beside missing files, there is an extra file (Pine Tree Mt.png) in the output folder.
For layers (Pine Tree Mt.E 1, Pine Tree Mt.E 2, Pine Tree Mt.E 3),
Pine Tree Mt.E 1.png
Pine Tree Mt.E 2.png
Pine Tree Mt.E 3.png
is missing and
Pine Tree Mt.png
is created.
It is obvious that the output name is truncated right at the dot position in the test.
I've condensed your requests in one issue here: Photoshop script improvements · #380 · EsotericSoftware/spine-editor
Could you also send the problematic file to contact@esotericsoftware.com so I can verify the several layers merging on export? thank you!