-
Show/Hide Properties with Keyframes
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?
Sorry, there were no replies found.