KeyShot Forum

Technical discussions => Extending KeyShot => Scripting => Topic started by: Ryan Fenik on December 28, 2015, 01:52:54 PM

Title: Select only parent objects
Post by: Ryan Fenik on December 28, 2015, 01:52:54 PM
Looking for more documentation on isDescendantOf(). 

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

Thanks. 
Title: Re: Select only parent objects
Post by: Morten Kristensen 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().