Hi @Gregor-M please make sure that your script is executable before sending it to us. Since in it's current state it does raise
Traceback (most recent call last): File "scriptmanager", line 53, in GetDown File "scriptmanager", line 33, in GetChildren AttributeError: 'Entity' object has no attribute 'children'. Did you mean: 'GetChildren'?I added self.children = [] within the __init__ of Entity and it fixed the issue but this indicate that you are working on a different version than us. But even with it I'm not able to reproduce any issue and everything is working as expected.
With that's said your else statement within the SetCheck looks very suspicious and I won't be surprised that the behavior you are experiencing is coming from this else statement.
Finally note that you can call the function TreeViewCustomGui.SetRoot to define a root. Then the root argument that is available in all functions will be pointing to it.
Cheers,
Maxime.