Re: Adobe Photoshop Bounds of a layer?
Re: Adobe Photoshop Bounds of a layer?
- Subject: Re: Adobe Photoshop Bounds of a layer?
- From: Dave <email@hidden>
- Date: Fri, 05 Sep 2014 14:01:07 +0100
On 5 Sep 2014, at 13:19, Shane Stanley <email@hidden> wrote:
>
> On 5 Sep 2014, at 8:32 pm, Dave <email@hidden> wrote:
>
>> It’s the same without the ViewConfig in the file, this is created AFTER the process is run. Delete it and try again!
>
> OK, so I deleted the other layers, and the result was this:
>
> {{0.0, 0.0, 20.0, 20.0}, {20.0, 0.0, 20.0, 20.0}, {0.0, 20.0, 20.0, 20.0}, {20.0, 20.0, 20.0, 20.0}}
>
> And I then ran the .jsx file you sent and I got this:
>
> -pShape1,0,0
> Shape1,0,0
> -pShape2,20,0
> Shape2,20,0
> -pShape3,0,20
> Shape3,0,20
> -pShape4,20,20
> Shape4,20,20
>
>> My Script code does the same as yours and it’s picking up the right layers. When processing Art Layers, it ignores anything that begins with a “-“ and also my loop is confined to the art layers into -pShapeX groups.
>>
>> I’ve run this file with a simple X,Y dumper I got from the web and it shows negative offsets (without any extra groups or layers being added to the PSD, just the 4 shapes).
>
> I'm not sure I can add much. I did run your script several times, and at least once I got some odd values. All I can think is that there might be some issues with js value persistence. But this is probably the wrong list, and certainly the wrong person, to address those issues with.
>
> But FWIW, it looks to me like Photoshop is behaving as expected.
Yes, I think it is too, but you have to know what it giving you in order to know how to handle it, which seems difficult to find, my method works ok, but would fall over if you applied rotations for instance. Basically Photoshop is working in it’s own space and you have to map it to the space you want, e.g. 0,0 based in this case.
Cheers
Dave
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden