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

Bug: Mask command does not work fully as a shortcut

Contributor ,
Oct 30, 2018 Oct 30, 2018

Currently, when you right-click a layer to make it a mask, it will turn the layer to a mask and make the layer below a child of that mask.

I made a command for making a layer a mask.

Then I made a shortcut for that command.

When I execute the shortcut, it makes the layer a mask, but it does NOT make the layer below a child of that mask.

584
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

Contributor , Oct 31, 2018 Oct 31, 2018

Commands are saved as .jsfl files.  Replace that .jsfl code with this:

var selectedLayer = fl.getDocumentDOM().getTimeline().getSelectedLayers();

fl.getDocumentDOM().getTimeline().setLayerProperty('layerType', 'mask');

fl.getDocumentDOM().getTimeline().setSelectedLayers(++selectedLayer);

fl.getDocumentDOM().getTimeline().setLayerProperty('layerType', 'masked');

You can find the .jsfl file and other commands at:

User/Library/Application Support/Adobe/Animate CC 2019/en_US/Configuration/Commands/”

Pleas

...
Translate
Community Expert ,
Oct 30, 2018 Oct 30, 2018

what did you use to "I made a command for making a layer a mask."

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
Contributor ,
Oct 30, 2018 Oct 30, 2018

Kglad, here's what I did:

1. Make a layer a mask.

2. Open your History window.

3. Select the action you just did.

4. Right-click it, "Save as Command"

4b. You'll see it now in the Command window.

5. Open Keyboard Shortcuts, and assign it a shortcut.

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 ,
Oct 30, 2018 Oct 30, 2018

to fix your command, replace that jsfl with:

var selectedLayer = fl.getDocumentDOM().getTimeline().getSelectedLayers();

fl.getDocumentDOM().getTimeline().layers[selectedLayer].layerType = "mask";

selectedLayer++;

fl.getDocumentDOM().getTimeline().layers[selectedLayer].layerType = "masked";

to report the bug, Feature Request/Bug Report Form

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
Contributor ,
Oct 31, 2018 Oct 31, 2018

Commands are saved as .jsfl files.  Replace that .jsfl code with this:

var selectedLayer = fl.getDocumentDOM().getTimeline().getSelectedLayers();

fl.getDocumentDOM().getTimeline().setLayerProperty('layerType', 'mask');

fl.getDocumentDOM().getTimeline().setSelectedLayers(++selectedLayer);

fl.getDocumentDOM().getTimeline().setLayerProperty('layerType', 'masked');

You can find the .jsfl file and other commands at:

User/Library/Application Support/Adobe/Animate CC 2019/en_US/Configuration/Commands/”

Please follow below steps to save the command and assign a keyboard shortcut to it:

  1. Paste your jsfl file to User preferences commands folder :

e.g. On MacOs: “ ~/Library/Application Support/Adobe/Animate CC 2019/en_US/Configuration/Commands/”

  1. Now in Animate CC, saved jsfl will come under Commands menu.  Whatever you named the file will be the name of the command in the Commands menu.
  2. Go to Animate CC  menu >> keyboard shortcut  >> Search for saved command >> Assign Keyboard Shortcut to it. (For win >> Edit menu  >>Keyboard shortcut)

Credit is given to Arvind Singh Tanwar from Adobe.com for this answer.

(I did not test Kglad's code, but it probably works too.  Thank you, Kglad.)

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 ,
Oct 31, 2018 Oct 31, 2018
LATEST

the code's the same, and you're welcome.

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