-
Trying to adjust inPoint of a layer
I am editing some old VHS videos that were put onto DVD. There are sections that need to be removed. I have created a simple dialog with buttons to simplify editing. One button successfully splits a layer then reverses the order so that the extra layer is below the original. I then move forward to the point where the extra layer needs to split and the section deleted. eg. at 10 seconds the footage becomes static, I split and reorder it there. At 15 seconds the static ends.
How do I split the layer, delete the 10-15 second section and move the next section of the footage back to the outPoint of the layer above?
What I have so far is this:
splitAdjust.onClick = function() {
var myComp = app.project.activeItem;
var selectedLayer = myComp.selectedLayers;
var currLayerIndex = selectedLayer[0].index;
var delLayerIndex = currLayerIndex + 1;
var prevLayer = myComp.layer(currLayerIndex – 1);
var fadePoint = prevLayer.outPoint;
if (selectedLayer.length > 0){
app.executeCommand(app.findMenuCommandId(“Split Layer”));
app.project.activeItem.layer(delLayerIndex).remove();
app.project.activeItem.time = fadePoint;
app.project.activeItem.layer(currLayerIndex);
myComp.layer(currLayerIndex).inPoint = fadePoint;
}else{
alert (“No layers selected.”);
}
}
Hopefully someone can help!