Composite TOP input order

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!

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]
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)[/code]

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.

Not directly, but you should be able to code it with the above.
Cheers,
Rob.