[Adam Leverett] “Yes, but what I meant was, if you select (for example) 3 clips that all slightly begin at different times, copy them, then paste them somewhere else, then hit ‘[‘ or ‘]’, ALL of the clips will start or end at the playhead. It will not maintain the different start points. Was just wondering if that was possible…not sure if I’m explaining clearly.”
Correct, there is no shortcut (I know of) to move layers on the timeline and retain their relative temporal positioning. However, if you’re going to copy and paste anyway, you can copy, move the current time indicator to where you want the first layer to begin, then use “paste at current time” as described above.
If you super-need a keyboard shortcut for this, I wrote a quick script to do it. Here’s the code:
// quick script to move the selected layers in time to the current time indicator,
// preserving their temporal relationship. The clip with the earliest start will begin
// at the CTI, and the others will retain their relationship
// written by Walter Soyka, first published at https://forums.creativecow.net/thread/2/1123156
if (app.project.activeItem instanceof CompItem && app.project.activeItem.selectedLayers.length > 0) {
app.beginUndoGroup("Move selection start points in time");
var currentTime = app.project.activeItem.time;
// find the earliest in point among the selection
var earliestStartTime = app.project.activeItem.selectedLayers[0].startTime;
for (var i = 1; i < app.project.activeItem.selectedLayers.length; i ++) {
if (app.project.activeItem.selectedLayers[i].startTime < earliestStartTime) {
earliestStartTime = app.project.activeItem.selectedLayers[i].startTime;
}
}
// figure out the offset between the earliest start time and the current time
var timeOffset = currentTime - earliestStartTime;
// move all selected layers by the time offset (so the earliest layer starts at the current time, and the others
// keep the same relative timing
for (var i = 0; i < app.project.activeItem.selectedLayers.length; i++) {
app.project.activeItem.selectedLayers[i].startTime += timeOffset;
}
app.endUndoGroup();
}
Here’s what to do:
1. Copy and paste this code into a text editor, and save it as 01 keen-MoveSelectionStartPoints.jsx in your scripts folder.
2. Relaunch After Effects.
3. Edit > Keyboard Shortcuts
4. Type “01 keen” in the search filter box (located on the left underneath the virtual keyboard).
5. Locate and select 01 keen-MoveSelectionStartPoints.jsx in the list.
6. Click into the Shortcut space (next to the Command) and press Ctrl+Alt+Shift+[ on Windows, or Cmd+Opt+Shift+[ on a Mac.
7. Click the OK button to save your new shortcut.
NOTE: Ae’s keyboard shortcut system uses 19 “script slots” that are assigned by sorting the script files alphabetically. We’re putting “01” at the front of the name to force it to the front of that list. If you were to add a “00” script later, then that new script would take the first script slot and respond to the shortcut. If you want to add a number of scripts to different shortcuts, keep this in mind and use the numbering system carefully to enforce the order you want to keep the assignments from bouncing around.
Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive | RenderBreak [blog] | Profile [LinkedIn]