Name
ModifyLayerFrames -- change number of anim layer frames (V4.7)
Synopsis
ModifyLayerFrames(id, frames[, pos])
Function
This function can be used to extend or shrink the frames of an anim layer. If you specify a positive value in frames, then the anim layer is extended by this number of frames. If you specify a negative value, the number of frames specified are removed from the anim layer.

The optional argument pos can be used to specify where the new frames shall be inserted or from where the frames shall be removed, respectively. If you do not specify the optional argument or set it to 0, frames are added at the end of the anim layer or removed from the end of the anim layer, respectively.

This command works only with anim layers that have their frames buffered entirely in memory. You cannot use it for anim layers that load their frames dynamically from disk.

Inputs
id
identifier of the anim layer to modify
frames
number of frames to insert (if value is positive) or number of frames to remove (if value is negative)
pos
optional: where to insert or remove frames (defaults to 0 which means insert at/remove from the end)
Example
ModifyLayerFrames(1, -5, 1)
The code above removes the first five frames from anim layer number 1.

Show TOC