Connector Class

From Derivative
Jump to: navigation, search

The Connector class describes the input or output connection point of an operator. There are two types of connections: those between Components, and those between regular operators. Connections between regular operators can be accessed through the OP.inputConnectors and OP.outputConnectors members. Connections between components can be accessed through the COMP.inputCOMPConnectors and COMP.outputCOMPConnectors members.


Members[edit]

indexint (Read Only):

The numeric index of this connector.

isInputbool (Read Only):

True when the connector is an input.

isOutputbool (Read Only):

True when the connector is an output.

inOPOP (Read Only):

Will return any input operators (e.g. inSOP, inCHOP) associated with this connector. This only applies to regular operator connections attached to components.

outOPOP (Read Only):

Will return any output operators (e.g. outSOP, outCHOP) associated with this connector. This only applies to regular operator connections attached to components.

ownerOP (Read Only):

The OP to which this object belongs.

connectionslist (Read Only):

The list of connector objects connected to this object.

Methods[edit]

connect(target)None:

Wire this connector to a target location. The target may be an operator or another connector.

When the connector is an input, its connection is replaced with the target. When the connector is an output, a new connection is appended to the target.

  • target - The OP or connector you want to connect to.
# connect noise1 to lag1
op('noise1').outputConnectors[0].connect(op('lag1'))

# connect choptotop1 to 2nd input of displace1
op('choptotop1').outputConnectors[0].connect(op('displace1').inputConnectors[1])

# connect geo1 to geo2, two equivalent methods:
op('geo1').outputCOMPConnectors[0].connect(op('geo2'))
op('geo2').inputCOMPConnectors[0].connect(op('geo1'))

disconnect()None:

Disconnect this connector.

op('lag1').inputConnectors[0].disconnect()
op('lag1').outputConnectors[0].disconnect()

# disconnect geo2 from geo1, two equivalent methods
op('geo1').outputCOMPConnectors[0].disconnect()
op('geo2').inputCOMPConnectors[0].disconnect()

TouchDesigner Build:

The notch on the left and right of each Node that lets you connect a Wire from the output of one operator to the input of another operator of the same Operator Family.

Any of the procedural data operators. OPs do all the work in TouchDesigner. They "cook" and output data to other OPs, which ultimately result in new images, data and audio being generated. See Node.

The connection of an output of one node to the input of another node in a network. In contrast, see Link.