nodeeditor icon indicating copy to clipboard operation
nodeeditor copied to clipboard

number of inputs and outputs when creating a block

Open jetrus opened this issue 6 years ago • 4 comments

Hi guys! Сan I specify the number of inputs or outputs when I put the block on the Scene? If this is possible, then there is an example?

Thank you.

jetrus avatar Aug 21 '18 18:08 jetrus

I'm not sure what you mean...

You mean not at compile time?

If so, when registering models register different instances of the same model class, that has state to store how many inputs or outputs.

russelltg avatar Aug 26 '18 23:08 russelltg

@russelltg

Not at compile time. I need that when I put the block on the scene a window appears for inputting the number of inputs. Now I solved the problem by passing the global variable to the class. When you register the model, the window does not appear. After registration, the value of the global variable is changed and when I put the block the window appears.

jetrus avatar Aug 27 '18 08:08 jetrus

I also need this feature. Please add it. We are making an audio app and the user can put an audio block and configure later how many inputs/outputs it has.

DexterMagnific avatar Apr 26 '19 07:04 DexterMagnific

I have done this for my own app. Eg: A node configures itself with the input and output ports of an incoming node. It has required some changes in the core code, namely that the number of ports and entries is assumed to be fixed when the node is first instanced... It would be nice if this came standard.

spiriapbergeron avatar May 27 '20 04:05 spiriapbergeron

I think this was overlapping with the "dynamic ports" which is in master.

paceholder avatar Nov 28 '22 14:11 paceholder