Procedurally add inputs to a multi-input OP?

I have a bunch of TOPS that I want to composite together a bunch of different ways at the same time. Is there a way to use a table or something to control which TOPS are connected to my Composite TOPS? And I’d like to be able to control the order of the inputs on the Composite TOP (or any multi-input OP for that matter)

You can use a script that references a table with the inputs paths. A second column could determine the order of the layer. The only way I know to change the order once they are connected would be to disconnect and then reconnect all the sources in the new order (via a script).

A way to directly reorder the input with python on command would be a bonus but I haven’t found one.

Also there a couple GLSL composite COMPs posted, on by me another by Archo-p. I don’t think the one I posted has a layer parameter but it can be easily modified to have a layer (order) uniform. If needed I can post another version I have that has the layer order.


Thank you Keith :slight_smile: I did see your composite tool in my searches. Thought there should be a way to do it with a script but couldn’t find the reference. Here it is: … ctor_Class

Is there any blaring speed advantage to using a glsl tool like yours vs making a script to connect nodes? Or is it 6 of one and .5*12 of the other?

I’ve included an example to set them direclty in this post: