Open cloasdata opened 1 year ago
If I understand correctly, you'd like to make the link connection point "inactive" once a link between two nodes is established. While it might make sense in some scenarios, there are other cases where it does make sense to allow multiple links. Something like this:
One output attribute here is connected to multiple input points, which might be pretty normal.
I do not want to drag wire from a connected output to another input. Sure it could make sense for other things, but in our case it simple does not. For branching we do have particular nodes.
Got it.
Unfortunately got some bad news for you: I've looked at the code, and it turns out Dear ImGui (the C++ "backend") does not have a concept of disabling link connection points ("pins" it calls them), nor is there a way to impose any limit on the number of links. That said, the feature will be rather hard to implement. One could probably hack into NodeEditor internals and cross fingers that it won't break at some point in future.
Is your feature request related to a problem? Please describe. Node links can have mutliple outgoing links, despite of the need for it. Implementationwise the etablishement of a link can be avoided, but this does not stop the user from still draging another one and questioning themself then why the link is not etablished when I still can pull the wire.
Describe the solution you'd like Provide a additional parameter like
once a number <=1 is supplied, dragging stops when link_limit is reached.
Describe alternatives you've considered In the model layer of the gui, I check the node model, if we have already made a link, and return the etablished link instead of etablish a addtional one.