set a layers opacity?
Posted: November 4th, 2008, 5:34 am
Hey,
I'm very new to scripting (i first tried it today) and I have a couple of questions.
Firstly, where can I find a reference of all the functions etc? I'm all googled out...
Then, I have this script I wrote and it's working fine, but I need to set a layers opacity, but I'm getting nowhere.
The script just adds adjustment layers with presets set on them. Here's the code for adding one of the layers:
I tried searching for examples and references, but I didn't find much. Any help would be awesome.
Thanks
I'm very new to scripting (i first tried it today) and I have a couple of questions.
Firstly, where can I find a reference of all the functions etc? I'm all googled out...
Then, I have this script I wrote and it's working fine, but I need to set a layers opacity, but I'm getting nowhere.
The script just adds adjustment layers with presets set on them. Here's the code for adding one of the layers:
Code: Select all
var adjLayer2 = mainComp.layers.addSolid([1,1,1],"desaturate", mainComp.width,mainComp.height,mainComp.pixelAspect,mainComp.duration);
adjLayer2.adjustmentLayer = true;
adjLayer2.applyPreset(highPass);
adjLayer2.blendingMode = BlendingMode.COLOR;
adjLayer2.opacity = LayerOpacity(50); //This is where I'm stuck - I've tried countless options here to no avail
Thanks