Forum Replies Created

  • James Young

    June 7, 2022 at 11:31 pm in reply to: Bumpy position keys

    Hey Dario,

    I’m sure you’re long since done what you needed this for, but for anyone still looking to get this to work, there were some formatting errors in the original code (possibly due to website upgrades, etc.):

    {

    var myComp = app.project.activeItem;

    if (myComp && myComp instanceof CompItem){

    var myLayers = myComp.selectedLayers;

    if (myLayers.length > 0){

    var myLayer = myLayers[0];

    var myProperty = myLayer.property(“Position”);

    for (var i = myProperty.numKeys; i > 0; i–){

    if (i%2 == -0) myProperty.removeKey(i);

    }

    }else{

    alert(“No layer selected”);

    }

    }else{

    alert (“No comp selected”);

    }

    }

    
    

     

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