Skip to content

Instantly share code, notes, and snippets.

@JokerMartini
Created December 3, 2015 14:06
Show Gist options
  • Save JokerMartini/05e953d7a5fa1a36e9c5 to your computer and use it in GitHub Desktop.
Save JokerMartini/05e953d7a5fa1a36e9c5 to your computer and use it in GitHub Desktop.
Maxscript: Collects all parents and their children nodes recursively
fn get_all_nodes nodes:#() =
(
allnodes = #()
for n in nodes do
(
append allnodes n
join allnodes (get_all_nodes nodes:(n.children))
)
allnodes
)
col = (get_all_nodes nodes:(selection as array))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment