Is it possible to have a program node that can you only can add children (meaning with the programAPI) but that is also valid if you don’t have any children?
On the tests I made, the only way to add a child was to change in the service the boolean configuration.setChildrenAllowed(true), but this enables the < empty > display in the child node and it seems that only way to have the node defined is to put something to replace the empty node.
I also tried to do a root.setChildSequenceLocked(true), but the node is still not defined if it’s empty.
It seems that your parent node would have to contain a defined child for it to be valid
Thanks for the reply. I will then move my topic to feature request as currently it’s not possible.
My suggestion would be to be able to modify the setChildrenAllowed from the programContribution (this sould have to make this a contribution property instead of a property on the service level).
Another suggestion would be to create a new type of property that can or can’t have children but these children can only be added by the programmer and thus we would never see on Polyscope the field.
Example : an user can choose if he wants a timeout or not on a selected command. If he wants it, then I add a “if timeout” child. If not, I want to be leave this command childless.