Login | Register 
FEATURES
APPLICATIONS
DOWNLOADS
EDUCATION
BLOG
WIKI
FORUM
STORE

Composite TOP input order

General discussion about anything TouchDesigner

Composite TOP input order

Postby velenoise » Wed Sep 12, 2018 8:36 pm

Hey everyone!

Is there any way to change the inputs order of a Composite TOP via python? I saw this post that mentions using a table to control the order, but couldn't figure out how, and they also mention not knowing about a way to directly order the inputs.

Thanks!
User avatar
velenoise
 
Posts: 5
Joined: Thu Nov 24, 2016 1:02 pm

Re: Composite TOP input order

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

You should be able to directly control them with the inputConnectors members.

For example.
Place down 3 constant TOPs, and a composite TOP, and run the following in a DAT:

Code: Select all
n1 = op('constant1')
n2 = op('constant2')
n3 = op('constant3')

m = op('comp1')

#clear existing
for i in m.inputConnectors:
   i.connect(None)
   
#set new order
m.inputConnectors[0].connect(n1)
m.inputConnectors[1].connect(n2)
m.inputConnectors[2].connect(n3)
User avatar
rob
Staff
 
Posts: 1547
Joined: Tue Nov 13, 2007 1:14 am

Re: Composite TOP input order

Postby velenoise » Sat Sep 15, 2018 7:40 pm

Thanks rob! I was wondering if there was a way to emulate the properties panel behaviour of sending an input up, but this way should be good already.
User avatar
velenoise
 
Posts: 5
Joined: Thu Nov 24, 2016 1:02 pm

Re: Composite TOP input order

Postby rob » Mon Sep 17, 2018 11:23 am

Not directly, but you should be able to code it with the above.
Cheers,
Rob.
User avatar
rob
Staff
 
Posts: 1547
Joined: Tue Nov 13, 2007 1:14 am


Return to General TouchDesigner Discussion

Who is online

Users browsing this forum: Google [Bot] and 7 guests