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

resize and rotate selection

Community Beginner ,
Sep 15, 2017 Sep 15, 2017

Copy link to clipboard

Copied

I would like to resize and rotate a selection object, but the object have opacity mask.

selection[0].resize () and selection[0].rotate() can not change opacity mask. can someone help me.

TOPICS
Scripting

Views

631

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
Adobe
Community Expert ,
Sep 15, 2017 Sep 15, 2017

Copy link to clipboard

Copied

Here is an experimental code and its worked.

app.activeDocument.layers.getByName("<不透明マスク>").pathItems[0].rotate(90);

Please note that my environment is Japanese locale and I don't know opacity mask layers name in En.

Probably, It might be "<Opacity Mask>".

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 ,
Sep 16, 2017 Sep 16, 2017

Copy link to clipboard

Copied

I think he is Chinese, so the name will be "<不透明蒙版>". But as I tested you code only work when you enter the "edit opacity mask" mode, right?

To lewiscc​:

你问了很多不透明蒙版相关的问题,归根结底在于对于脚本来说它是个幻影般的存在,脚本识别不到它(可以归为bug或至少是缺陷)。解决的方法无非还是我提到的那些:

1. 脚本内嵌动作,动作中录制旋转/缩放等操作。

2. 扭曲与变换效果,跟你已经实现的移动操作一样。

3. 将整个对象建立为符号。其实我觉得这个更方便,尤其是当你要复制很多份的时候,可以显著减小文件大小。

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 ,
Sep 16, 2017 Sep 16, 2017

Copy link to clipboard

Copied

LATEST

Hi moluapple,

You are correct. I took misstake to forget in the mask mode when latest code.

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