Try something new. NodeBox 2 Beta - Now Available for Download

photobot.Layer.index()

Syntax

canvas.layers[i].index()

Description

Returns the index of the layer.

Example

photobot = ximport("photobot")
canvas = photobot.canvas(100,100)
canvas.layer("robot.jpg")
print canvas.layer[1].index()
>>>1