Copy link to clipboard
Copied
Hello Dan
How do I script the trackmatte ?
AlphaMatte
AlphaInvertMatte
LumaMatte
LumainvertMatte
I have this script
for (i = 0; i < activeItem.selectedLayers.length; i++) { // loop through selected layers in the comp
theLayer = activeItem.selectedLayers;
var thePreset = File("/Applications/Adobe After Effects CS5/Presets/ShiftChannel.ffx");
theLayer.applyPreset(thePreset); // add animation preset to selected layers
theLayer.property("Opacity").setValue(50); // set opacity to selected layer
theLayer.property("TrackMatte").setTrackMatte(AlphaMatte); //set trackMatte to selected layer ??
Thanks
Rob
Check page 49 of the CS3 scripting guide.
theLayer.trackMatteType = TrackMatteType.ALPHA
also:
TrackMatteType.ALPHA_INVERTED
TrackMatteType.LUMA
TrackMatteType.LUMA_INVERTED
TrackMatteType.NO_TRACK_MATTE
Copy link to clipboard
Copied
Check page 49 of the CS3 scripting guide.
theLayer.trackMatteType = TrackMatteType.ALPHA
also:
TrackMatteType.ALPHA_INVERTED
TrackMatteType.LUMA
TrackMatteType.LUMA_INVERTED
TrackMatteType.NO_TRACK_MATTE
Copy link to clipboard
Copied
Thank you Paul for the answer.
I have CS5 though.
Rob
Copy link to clipboard
Copied
The CS3 scripting guide was the last version released. You can find it and all the changes since in this post:
http://blogs.adobe.com/toddkopriva/2011/09/scripting-changes-in-after-effects-cs5-5.html
Copy link to clipboard
Copied
OH OK... I will try to get into it and try to understand some of it. Thanks