ModelData:getNodeParent

Returns the parent of a node in the ModelData.

parent = ModelData:getNodeParent(index)

Arguments

NameTypeDescription
indexnumberThe index of the node to get the parent of (1-indexed).

Returns

NameTypeDescription
parentnumberThe index of the node's parent, or nil if the node is the root node.

Notes

An error will be thrown if an invalid node index is supplied.

See also