Adobe-Export-Scripts
Adobe-Export-Scripts copied to clipboard
layer position i am not getting extract position from psd
Script is working fine for image coordinates but When i try to extract the layer position i am not getting extract position from psd. can you help me getting correct data from psd. attached is the value expected'default text layer' as 43, 60.77 but i am getting different position. Advance thanks
Hi @mraj32, what is the incorrect number you're seeing on output?
I believe you have to rasterize all layers and layer effects to get the most accurate results.
@bronzehedwick This script is awesome !
But I confirm the issue. The problem is that layerRef.bounds[0].value; only returns position of first pixel, it exclude a part of the layer (that you can see if you hit the Transform button.
To reproduce you can create a smart object, and put a small rectangle inside it.
You will see that exported data match the layer box, but not the layer transform box (which have the initial placement of our image).
It would be nice if you can take a look, it seems that a solution is not as straightforward 😄
@X-Raym Thanks! And thanks for bumping the issue: I haven't had much time to work on this, but hopefully I'll be able to address this in the next few days.
@bronzehedwick No problem ! Thanks for your quick answer ! The issue was also in the Photoshop API iteself, but r-bin made a script that overcome that: https://forums.adobe.com/thread/2455423
There is a script function which solves this, maybe you will need to do that in a very different way, but maybe it can help a bit.
Thanks!