Forum Replies Created

Page 1 of 2
  • Hello,
    I’ve got the same problem since so many years…. I didn’t find any solutions on the web!
    Help us please!!

  • Martin Jean-sébastien

    November 26, 2015 at 2:27 pm in reply to: Mask Index linked to Layer index

    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();

  • Martin Jean-sébastien

    November 26, 2015 at 2:11 pm in reply to: Mask Index linked to Layer index

    app.beginUndoGroup("Delete 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(0);
    }
    else{
    myPath.property(i).remove();
    numMasks = numMasks-1;
    }
    }
    }

    app.endUndoGroup();

  • Martin Jean-sébastien

    November 26, 2015 at 2:03 pm in reply to: Mask Index linked to Layer index

    Here it is

    app.beginUndoGroup("Delete 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).remove();
    numMasks = numMasks-1;
    }
    else myPath.property(i).maskOpacity.setValue(0);
    }
    }

    app.endUndoGroup();

  • Martin Jean-sébastien

    November 26, 2015 at 1:38 pm in reply to: Mask Index linked to Layer index

    Oh i try this

    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).maskOpacity.setValue(0);
    }
    }

    app.endUndoGroup();

  • Martin Jean-sébastien

    November 26, 2015 at 1:37 pm in reply to: Mask Index linked to Layer index

    Unknown issue of copy/paste here, type this :

    app.beginUndoGroup(“Set opacity mask”);

    for(var j=0;j

  • Martin Jean-sébastien

    November 26, 2015 at 1:36 pm in reply to: Mask Index linked to Layer index

    Hello,
    You have to select all the layers where you want to apply this script :

    app.beginUndoGroup(“Set opacity mask”);

    for(var j=0;j

  • Martin Jean-sébastien

    July 24, 2015 at 9:00 am in reply to: Formating a text from a text document

    Yes the XML text is loaded in a TextBox in my script. I tried some HTML format (br or n or b)
    to make some part of the text bold or italic but it does not work.

  • Martin Jean-sébastien

    July 23, 2015 at 1:07 pm in reply to: Retrieve a part of a property name

    Yes, thank you Dan, I didnt know that it was an array! Thanks!

  • Martin Jean-sébastien

    July 3, 2015 at 8:43 am in reply to: expression for length of text layer

    Can you tell me since which version of after effects we can use this expression?
    Thanks!

Page 1 of 2

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