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

P: Rotate tool does not assign angle value trough script

1 Vote
Community Expert ,
Jan 23, 2022 Jan 23, 2022

Copy link to clipboard

Copied

When working with the rotate tool, we have the opportunity to set the angle of rotation of the canvas by entering the desired value on the toolbar, however, if we do the same through the script, the rotation does not occur (bur the specified angle is stored in the current tool settings):

 

 

#target photoshop;

var s2t = stringIDToTypeID;
(r = new ActionReference()).putClass(s2t("rotateTool"));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
(d1 = new ActionDescriptor()).putInteger(s2t('angle'),99)
d.putObject(s2t("to"), s2t("target"), d1);
executeAction(s2t("set"), d, DialogModes.NO);

 

 

We can assume that the code does not work at all, but if we decide to control the rotateAll parameter in the same way, the change is immediately shown in the toolbar:

 

 

#target photoshop;

var s2t = stringIDToTypeID;
(r = new ActionReference()).putClass(s2t("rotateTool"));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
(d1 = new ActionDescriptor()).putBoolean(s2t('rotateAll'),true)
d.putObject(s2t("to"), s2t("target"), d1);
executeAction(s2t("set"), d, DialogModes.NO);

 

 

Rotate image via radial controller

Bug Acknowledged
TOPICS
Actions and scripting , macOS , Windows

Views

58

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
1 Comment
Adobe Employee ,
Jan 24, 2022 Jan 24, 2022

Copy link to clipboard

Copied

LATEST

Thanks. I've asked engineering to take a look.


Senior Product Manager - Customer Advocacy - Digital Imaging
Status Acknowledged

Votes

Translate

Translate

Report

Report