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

  • Show/Hide Properties with Keyframes

    Posted by ali kim on November 11, 2024 at 2:43 pm

    I have an extension the executes this function to show/hide properties with keyframes:

    function test() {

    var res = false;

    var msg = ‘default’;

    var comp = _proj.activeItem;

    if (!comp || !(comp instanceof CompItem)) {

    msg = ‘No active item or active item is not a comp’;

    return toJSON(res, msg);

    }

    var layer = comp.layer(1);

    if (!layer) {

    msg = ‘No layer selected’;

    return toJSON(res, msg);

    }

    layer.selected = true;

    var cmdStr = ‘Reveal Properties with Keyframes’;

    var cmdId = executeCommand(cmdStr);

    if (cmdId == 0) {

    msg = ‘Command \” cmdStr ‘\’ id not found’;

    return toJSON(res, msg);

    }

    msg = ‘Executed \” cmdStr ‘\’ (‘ cmdId ‘)’;

    layer.selected = false;

    return toJSON(res, msg);

    }

    function executeCommand(cmdStr) {

    var cmdId = 0;

    cmdId = app.findMenuCommandId(cmdStr);

    if (cmdId == 0) return cmdId;

    app.executeCommand(cmdId);

    return cmdId;

    }When I call test() the first time, it works and opens keyframed props, but when I call it again, it opens all props of the layer. On the other hand, if after the first call I click away from the extension window and focus AE UI, it work and hides keyframed props.Does anyone here have any experience re this behavior?

    ali kim replied 1 month ago 1 Member · 0 Replies
  • 0 Replies

Sorry, there were no replies found.

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