Skip to main content
Participating Frequently
October 12, 2011
Answered

How do I script trackMatte Properties?

  • October 12, 2011
  • 1 reply
  • 1676 views

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

This topic has been closed for replies.
Correct answer Paul Tuersley

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

1 reply

Paul TuersleyCorrect answer
Inspiring
October 12, 2011

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

land_robAuthor
Participating Frequently
October 12, 2011

Thank you Paul for the answer.

I have CS5 though.

Rob

Inspiring
October 13, 2011

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