Hi,
I posted this in script requests earlier, but this forum seems more appropriate...
I'm attempting to create a new null layer in my project but can't find documentation on the correct name to call for one.
Here's what I have tried (doesn't work):
var newRepoLayer = myComp.layers.addNull([0,0,0], "Repo", myComp.width, myComp.height, myComp.pixelAspect, myComp.duration);
newRepoLayer.visible = false;
The major problem being that '.addNull' was purely a guess.
BONUS QUESTION- newRepoLayer.visible = false; doesn't work for turning off the visibility of new layers. Can someone please tell me what I am doing wrong? I've attempted to find the answers to these questions on my own, but there are virtually no resources (helpful, anyway) that I've found.
Help me AENHANCERS, you're my only hope!
New null layer via javascript
Moderator: Paul Tuersley
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
You want the LayerCollection addNull() method. Page 94 of the CS3 scripting guide.
You only specify a duration, so usage is: layers.addNull(duration)
And for turning layers on/off you want the Layer enabled attribute. Page 86 of the scripting guide.
AE CS3 Scripting Guide
You only specify a duration, so usage is: layers.addNull(duration)
And for turning layers on/off you want the Layer enabled attribute. Page 86 of the scripting guide.
AE CS3 Scripting Guide