Novelty scripting reference > Types > SceneLayer


Script representation of a scene layer.
SceneLayer is a reference type. This means it has no constructor and can only be passed around by handle (SceneLayer@).


const string name
The layer's name.

bool locked
The layer's locked state.


void EnumerateObjects(array<Object@> &inout objectArray) const
Populates the array with handles to the objects in the layer.

uint GetObjectCount() const
Returns the number of objects in the layer.

Object@ GetObject(uint index) const
Object@ GetObject(const string &in objectName) const
Finds and returns an object in the layer by order index or name; or null.

Object@ GetObjectByUID(UID uid) const
Finds and returns an object in the layer by UID; or null.

Object@ GetObjectAt(float x, float y) const
Object@ GetObjectAt(const Vector2 &in point) const
Returns a handle to an object that is located over a point; or null.

void EnumerateObjectsWithin(array<Object@> &inout objectArray,
    const Vector4 &in area) const

Populates the array with handles of objects within an area (x, y, width, height).

uint GetObjectOrder(Object@ obj) const
Returns the order index of an object; or INVALID_INDEX on error.

bool OrderObject(Object@ obj, uint index)
Change the order of an object in the layer. Returns true on success.

UID GetUID() const
Returns the unique id (UID) of the layer.

Object@ GetRootObject() const
Returns a handle to the layer's root container object.

string AsString() const
Returns a string describing the layer.

Back to top