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

rotated angle of group layer using script

New Here ,
Aug 20, 2020 Aug 20, 2020

Copy link to clipboard

Copied

We have a rotated group layer like below.

antony3w_0-1597924243163.png

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.png

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

 

Thanks in advance

TOPICS
Actions and scripting , Windows

Views

558

Translate

Translate

Report

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.png

Votes

Translate

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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. 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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? 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Do you mean »CopyCSSToClipboard.jsx«? 

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

LATEST

Yes, you catch me 🙂

Best regards

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

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.png

Graphic Designer Educator / PrePress Consultant

Votes

Translate

Translate

Report

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