Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Procedurally add inputs to a multi-input OP?

General discussion about anything TouchDesigner

Procedurally add inputs to a multi-input OP?

Postby enthewhite » Sat Jul 05, 2014 4:57 pm

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)
User avatar
enthewhite
 
Posts: 245
Joined: Sat Sep 03, 2011 9:19 pm
Location: Portland, OR

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

Postby keithlostracco » Sat Jul 05, 2014 5:11 pm

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
keithlostracco
 
Posts: 858
Joined: Tue Dec 09, 2008 2:39 pm

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

Postby enthewhite » Sat Jul 05, 2014 7:34 pm

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?
User avatar
enthewhite
 
Posts: 245
Joined: Sat Sep 03, 2011 9:19 pm
Location: Portland, OR

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

Postby rob » Fri Sep 14, 2018 4:45 pm

I've included an example to set them direclty in this post:
viewtopic.php?f=4&t=12754
User avatar
rob
Staff
 
Posts: 1545
Joined: Tue Nov 13, 2007 1:14 am


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: No registered users and 17 guests