Change a layer property or layer ordering, depending on the argument:

Up or down moves the layer one slot up or down in layer ordering. Top or bottom moves the layer to the top or bottom in layer ordering. Layers are rendered from bottom to top: layers higher on the list will render over layers lower on the list. This matters especially if appearance/layer_alpha is 1 and layers are solid with no translucencly.

Del removes the currently selected layer.

getidx returns the index of the currently selected layer as an integer; getlen returns the number of layers as an integer. These are useful for user scripting.

setcolor and rename changes the color or name of the currently selected layer (new color or name supplied as a second argument).

all-visible and all-invisible changes visibility of all layers.