Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression to Keyframes on specific property

  • Expression to Keyframes on specific property

    Posted by Kevin Snyder on October 8, 2022 at 10:17 pm

    I’m trying to convert an expression to keyframes on a specific property on a pseudo effect. Is it even possible? Here’s what I have so far. The variable for myProp is throwing an error.

    myComp = app.project.activeItem;
    myLayer = myComp.selectedLayers;
    myProp = myLayer.effect("Faux Parent")("Position Offset");
    app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
    Kevin Snyder replied 1 year, 11 months ago 2 Members · 2 Replies
  • 2 Replies
  • Dan Ebberts

    October 9, 2022 at 12:06 am

    This should work:

    var myComp = app.project.activeItem;
    var myLayers = myComp.selectedLayers;
    if (myLayers.length > 0){
    var myLayer = myLayers[0];
    for (var i = 0; i < myLayers.length; i++){
    myLayers[i].selected = false;
    }
    myProp = myLayer.effect("Faux Parent")("Position Offset");
    myProp.selected = true;
    app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));
    }
  • Kevin Snyder

    October 9, 2022 at 7:17 pm

    Thank you. I appreciate it.

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