nodeeditor
nodeeditor copied to clipboard
Dynamic In and Out ports
Is there any way to dynamically change the number of In and Out ports on a node that has already been created?
Currently it is not possible. Such a behavior would result into a tricky management of already attached Connections. Currently the GUI representation (Node, Connection) and the data representation (NodeModel) have a very thin layer in-between. Managing the connections from inside the model would force me to merge two classes: NodeModel and Node. This will be a big refactoring
What if you destroy all connections to that Node when the number of in/out ports changes? It's not extremely user-friendly, but would at least provide support for this use-case.
I am in need of this behavior as well, I use the node editor for creating rendering pipelines using shaders, and the shader node depends on the shader used to determine the number of input/output ports.
I will try to see if I can implement this in my fork using a signal that's emitted when the number of ports changes to destroy all connections to the node that changed.
Dynamic input output ports was one of my prime use-cases, so I have developed my own node editor for this, https://github.com/BlackStar-EoP/eop-node-editor . Can be used as an alternative, but be wary, it's in no way mature enough and lacks automatic propagation support.
Please please implement this feature. We are making an Audio designer app and we need to dynamically adjust the number of I/O ports after creation.
In this case we only have one data model: the audio block. But we need to adjust the number of I/O channels for each block
The dynamic ports are avaliable in v3
. The feature might need some improvements according to specific application needs.