Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Show/Hide properties with keyframes from an extension

  • Show/Hide properties with keyframes from an extension

    Posted by ali kim on November 12, 2024 at 8:52 am

    I’m trying to write an extension that can show/hide properties with keyframes.
    The most relevant piece of code goes like this:

    var cmdStr = ‘Reveal Properties with Keyframes’;

    executeCommand(cmdStr);

    function executeCommand(cmdStr) {

    var cmdId = 0;

    cmdId = app.findMenuCommandId(cmdStr);

    if (cmdId == 0) return cmdId;

    app.executeCommand(cmdId);

    return cmdId;

    }

    When called the first time, it works and opens keyframed props, but when called again, it opens all props of the layer.

    I got an advice on Adobe Forum to change executeCommand function like this:

    function executeCommand(cmdStr) {

    var cmdId = 0;

    cmdId = app.findMenuCommandId(cmdStr);

    if (cmdId == 0) return cmdId;

    // RevealAllModifiedProperties

    app.executeCommand(2771);

    app.executeCommand(2771);

    app.executeCommand(cmdId);

    return cmdId;

    }
    this doesn’t fix the problem because double 2771 call hides all props and original call opens them again, so this code can only show props but not hide them.

    Anyway, I tested both versions, below if the full code of the extension and how it works.

    Does anyone know how to make a switch to show/hide keyed props?

    ali kim replied 1 month ago 2 Members · 2 Replies
  • 2 Replies
  • John Cuevas

    November 12, 2024 at 1:49 pm

    Is this any different that just selecting all layers and pressing “U” which reveals anything property that has a keyframe?

  • ali kim

    November 12, 2024 at 2:53 pm

    No, that’s exactly the functionality I’m trying to achieve, just from inside the extension, w/o pressing U.

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