getNodeChildren.lua 852 B

12345678910111213141516171819202122232425262728293031323334353637
  1. return {
  2. summary = 'Get the children of a node.',
  3. description = [[
  4. Given a parent node, this function returns a table with the indices of its children.
  5. ]],
  6. arguments = {
  7. index = {
  8. type = 'number',
  9. description = 'The index of the parent node.'
  10. },
  11. name = {
  12. type = 'string',
  13. description = 'The name of the parent node.'
  14. }
  15. },
  16. returns = {
  17. children = {
  18. type = 'table',
  19. description = 'A table containing a node index for each child of the node.'
  20. }
  21. },
  22. variants = {
  23. {
  24. arguments = { 'index' },
  25. returns = { 'children' }
  26. },
  27. {
  28. arguments = { 'name' },
  29. returns = { 'children' }
  30. }
  31. },
  32. notes = 'If the node does not have any children, this function returns an empty table.',
  33. related = {
  34. 'Model:getNodeParent',
  35. 'Model:getRootNode'
  36. }
  37. }