Copy link to clipboard
Copied
This jsfl can add a blank keyframe to the last frame of the current layer
But there will be an error that automatically extends to the end frame of the timeline
how to fix
if (aslayer.frameCount < tl.frameCount) {
tl.insertBlankKeyframe(tl.frameCount);
} else {
if (aslayer.frames[aslayer.frameCount].startFrame !== aslayer.frameCount) {
tl.insertBlankKeyframe(tl.frameCount);
}
}
var doc = fl.getDocumentDOM()
var tl = doc.getTimeline()
var currentLayer = tl.currentLayer;
var frameCount = tl.layers[(currentLayer)].frameCount;
tl.insertBlankKeyframe(frameCount -1);
Copy link to clipboard
Copied
var doc = fl.getDocumentDOM()
var tl = doc.getTimeline()
var currentLayer = tl.currentLayer;
var frameCount = tl.layers[(currentLayer)].frameCount;
tl.insertBlankKeyframe(frameCount -1);