connections module
Module connections provides the definition of the classes SBSConnection and SBSConnectionSplitpoint,
which define the connection between two nodes (compositing nodes, function nodes or FxMap nodes)
- class sbscommon.connections.SBSConnection(aIdentifier='', aEntry=None, aConnRef=None, aConnRefOutput=None, aSplitpoints=None, aDisplayType=None)
Bases:
SBSObjectClass that contains information on a connection as defined in a .sbs file
- Members:
mIdentifier (str): input identifier. Among
sbslibrary.__dict_CompNodeInputs,sbslibrary.__dict_FunctionInputsor free string.mEntry (str, deprecated): entry identifier, specific to SBSCompNode type.
mConnRef (str): uid of the node (/compNode/uid) connected to this input.
mConnRefOutput (str, optional): uid of the output of the node connected to this input (/compNode/compOutputs/compOutput/uid). Present only if the node has multiple outputs.
mSplitpoints (list of
SBSConnectionSplitpoint): splitpoint list.mDisplayType (str): display type (connection is represented in GUI layout either by a line linking the nodes or by a portal symbol)
- equals(other)
Check if this SBSObject is equivalent to the other SBSObject. Some members may be excluded from this check, the UIDs or GUILayout for instance.
- getConnectedNodeOutputUID()
Get the UID of the connected output (member mConnRefOutput).
- Returns:
The UID as a string if defined, None otherwise.
- getConnectedNodeUID()
Get the UID of the connected node (member mConnRef).
- Returns:
The UID as a string if defined, None otherwise.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- setConnection(aConnRefValue, aConnRefOutputValue=None)
Set the connection.
- Parameters:
aConnRefValue (str) – The UID of node to connect from
aConnRefOutputValue (str, optional) – The UID of the output of this node to connect. Can be None if the node has only one output.
- class sbscommon.connections.SBSConnectionSplitpoint(aScenePos='')
Bases:
SBSObjectClass that contains information on a splitpoint of a connection as defined in a .sbs file
- Members:
mScenePos (str): splitpoint scene position.
- equals(other)
Check if this SBSObject is equivalent to the other SBSObject. Some members may be excluded from this check, the UIDs or GUILayout for instance.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- class sbscommon.connections.SBSGUIConnection(aIdentifier='', aConnRef='')
Bases:
SBSObjectVisual connections only
- Members:
mIdentifier (str): identifer.
mConnRef (str): id ref of the conenction.
- equals(other)
Check if this SBSObject is equivalent to the other SBSObject. Some members may be excluded from this check, the UIDs or GUILayout for instance.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
- class sbscommon.connections.SBSRouting(aInput='', aOutput='')
Bases:
SBSObjectRouting between input and output node used for disable option
- Members:
mInput (str): input.
mOutput (str): output.
- equals(other)
Check if this SBSObject is equivalent to the other SBSObject. Some members may be excluded from this check, the UIDs or GUILayout for instance.
- getUidIsUsed(aUID)
Check if the given uid is already used in the context of this SBSObject.
- Parameters:
aUID (str) – UID to check
- Returns:
True if the uid is already used, False otherwise
- Raise:
AttributeError if the function getUidIsUsed in not properly overloaded on this SBSObject
- parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.