Author Topic: Select only parent objects  (Read 2990 times)

0 Members and 1 Guest are viewing this topic.

Offline Ryan Fenik

Select only parent objects
« on: December 28, 2015, 01:52:54 pm »
Looking for more documentation on isDescendantOf(). 

Specifically, I am looking to select only top-level objects. 


Offline Morten Kristensen

  • root
  • Administrator
  • Full Member
  • *****
  • Posts: 142
  • Total likes: 1
  • Software Engineer, Luxion
Re: Select only parent objects
« Reply #1 on: February 08, 2016, 01:24:15 am »
Hello Ryan,

isDescendantOf() checks if a node descends, or is a (sub) child, of a node. If you have groups A and B, where B is a sub group of A, and node N is a child of B then N is a descendant of A and B. You can think of it as being on the same "path".

If you only want top-level objects then you can set the depth and types arguments when using lux.SceneNode.find().