Cel
A cel is an image in a specific xy-coordinate, and a specific layer/frame combination.
Cel.sprite
local sprite = cel.spriteCels belong to one sprite. This property returns that sprite.
Cel.layer
local layer = cel.layerReturns the layer where this cel is located.
Cel.frame
local frame = cel.frame
cel.frame = newFrameReturns the frame object which this cel belongs. If you set this property, the cel will be moved to the given frame (if another cel already exists in that frame, it will be removed).
Cel.frameNumber
local frameNumber = cel.frameNumber
cel.frameNumber = newFrameNumberReturns the frame number which this cel belongs, the frame number 1 is the first frame (not 0). If you set this property the cel will be moved to the given frameNumber, check the notes of Cel.frame.
Cel.image
local image = cel.image
cel.image = newImageGets or sets the image with the pixels of this cel. This is the preferred way to replace the cel image, because it generates only one undoable action.
Cel.bounds
local bounds = cel.boundsReturns the rectangle with the cel bounds (position and size).
Cel.position
local position = cel.position
cel.position = newPositionGets or sets the cel position.
Cel.opacity
local opacity = cel.opacity
cel.opacity = newOpacityGets or sets the cel opacity. A value from 0 to 255 (which means 0=0% completely transparent, or 255=100% completely opaque).
Cel.zIndex
local zIndex = cel.zIndex
cel.zIndex = newZIndexGets or sets the cel z-index value. By default 0, which means "show this cel in the same position as its layer", but can be modified to positive values to move the cel to the front, or negative values to move it to the back.
It offers a way to change the order of layers in one specific frame.
Note: The value is limited to the [-32768,32767] range.
Cel.color
local color = cel.color
cel.color = newColorGets or sets the user-defined color of this cel in the timeline.
Cel.data
local data = cel.data
cel.data = newDataGets or sets the user-defined data related to this cel (a text string).
Cel.properties
Access user-defined and extension-defined properties of this cel.