How exactly does the depth traversal for the scene heirkey know to stop object traversal?

The scene explorerer for toilet elements in the scene caps out at full object level rather than traversing lower into the sub speckle mesh objects that makes up the toilet.

Scene explorer Path:
base>Snowdon Towers Sample Architectural>L3>Toilet-Domestic-3D> 0905b5f68249cee436fc4d26b2f6cf72

However when Im currently operating in the viewer scene higherkey I’m noticing that 0905b5f68249cee436fc4d26b2f6cf72 model itself is a composite of two objects ['e75f3f372856cff194c1ee3ec5b51043', 'f63c592c4997a0f3a33dba64712726c8']

From a script prespective I’m little lost on how to efficently check to see I’ve hit scene explorer level depth in meshes to apply my computations on or if I’m currenty at deeper children object level.

I hope this makes sense and would love any pointers on what parameter is being used to flag this.

Hi @Leul_Tesfaye

Nodes in the tree have a flag called atomic which signals if the node is a “stand-alone” node or not. Typically, displayable objects like meshes will rarely be atomic as they are most of the time part of a RevitObject or a Brep or a Wall as their children. However, this is not a rule, any object can be atomic or not.

However, I suggest you don’t take the atomic flag as something absolute as we use it more as a hint rather than an absolute truth. I also don’t think you should dwell too much on the actual hierarchy structure as there are no strict rules about how it should generally look

This is where the RenderTree might help. It’s functions like getRenderViewsForNode and it’s variants can get you the objects that are actually displayable (like meshes). The term NodeRenderView comes from having a rendering related view on a node. So from a viewer perspective, a Wall is not renderable, but calling getNodeRenderViewNodesForNode on it will give you the nodes that actually are.
Another way of thinking about it, is that the RenderTree’s exposed functionality spares you from needing to manually go through the hierarchy trying to determine which are the leaf nodes, if they are displayable or not or who is who’s parent.

Let us know if you need more help

Cheers