Forum Replies Created

Page 2 of 2
  • Emre Mutlu

    June 8, 2020 at 12:38 pm in reply to: (How) can I move the CTI from within a script?

    Wrong post. I can’t find how to remove my reply, sorry 🙂

  • Emre Mutlu

    May 31, 2020 at 7:33 pm in reply to: Script to add an effect to selected layers

    So i found what the problem is. Afx thinks it’s an AVLayer instead of CompItem when i use this line :

    var selection = mainComp.selectedLayers[0];

    I edited the script like this and it works :

    var mainComp = app.project.item(1);
    var selection = mainComp.selectedLayers[0].source;

    alert(selectedComp.numLayers);

    The result is exact number with this way. I’m not sure if it’s the correct way to do this but it works. If there’s an alternative way to do this, i would like to know. I hope it helps 🙂

  • Emre Mutlu

    May 31, 2020 at 2:51 pm in reply to: Script to add an effect to selected layers

    When i use this method in a variable i can’t use that var later. For example when i select a comp from timeline and run this script it says “undefined”. What is the proper way of doing this? What causes this problem?

    Like :

    var mainComp = app.project.item(1);
    var selection = mainComp.selectedLayers[0];
    alert(selection.numLayers);

    alert says “undefined”.

  • Thank you anyway. If i find a solution for this i’ll post here 🙂

  • Thanks for your time and reply Robert. I’ve used a similar method for this.

    On opacity :

    reveal = thisComp..layer(“reveal”).effect(index-1)(“Checkbox”);
    if (mask == 1) {100} else {0};

    I still wonder if there is way for renaming effects via script, plug-in or something else?

Page 2 of 2

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