childrenΒΆ

nil children ( Node node , string|{string} type , [ string|function pattern ] , [ boolean recursive ] )

Traverses the children nodes of a node

Exemple :

-- Iterate over all the lights called LightSOMETHING only in the document root
for child in children (Document, "Light""Light.+"do
    print (child.Name:Get ())
end

-- Iterate over all the texture shader nodes in the document
for node in children (Document, "ShaderNodeTexture"niltruedo
    print (node.Filename:Get ())
end
Arguments:

  • node The node to iterate
  • type A class or list of classes the children must belong to to be visited by the iterator
  • pattern A Lua's pattern used to check the name of the node, or a function that filter the node. See Lua's pattern documentation.
  • recursive if true, traverse the children recursivly.