Check if the selected layer contains a rectangle Extendscript
Hey,
I can't find how to check if a layer has a certain proprety from this list
In my case, I want to check if the selected layer contains a rectangle, here's my code:
thisComp = app.project.activeItem;
curLayer = thisComp.selectedLayers[0];
iconbutton1.onClick = function() {
if (curLayer instanceof ShapeLayer) { //check if it's a shape layer
if () { // check if it contains a rectangle
alert("this layer has rectangle");
} else {
alert("this layer doesn't has rectangle");
}
} else {
alert("Please select a shape layer");
}
}Thanks in advance,
RedyMotion
