Dynamically change order of Input OPs in Composite TOP

Can anyone tell me is there a way to dynamically change the order of the Input Ops in a Composite TOP? I need to be able to change the depth order for composite operations at runtime.

I see that the Connector Class has OP.inputConnectors but the index member is read only.
Would have to be writable for this to work, (change order of connected objects) no?

You can certainly use the connector class to do this kind of operation, but It can get a bit dicey. I’d recommend that you use an approach that uses a set of Select TOPs:

This will let you keep a fixed layer order - this way you’ll always know a set layer order. You can then change the top parameter with a little scripting. Will that kind of approach work for you?

3 Likes

I use this exact select solution for this problem

1 Like