-
Use script to freeze on last frame for 2 seconds
I am attempting to freeze a layer (vidL) on it’s last frame, and extend the layer and composition by 2 seconds.
Using the code:
vidL.timeRemapEnabled = true;
vidL.property(“timeRemap”).setInterpolationTypeAtKey(1,KeyframeInterpolationType.HOLD);
results in the layer freezing from the first frame.
The following function throws an error code# 1: Unable to call “setValueAtTime” because of parameter 2. Value 19.96 out of range 0 to 18. However, when the code is halted, the freeze on last frame has worked, but not extending the layer.
function freezeFrame(){
vidL.startTime = 0;
var vidLength = vidL.outPoint;compVideo.duration = vidLength + 2;
vidL.timeRemapEnabled = true;var timeRemapProp = vidL.property(“ADBE Time Remapping”);
var currTime = vidL.outPoint;
var lastTime = currTime + 1.96;
timeRemapProp.setValueAtTime(currTime, lastTime);}
Any help would be appreciated.