Notifications
Clear all
[Closed] Adding Objects to Array/By name
Feb 01, 2013 9:57 pm
Hi all,
Just a bit stuck, I’m trying to add all objects with a certain name to an array but am having difficulties.
What I’ve got is
select $*Hat*
HatArray =#($)
But this doesn’t seem to be working?!
What am I missing here?
Any help appreciated.
Thanks
2 Replies
Feb 01, 2013 9:57 pm
If you want to convert a selection to array, use either selection as array or getCurrentSelection(). $ returns either undefined, a single node or live selection-set object (based on the number of objects currently selected), while selection can cast to array in all these cases. In fact, here you don’t have to select anything, HatArray = $Hat as array is enough.