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

P: Rotate tool does not assign angle value trough script

Guide ,
Jan 23, 2022 Jan 23, 2022

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

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

Status Acknowledged
Translate
Report