Accessing Connections To and
From Attributes
Given an MPlug to a specific attribute, we can use the connectedTo
member function to query connections to that node. The connectedTo
member function takes 3 parameters; The first parameter will hold
the returned list of attribute plugs; The 2nd and 3rd parameters
determine whether destination or source plugs are returned.
To retrieve a list of input connections to this attribute, we
simply ask connectedTo to return the connections where this plug
is used as the destination. We can do the same thing for the output
plugs.
|