Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Forums Adobe After Effects Expressions Create Script to Add loopOut() Expression to Layer

  • Create Script to Add loopOut() Expression to Layer

  • Brandon Smith

    February 6, 2013 at 5:57 pm

    I was told to post this here so I can get some better help with this script I am trying to write. I am a beginner with scripting right now and I am trying to start off with just creating simple shortcut scripts that I can use in AE.

    One that I am trying to make is a script that will add the loopOut() expression to the position of a selected Layer that is already keyframed.

    Here is the code I have so far (see below)

    Any help is greatly appreciated.

    Thanks,
    Brandon

    var myComp = app.project.activeItem;
    var myLayer = myComp.selectedLayers[0];
    var prop = myLayer.transform.position;
    prop.expression = "loopOut("cycle")";
    prop.expressionEnabled = true;

  • Dan Ebberts

    February 6, 2013 at 8:01 pm

    I think you’ll need to change the line with the expression, like this:

    prop.expression = ‘loopOut(“cycle”)’;

    but otherwise I think it will work.

    Dan

Viewing 1 - 2 of 2 posts

Log in to reply.

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