Copy link to clipboard
Copied
The layer selection in the history is not reflected and does not allow me to create a command to select a layer with a specific name (for example "eye"). Having this function, it would be useful to select in a character face setup.
Copy link to clipboard
Copied
function selectLayerF(s){
var tl = fl.getDocumentDOM().getTimeline();
for(var i=0;i<tl.layers.length;i++){
if(tl.layers[i].name == s){
tl.setSelectedLayers(i);
break;
}
}
}
Copy link to clipboard
Copied
Where would I have to change the name for the command to work, e.g. "eye".
Copy link to clipboard
Copied
don't change anything. you just call selecLayerF passing the layer name you want selected. eg, selectLayerF("eye")
Find more inspiration, events, and resources on the new Adobe Community
Explore Now