replicator and automatic connection


I wonder if there is any way to automate the connection for node created with a replicator.
I replicate a select chop and I want them connected with a merge chop.
Even if the master node is connected , “Children” are not connected, I need to do it manually.



You could enter the Python script in the Script parameter of the replicator, and you’d use the connector class: … ctor_Class

Are you familiar with Python and scripting in TouchDesigner? If not, upload your file and I can show you.

Thanks Elburz.

I get it working with node but I get stuck with component.

I have a container with a few chop + out inside , which I replicate and I want then to connect to a merge chop.
So I tried :

It works with .outputConnectors.


The outputCOMPconnectors are the vertical comp-to-comp connectors.
You’re correct to use .outputConnectors which are the CHOP/SOP/MAT/DAT outputs in the component.

After a bit of confusion, I figured out how to do this with the new Replicator Callback DAT. “me.curItem” notation is out, but the following worked out great :smiley:

[code]def replicate(comp, allops, newops, template, master):

for c in newops:
	c.par.display = 1


1 Like

Say, I replicated 10 different TOPs. I which to use the 1st to the 4th operator to connect to 1 composition TOP and not all of the cloned (replicated) TOPs.

How do I achieve this in the replicator_callback code using output.Connectors?

Hi ,
you can add a counter in the loop that you can use as a conditional .

[code]def replicate(comp, allops, newops, template, master):

i = 0
for c in newops:
	c.par.display = 1
	if i <= 4 :