How do I get the type of layer?
I see there is a "typeName" for items, but can't find anything
for layer types..
type layer?
Moderator: Paul Tuersley
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Here's a snippet from one of my work in progress scripts that should point you in the right direction, let me know if you need any more help.
Paul T
Paul T
Code: Select all
if (curLayer.matchName == "ADBE Camera Layer") {
alert("it's a camera");
} else {
if (curLayer.matchName == "ADBE Light Layer") {
alert("it's a light");
} else {
if (curLayer.matchName == "ADBE AV Layer" && curLayer.threeDLayer == true) {
alert("it's a three dee layer");
if (curLayer.hasAudio == false) {
alert("without audio");
} else {
alert("with audio");
}
} else { // I guess it must be a 2D layer then.
alert("it's a two dee layer");
if (curLayer.hasAudio == false) {
alert("without audio");
} else {
alert("with audio");
}
}
}
}