heirarchy to array

I want to select the top most parent and then run through its children putting them all into an array.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Graph's picture

select $* arr = selection as

select $*
arr = selection as array

that should do it

Raphael Steves

JokerMartini's picture

Got this

fn getAllChildren obj &arr:#() =
(
	for c in obj.children do
	(
		append arr c
		getAllChildren c arr:arr
	)
	arr 
)
select (getAllChildren $ arr:(selection as array))

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.