Notifications
Clear all
[Closed] Pathname context
Page 2 / 2
Prev
Jul 22, 2016 9:33 am
the best and fastest way to get all children is the using the fact that node is a mappable max object:
join #() node
Jul 22, 2016 9:33 am
people don’t use pathname too often in coding. but there are some interesting solutions which can be used in the listener for scene monitoring for example:
there are special roots – object collections – that can be used in the path (selection, objects, helpers, geometry, etc.).
here is a scene setup:
delete objects
dd = for k=1 to 10 collect (dummy name:(uniquename "parent") pos:(random -[100,100,100] [100,100,100]))
pp = for k=1 to 10 collect in dd[random 1 dd.count]
(
#(point, box)[random 1 2] name:"child" pos:(random -[100,100,100] [100,100,100])
)
select (for k=1 to 20 collect (dd + pp)[random 1 20])
($parent*).count
10
($selection/parent*).count
7
($child*).count
10
($selection/child*).count
5
($selection...child*).count
5
($objects/child*).count
10
($helpers/child*).count
3
($geometry/child*).count
7
Page 2 / 2
Prev