Connections
ReferencesProvides access to a list of parameters as well as static methods for connecting and disconnecting parameters. The only way for external code to create or remove connections is via the static methods on this class.
Constructors
Properties
Indexers
Methods
Connect
#Create a connection between a source and a target parameter.
Parameters:
| source (IParameter) | |
| target (IParameter) | |
| undo (ActionList = null) |
Returns: True if connection was created.
Connect
#public static bool Connect(IParameter source, IParameter target, int indexAtSource, int indexAtTarget, ActionList undo = null)
Create a connection between a source and a target parameter.
Parameters:
| source (IParameter) | |
| target (IParameter) | |
| indexAtSource (int) | |
| indexAtTarget (int) | |
| undo (ActionList = null) |
Returns: True if connection was created.
CopyAllInputs
#Copy all incoming wires from one parameter to another.
Parameters:
| oldTarget (IParameter) | |
| newTarget (IParameter) | |
| undo (ActionList = null) |
Returns: Number of wires successfully copied.
CopyAllOutputs
#public static int CopyAllOutputs(IParameter oldSource, IParameter newSource, ActionList undo = null)
Copy all outgoing wires from one parameter to another.
Parameters:
| oldSource (IParameter) | |
| newSource (IParameter) | |
| undo (ActionList = null) |
Returns: Number of wires successfully copied.
CutOutMiddleMan
#public static bool CutOutMiddleMan(IParameter left, IParameter middle, IParameter right, ActionList undo = null)
Attempt to cut out the middle man from a triplet of connected parameters.
Parameters:
| left (IParameter) | Source parameter. |
| middle (IParameter) | Middleman. |
| right (IParameter) | Target parameter. |
| undo (ActionList = null) | Undo actions. |
Disconnect
#Remove the connection between a source and a target parameter.
Parameters:
| source (IParameter) | |
| target (IParameter) | |
| undo (ActionList = null) |
Returns: True if connection was removed.
DisconnectAllInputs
#Remove all sources from a specific parameter.
Parameters:
| target (IParameter) | |
| undo (ActionList = null) |
Returns: True if a change was made.
DisconnectAllInputsExcept
#Remove all sources but one from a specific parameter.
Parameters:
| target (IParameter) | |
| omit (Guid) | |
| undo (ActionList = null) |
Returns: True if a change was made.
DisconnectAllInputsExcept
#public static int DisconnectAllInputsExcept(IParameter target, HashSet<Guid> omissions, ActionList undo = null)
Remove all unmarked sources from a specific parameter.
Parameters:
| target (IParameter) | |
| omissions (HashSet<Guid>) | |
| undo (ActionList = null) |
Returns: True if a change was made.
DisconnectAllOutputs
#Remove all targets from a specific parameter.
Parameters:
| source (IParameter) | |
| undo (ActionList = null) |
Returns: True if a change was made.
DisconnectAllOutputsExcept
#Remove all targets but one from a specific parameter.
Parameters:
| source (IParameter) | |
| omit (Guid) | |
| undo (ActionList = null) |
Returns: True if a change was made.
DisconnectAllOutputsExcept
#public static int DisconnectAllOutputsExcept(IParameter source, HashSet<Guid> omissions, ActionList undo = null)
Remove all unmarked targets from a specific parameter.
Parameters:
| source (IParameter) | |
| omissions (HashSet<Guid>) | |
| undo (ActionList = null) |
Returns: True if a change was made.
IndexOf
#Find the index of a specific parameter within this list.
Parameters:
| parameter (Guid) | Parameter to search for. |
Returns: Index of parameter or -1 if the parameter was not found.
MigrateAllInputs
#public static int MigrateAllInputs(IParameter oldTarget, IParameter newTarget, ActionList undo = null)
Migrate all incoming wires from one parameter to another.
Parameters:
| oldTarget (IParameter) | |
| newTarget (IParameter) | |
| undo (ActionList = null) |
Returns: Number of wires successfully migrated.
MigrateAllOutputs
#public static int MigrateAllOutputs(IParameter oldSource, IParameter newSource, ActionList undo = null)
Migrate all outgoing wires from one parameter to another.
Parameters:
| oldSource (IParameter) | |
| newSource (IParameter) | |
| undo (ActionList = null) |
Returns: Number of wires successfully migrated.
Mimic
#Duplicate another set of connections. This is a low level method which should only be used with utmost care. If at all possible consider the static methods on this class for creating, removing, and copying connections.
Parameters:
| other (Connections) |
Mimic
#Duplicate another set of connections. This is a low level method which should only be used with utmost care. If at all possible consider the static methods on this class for creating, removing, and copying connections.
Parameters:
| other (Guid[]) |
ReplaceSource
#public static bool ReplaceSource(IParameter oldSource, IParameter newSource, IParameter target, ActionList undo = null)
Replace one source with another.
Parameters:
| oldSource (IParameter) | Source to disconnect from. |
| newSource (IParameter) | Source to connect to. |
| target (IParameter) | Target to affect. |
| undo (ActionList = null) | Optional undo list. |
ReplaceTarget
#public static bool ReplaceTarget(IParameter source, IParameter oldTarget, IParameter newTarget, ActionList undo = null)
Replace one target with another.
Parameters:
| source (IParameter) | Source to affect. |
| oldTarget (IParameter) | Target to disconnect. |
| newTarget (IParameter) | Target to connect. |
| undo (ActionList = null) | Optional undo list. |
SwapSources
#public static bool SwapSources(IParameter sourceA, IParameter sourceB, IParameter targetA, IParameter targetB, ActionList undo = null)
Swap the sources of two parameters. I.e. cross the wires.
Parameters:
| sourceA (IParameter) | |
| sourceB (IParameter) | |
| targetA (IParameter) | |
| targetB (IParameter) | |
| undo (ActionList = null) |
Returns: True if a swap was made.