how to check whether a selected layer is a nullLayer?
Posted: July 25th, 2018, 10:09 pm
Sorry my Mother tongue wasn't English,so my English wasn't good enough.
I wanted to write a script which need a feature that check whether a selected layer is a null Layer,therefore I try to write a simple script to test,but it didn't work.
this is my test script:
var myComp = app.project.activeItem;
var Selected = myComp.selectedLayers;
if (Selected[0] instanceof nullLayer)
{
alert ("a")
}
else
{
alert( "!");
}
who can help me? thanks!
I wanted to write a script which need a feature that check whether a selected layer is a null Layer,therefore I try to write a simple script to test,but it didn't work.
this is my test script:
var myComp = app.project.activeItem;
var Selected = myComp.selectedLayers;
if (Selected[0] instanceof nullLayer)
{
alert ("a")
}
else
{
alert( "!");
}
who can help me? thanks!