Page 1 of 1

Procedurally add inputs to a multi-input OP?

PostPosted: Sat Jul 05, 2014 4:57 pm
by enthewhite
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)

Re: Procedurally add inputs to a multi-input OP?

PostPosted: Sat Jul 05, 2014 5:11 pm
by keithlostracco
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.

cheers
Keith

Re: Procedurally add inputs to a multi-input OP?

PostPosted: Sat Jul 05, 2014 7:34 pm
by enthewhite
Thank you Keith :) 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: http://www.derivative.ca/wiki088/index. ... 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?

Re: Procedurally add inputs to a multi-input OP?

PostPosted: Fri Sep 14, 2018 4:45 pm
by rob
I've included an example to set them direclty in this post:
viewtopic.php?f=4&t=12754