Show Waveform Using Extend Script
Copy link to clipboard
Copied
I'm looking for a way to code a script that displays the waveforms for all layers in a comp that have an audio component. Essentially the same as pressing 'L' shortcut twice, except I'm looking to run a script that does this for every layer in every comp in the project.
Basically, I'm looking to enable the waveform and also show the audio level keyframes, and the opacity keyframes all at once, for every layer in every comp.
How can I use extend script to get (to start with) just the waveform showing in the timeline?
I tried:
var item = app.property.activeItem;
item.property("Opacity").enabled = true;
Copy link to clipboard
Copied
I don't think that's possible since the .elided attribute is read only. You likely will have to instate a fake event listener that mimics the keyboard inputs, if at all.
Mylenium
Copy link to clipboard
Copied
I would have thought that pressing the shortcut key would execute some kind of command, but trying something like:
app.executeCommand(app.findMenuCommandId("Show/Hide Audio Levels)"));
Returns 0 (I'm assuming that's a not found)
Copy link to clipboard
Copied
Sorry that I have no better answer. But like Mylenium I suspect that this is not possible, unfortunately.
The only workaround that comes to my mind is that your script could execute a command line tool which simulates keyboard shortcuts. But this will be a very dirty hack and not really reliable if possible at all.
Copy link to clipboard
Copied
Okay shame, appreciate you both jumping in to help!

