Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # replaces the old get_children_recursive() function
- func get_recursive_children(node):
- var childList = []
- childList += [node]
- var index = 0
- while index < childList.size():
- if(childList[index].get_child_count() > 0):
- childList += childList[index].get_children()
- index += 1
- return childList
- pass
- # list nodes in a given group, from a list of nodes
- func get_grouped_nodes(nodeList, group):
- var nodes = []
- for i in nodeList:
- if i.is_in_group(group):
- nodes += [i]
- return nodes
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement