Hello guys, I am still learning a lot about Python and I would like to ask for some help. I would like to somehow get rid of any child objects present in my selection and work only with objects of highest hierarchy level.
I have found operators which select highest parents but parents only, if there are other objects which have no children they are unselected and I would like to keep these selected.
I also found an operator do it the other way around, find any child type in my selection so I can hide them… and this works the best but there is one scenario where it does not work and is if there is no child present in my selection. Then all stays selected and then is hidden by the next operator.
I would appreciate if someone helped me with this