Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def traverse(node):
- print ' ' * traverse.level + ' ' + node
- children = cmds.listRelatives(node, children=True, fullPath=True)
- if children:
- for child in children:
- traverse.level += 1
- traverse(child)
- traverse.level -= 1
- traverse.level = 1
- nodes = cmds.ls('|*')
- for node in nodes:
- traverse(node)
Advertisement
Add Comment
Please, Sign In to add comment