I am having trouble finding a way to select just the parent layer of an object in grasshopper. I have used Human to get the lowest sublayer and full folder path, however it doesnt seem like there is a way to just isolate the Parent Layer.
Can you clarify this? Are you looking to “get” the layer of a Rhino Object? Are you looking to “get” the parent layer of the layer that a Rhino object resides? Are you actually looking to select layers (whatever that means)?
For a bit more detail…So for any brep I select, I would like to get its parent layer. So if my layer structure is like such(Parent Layer::SubLayer1::Sublayer2)……some breps I may select are on sublayer 1, while some are on sublayer 2, but really I want to know what Parent Layer they are associated with.
Yes this works if I run it I run a python script within rhino. But what I am looking for is to create a component in grasshopper that I can input my breps(multiple) and then it will tell me the parent layer name as the output. Sorry if I wasnt specific enough there.
Take the result from Human then use Split Text component with “::” as the splitting character. Then pass results through a List Item component and get Item 0.