Copy link to clipboard
Copied
How to "Set Work Area to Selected Layers" with a script?
app.findMenuCommandId("Set Work Area to Selected Layers") writes 0.
Or if there is no way, how to trim comp to selected layers area. I wanted to set the work area to selected laters and then trim comp to the work area. But if there is no way to do these two things with a script, how to achieve this with short steps?
Copy link to clipboard
Copied
https://hyperbrew.co/blog/after-effects-command-ids/
the command number for trimming the comp to the work are is 2360.
i couldn't find a command number for setting the work area to the selected layers.
Copy link to clipboard
Copied
Here is an Automation Blocks script to set the workarea to all selected layers:
See this post for more details.
If you want to script it yourself without Automation Blocks, you can use the same logic for your js code.