Skip to main content
Known Participant
January 22, 2023
Question

command id for trim a layer to the current time indicator ??

  • January 22, 2023
  • 1 reply
  • 266 views

what is command id for ( trim a layer to the current time indicator i Press ALT + [ to create a new in-point is there away to know command id for  it ???

This topic has been closed for replies.

1 reply

Inspiring
January 23, 2023

There are only menu command ids for menu items, and I don't think that has one. But it's simple enough to do with a script. This will loop through any selected layers. Changing the in point in this way can shift the out point, so it makes a note of that first then sets it back after the in point is changed.

 

var activeItem = app.project.activeItem;
var outPoint;

for (var x = 0; x < activeItem.selectedLayers.length; x++) {
	outPoint = activeItem.selectedLayers[x].outPoint;
	activeItem.selectedLayers[x].inPoint = activeItem.time;
	activeItem.selectedLayers[x].outPoint = outPoint;
}

 

Here are some links with useful menu command id info. But generally I'd advise using 'proper' scripting methods where possible and only use menu commands if you really have to.

https://community.adobe.com/t5/after-effects-discussions/after-effects-updated-menu-command-id-list/td-p/11480243

https://hyperbrew.co/blog/after-effects-command-ids/