Notch Notch Manual 0.9.23
 Light | Dark
GetParent()

GetParent()

Purpose #

Retrieves the parent node object with the given index.

Syntax #

object GetParent(int node_index);

Parameters

node_indexThe array index of the parent nodes.

returns Node Object if found or, if not found, object of type undefined.

Example #

function Update()
{ 
    layer = Document.FindLayer("My Layer");
    node = layer.FindNode("Image 2D");
    numParents = node.GetNumParents();
    for (i = 0; i < numParents; i++)
    {
        child = node.GetParent(i);
    }
}