nodeeditor icon indicating copy to clipboard operation
nodeeditor copied to clipboard

Dynamic In and Out ports

Open PandaT123 opened this issue 7 years ago • 4 comments

Is there any way to dynamically change the number of In and Out ports on a node that has already been created?

PandaT123 avatar Jun 08 '17 14:06 PandaT123

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

paceholder avatar Jun 08 '17 14:06 paceholder

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.

BlackStar-EoP avatar Dec 07 '17 12:12 BlackStar-EoP

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.

BlackStar-EoP avatar Jun 14 '18 15:06 BlackStar-EoP

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

DexterMagnific avatar Apr 17 '19 19:04 DexterMagnific

The dynamic ports are avaliable in v3. The feature might need some improvements according to specific application needs.

paceholder avatar Dec 03 '22 22:12 paceholder