Skip to main content
August 20, 2020
Answered

rotated angle of group layer using script

  • August 20, 2020
  • 2 replies
  • 1149 views

We have a rotated group layer like below.

And trying to get the rotated angle of group layer from script. But while i cannot find any APIs to retrieve the angle. I tried to calculate the angle using corners from "r-bin" post for getting angle from Smart Objects(Thanks r-bin and JJack). But for group layers, current value of corners are returned when using layer.bounds().

 

In this case, how can we get or calculate the rotated angle of group layer?

 

Thanks in advance

This topic has been closed for replies.
Correct answer ceyhun_akgun

You have to convert the entire group Layer to Smart Object from the beginning. In this case, you can always see the rotations with their current values.

2 replies

ceyhun_akgun
ceyhun_akgunCorrect answer
Brainiac
August 20, 2020

You have to convert the entire group Layer to Smart Object from the beginning. In this case, you can always see the rotations with their current values.

Graphic Designer Educator / PrePress Consultant
c.pfaffenbichler
Community Expert
August 20, 2020

Groups are not Smart Objects, they do not retain information about past transformations. 

c.pfaffenbichler
Community Expert
August 20, 2020

If the rotating transformation is part of a Script with manual input (DialogModes.ALL) the value can be retrieved, though. 

But maybe you need to explain in more detail what exactly you are trying to achieve and what role the angle plays in a larger context. 

August 20, 2020

Rotating layers is not a part of script. PSD design is done by customer and we need to extract the PSD file and generate details in other file formats(XML).