Copy link to clipboard
Copied
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.
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
...Copy link to clipboard
Copied
what did you use to "I made a command for making a layer a mask."
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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:
e.g. On MacOs: “ ~/Library/Application Support/Adobe/Animate CC 2019/en_US/Configuration/Commands/”
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.)
Copy link to clipboard
Copied
the code's the same, and you're welcome.
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more