Hi Andy, this worked perfectly, thank you!
I was able to tweak what you had in the file to do both the in & out times using the script below.
// Get the selected parent and child layers
var parentLayer = app.project.activeItem.selectedLayers[0];
var childLayer = app.project.activeItem.selectedLayers[1];
// Check if both layers are selected
if (parentLayer != null && childLayer != null) {
// Set the in point and out point of the child layer to match the parent layer
childLayer.inPoint = parentLayer.inPoint;
childLayer.outPoint = parentLayer.outPoint;
}
Then I was able to edit the script to look down through a mass selection and sequence through the layers to run the script multiple times using the script below.
// Get the selected layers
var selectedLayers = app.project.activeItem.selectedLayers;
// Check if there are at least two layers selected
if (selectedLayers.length >= 2) {
// Loop through the selected layers in pairs
for (var i = 1; i < selectedLayers.length; i += 2) {
var parentLayer = selectedLayers[i];
var childLayer = selectedLayers[i – 1];
// Set the in point and out point of the child layer to match the parent layer
childLayer.inPoint = parentLayer.inPoint;
childLayer.outPoint = parentLayer.outPoint;
}
Thanks for sending me down the right path and saving me a lot of time.