Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Photoshop Script] Incorrectly crops after some layers. #268

Closed
pharan opened this issue Sep 27, 2017 · 4 comments
Closed

[Photoshop Script] Incorrectly crops after some layers. #268

pharan opened this issue Sep 27, 2017 · 4 comments

Comments

@pharan
Copy link

pharan commented Sep 27, 2017

The lowest layers seem to export fine but after a certain point (not sure if it's necessarily the number of layers), the script seems to stop performing new crop operations and the resulting images come out wrong.

In Photoshop (eyeb7):
image

Exported (eyeb7.png):
image

User reported in the forum: http://esotericsoftware.com/forum/problems-with-latest-photoshop-script-9284
Repro PSD was sent through email, David Zolnier.

@pharan pharan added the bug label Sep 27, 2017
@pharan
Copy link
Author

pharan commented Sep 27, 2017

Removed the lowest layers, trying to isolate the problem.
Having the fewer layers seems to have fixed the problem with the layers that were originally being incorrectly cropped.
image

So it might not be layer-specific or layer-arrangement-specific.
There's nothing weird about the layer naming too.
Adding the "[slot]" tag to the folder names makes no difference.

@Zolnier
Copy link

Zolnier commented Sep 28, 2017

I've been exploring some of the older scripts that properly generate output images but the json they create doesn't work with Spine. Any updates on your end?

@Zolnier
Copy link

Zolnier commented Sep 28, 2017

FYI, this is the JSON output that Spine says is bad:

{"skeleton":{"images":""}, "bones":[{"name":"root"}], "slots":[ {"name":"rforearm","bone":"root","attachment":"rforearm"}, {"name":"rupperarm","bone":"root","attachment":"rupperarm"}, {"name":"rpinkie","bone":"root","attachment":"rpinkie"}, {"name":"rring","bone":"root","attachment":"rring"}, {"name":"rmiddle","bone":"root","attachment":"rmiddle"}, {"name":"rindex","bone":"root","attachment":"rindex"}, {"name":"rhand","bone":"root","attachment":"rhand"}, {"name":"rthumb","bone":"root","attachment":"rthumb"}, {"name":"legr","bone":"root","attachment":"legr"}, {"name":"shortsr","bone":"root","attachment":"shortsr"}, {"name":"body","bone":"root","attachment":"body"}, {"name":"pelvis","bone":"root","attachment":"pelvis"}, {"name":"upperlegleft","bone":"root","attachment":"upperlegleft"}, {"name":"legleft","bone":"root","attachment":"legleft"}, {"name":"shortsl","bone":"root","attachment":"shortsl"}, {"name":"jersey1","bone":"root","attachment":"jersey1"}, {"name":"jersey2","bone":"root","attachment":"jersey2"}, {"name":"neck","bone":"root","attachment":"neck"}, {"name":"head2","bone":"root","attachment":"head2"}, {"name":"head1","bone":"root","attachment":"head1"}, {"name":"lforearm","bone":"root","attachment":"lforearm"}, {"name":"lupperarm","bone":"root","attachment":"lupperarm"}, {"name":"lshoulder","bone":"root","attachment":"lshoulder"}, {"name":"lpinkie","bone":"root","attachment":"lpinkie"}, {"name":"lring","bone":"root","attachment":"lring"}, {"name":"lmiddle","bone":"root","attachment":"lmiddle"}, {"name":"lindex","bone":"root","attachment":"lindex"}, {"name":"lthumb","bone":"root","attachment":"lthumb"}, {"name":"lhand","bone":"root","attachment":"lhand"} ], "skins":{ "default":{ }, "ARMRIGHT":{ "rupperarm":{"rupperarm":{"name":"ARMRIGHT/rupperarm", "x":1155.5,"y":-1759.5,"width":411,"height":1195}}, "rforearm":{"rforearm":{"name":"ARMRIGHT/rforearm", "x":996,"y":-2479,"width":486,"height":874}} }, "RHAND":{ "rthumb":{"rthumb":{"name":"RHAND/rthumb", "x":619,"y":-2974.5,"width":228,"height":271}}, "rhand":{"rhand":{"name":"RHAND/rhand", "x":750.5,"y":-2978.5,"width":307,"height":349}}, "rindex":{"rindex":{"name":"RHAND/rindex", "x":597.5,"y":-3183,"width":145,"height":230}}, "rmiddle":{"rmiddle":{"name":"RHAND/rmiddle", "x":659,"y":-3220,"width":144,"height":242}}, "rring":{"rring":{"name":"RHAND/rring", "x":744,"y":-3195.5,"width":138,"height":243}}, "rpinkie":{"rpinkie":{"name":"RHAND/rpinkie", "x":829.5,"y":-3162,"width":145,"height":250}} }, "LEGRIGHT":{ "legr":{"legr":{"name":"LEGRIGHT/legr", "x":1147.5,"y":-3931,"width":411,"height":1144}} }, "SHORTSR":{ "shortsr":{"shortsr":{"name":"SHORTSR/shortsr", "x":1165,"y":-3169,"width":554,"height":1210}} }, "BODY":{ "body":{"body":{"name":"BODY/body", "x":1482,"y":-2030,"width":1082,"height":1718}} }, "PELVIS":{ "pelvis":{"pelvis":{"name":"PELVIS/pelvis", "x":1382,"y":-2834.5,"width":846,"height":625}} }, "UPPERLEGLEFT":{ "upperlegleft":{"upperlegleft":{"name":"UPPERLEGLEFT/upperlegleft", "x":1604.5,"y":-3454,"width":355,"height":748}} }, "LEGLEFT":{ "legleft":{"legleft":{"name":"LEGLEFT/legleft", "x":1677.5,"y":-4195,"width":439,"height":1264}} }, "SHORTSL":{ "shortsl":{"shortsl":{"name":"SHORTSL/shortsl", "x":1566,"y":-3381.5,"width":670,"height":1089}} }, "JERSEY":{ "jersey2":{"jersey2":{"name":"JERSEY/jersey2", "x":1483,"y":-2100,"width":1126,"height":1840}}, "jersey1":{"jersey1":{"name":"JERSEY/jersey1", "x":1482,"y":-2100,"width":1126,"height":1840}} }, "NECK":{ "neck":{"neck":{"name":"NECK/neck", "x":1478,"y":-1168,"width":412,"height":468}} }, "HEAD":{ "head1":{"head1":{"name":"HEAD/head1", "x":1474,"y":-836.5,"width":598,"height":751}}, "head2":{"head2":{"name":"HEAD/head2", "x":1474,"y":-836.5,"width":598,"height":751}} }, "ARMLEFT":{ "lshoulder":{"lshoulder":{"name":"ARMLEFT/lshoulder", "x":2009,"y":-1758.5,"width":446,"height":563}}, "lupperarm":{"lupperarm":{"name":"ARMLEFT/lupperarm", "x":2054,"y":-2231.5,"width":404,"height":851}}, "lforearm":{"lforearm":{"name":"ARMLEFT/lforearm", "x":2061.5,"y":-2836,"width":455,"height":890}} }, "LHAND":{ "lhand":{"lhand":{"name":"LHAND/lhand", "x":1853.5,"y":-3333.5,"width":307,"height":349}}, "lthumb":{"lthumb":{"name":"LHAND/lthumb", "x":1722,"y":-3329.5,"width":228,"height":271}}, "lindex":{"lindex":{"name":"LHAND/lindex", "x":1700.5,"y":-3538,"width":145,"height":230}}, "lmiddle":{"lmiddle":{"name":"LHAND/lmiddle", "x":1762,"y":-3575,"width":144,"height":242}}, "lring":{"lring":{"name":"LHAND/lring", "x":1847,"y":-3550.5,"width":138,"height":243}}, "lpinkie":{"lpinkie":{"name":"LHAND/lpinkie", "x":1932.5,"y":-3517,"width":145,"height":250}} } }, "animations":{"animation":{}} }

@NathanSweet
Copy link
Member

We've fixed the cropping with the latest script:
https://github.com/EsotericSoftware/spine-scripts/raw/master/photoshop/PhotoshopToSpine.jsx

Not being able to import was a separate bug in Spine. We've got that fixed in 3.6.42, which will be available soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants