ModelData:getNodeSibling

Edit

Returns the next sibling of a node (a node with the same parent), or nil if the node doesn't have a sibling.

This, together with ModelData:getNodeChild, can be used to iterate the tree of nodes in a model.

sibling = ModelData:getNodeSibling(node)

Arguments

NameTypeDescription
nodestring | number The name or index of a node.

Returns

NameTypeDescription
siblingnumber | nil The index of the node's next sibling, or nil if the node doesn't have a sibling.

See also