Skip to main content
xpertpse
Participant
September 14, 2012
Question

How can I determine the rotate angle of an artLayer?

  • September 14, 2012
  • 2 replies
  • 3488 views

I have a document with multiple layers. I can rotate a layer via the script. However, if the layer is already rotated via some angle, how can i determine that via the script?

This topic has been closed for replies.

2 replies

Legend
September 16, 2012

You can create a linked and disabled vector mask with only two ancor points and determine the rotation of the layer via calculations points coordinates.

c.pfaffenbichler
Community Expert
Community Expert
September 14, 2012

What are you talking about?

Smart Objects or regular Layers (of the various kinds)?

xpertpse
xpertpseAuthor
Participant
September 14, 2012

I am talking about the regular layers.

c.pfaffenbichler
Community Expert
Community Expert
September 14, 2012

I may be misunderstanding youe question, but if you rotate a pixel Layer and once the rotation step is not in the History or in a Log anymore, then there is no real (edit: in the sense of enabling Photoshop to determine it unequivocally) information on whether and how much it has been rotated.

Image content like discernable stripes may make it clear to you that an element has been rotated, but that is hardly for Photoshop to decide.

One could evaluate a Layer’s transparency to see if it more or less conforms to a rectangle and then determine the angles, but as the Layer may have been created that way that would seem to be a judgement call.