Wouterdek/NodeNetwork

Allow for multiple connections to the same node

CharlesFr opened this issue · 5 comments

Many thanks for sharing this library!

Could you please indicate how I can enable users to add multiple connections to a single input of a node?

Thanks

image

NodeInputViewModel inherits the property MaxConnections from Endpoint. You can set it to e.g. Int32.MaxValue.

Great, many thanks for your prompt response

@FabianNitsche: Thanks for your time on providing the property name to establish multiple connection. I tried this and I am able to make my node to accept multiple connection.

I need one more details regarding multiple connection. Is there any API or property available to get the information about the connected nodes?

Say for example, My three input nodes such as Input 1, Input 2 and Input 3 are connected with Main Function node. Here I need to get the connected input information in Main Function logic (i.e MainFunctionNodeViewModel)

Sorry for the delay. The Main Function nodes input, that the Input Nodes outputs are connected to has a property called Connections providing a collection of ConnectionViewModels. Each ConnectionViewModel has an Output property of type NodeOutputViewModel, that has a Parent property, where you can get the input node.

@FabianNitsche : Many thanks for your inputs. I followed your inputs and made it work.