效果
粘贴表达式到当前合成的文字图层表达式里即可
表达式
// 补零函数
function PrefixZero(num, n) {
var zeros = new Array(n + 1).join('0');
return (zeros + num).slice(-n);
}
// 当前合成帧率(可以手改为24)
fps = 1.0 / thisComp.frameDuration;
// 当前秒整数/帧数
second = PrefixZero(Math.floor(time), 2);
current_frame = PrefixZero((time * fps) % fps + 1, 2);
// 总帧数
total_frames = PrefixZero(timeToFrames(), 4);
// 合成静态总秒
comp_seconds = Math.floor(thisComp.duration);
// 合成静态总帧
comp_frame = PrefixZero(timeToFrames(thisComp.duration) % fps, 2);
// 输出
second + " + " + current_frame + " " + total_frames+ "k" + " " + "(总时长 " + comp_seconds + "+" + comp_frame +"k)"