Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Mask Index linked to Layer index

  • Criis Daw

    November 26, 2015 at 2:23 pm

    sorry actually its deleting all odd numbered masks ….

  • Martin Jean-sébastien

    November 26, 2015 at 2:27 pm

    app.beginUndoGroup("Set opacity mask");

    for(var j=0;j<app.project.activeItem.selectedLayers.length;j++){
    var myLayer = app.project.activeItem.selectedLayers[j];
    var myPath = myLayer.property("Masks");
    var numMasks = myPath.numProperties;
    for(var i=1;i<numMasks+1;i++){
    if(myPath.property(i).name.replace(/Mask /g, "")==myLayer.index) myPath.property(i).maskOpacity.setValue(100);
    else{
    myPath.property(i).remove();
    numMasks = numMasks-1;
    i--;
    }
    }
    }

    app.endUndoGroup();

  • Criis Daw

    November 26, 2015 at 2:32 pm

    you are a genius !!!

    thanks very much !!

Page 2 of 2

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy