Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

rotated angle of group layer using script

New Here ,
Aug 20, 2020 Aug 20, 2020

We have a rotated group layer like below.

antony3w_0-1597924243163.pngexpand image

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().

 

antony3w_1-1597924293629.pngexpand image

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

 

Thanks in advance

TOPICS
Actions and scripting , Windows
1.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Enthusiast , Aug 20, 2020 Aug 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.

Ekran Resmi 2020-08-20 15.36.24.pngexpand image

Translate
Adobe
Community Expert ,
Aug 20, 2020 Aug 20, 2020

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 20, 2020 Aug 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).

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

In this case you are apparently trying to retrieve information that the group does not contain. 

 

If someone else already rotated the Group then the Group is as it is, what good would the information about it having been rotated in the past do now? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

Does the Group contain Smart Objects which one can assume were never transformed except as part of the Group? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 20, 2020 Aug 20, 2020

We are not sure all group contains smart objects. It could only contain artlayers like TEXT.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

Did you try copycss.jsx script that comes with the Photoshop and gives transformation properties.  May be that script can help you to get the transformation. That script is very long but it gives transformation properties.

Best regards
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

»Did you try copycss.jsx script that comes with the Photoshop and gives transformation properties.«

Do you mean »CopyCSSToClipboard.jsx«? 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020
LATEST

Yes, you catch me 🙂

Best regards
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Aug 20, 2020 Aug 20, 2020

You can access Copycss.jsx code from the following thread

https://community.adobe.com/t5/photoshop/how-to-get-text-transform-box-boundary/m-p/11142576?page=1

Also, you can try solution suggested by r-bin.

Best regards
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Aug 20, 2020 Aug 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.

Ekran Resmi 2020-08-20 15.36.24.pngexpand image

Graphic Designer Educator / PrePress Consultant
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines