Created
December 3, 2015 14:06
-
-
Save JokerMartini/05e953d7a5fa1a36e9c5 to your computer and use it in GitHub Desktop.
Maxscript: Collects all parents and their children nodes recursively
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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