- Substance 3D home
- Home
- Command Line Tools
- Command Line overview
- sbsbaker
- sbscooker
- sbsmtools
- sbsmutator
- sbsrender
- sbsupdater
- Command Line overview
- Pysbs - Python API
- Pysbs - Python API overview
- Getting started
- General topics
- Examples
- API Content
- API Content overview
- Substance definitions
- Common interfaces
- compnode
- context projectmgr
- graph
- mdl
- modelgraphindex
- modelannotationnames
- modelgraph
- modelgraphgenerator
- modelgraphimplementation
- modelnodenames
- modeloperand
- modulegraphindex
- moduleannotation
- moduleconnection
- modulegraph
- modulegraphgenerator
- modulegraphimplementation
- modulegraphlibrary
- modulegraphregister
- modulenode
- modulenodeimplementation
- modulenodeinstance
- moduleoperand
- moduleoutputbridging
- moduleparaminput
- params
- projectmgrdoc
- sbsarchive
- sbscommon
- sbspreset
- sbsproject
- substance
- Libraries
- sbsenum
- sbslibrary
- sbsbakerslibrary
- Helpers
- Execution context
- API Change log
- Samples
- Setup and Getting Started
- Integrations
- Substance Maya toolset
- Changelog overview
connections
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)
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information on a connection as defined in a .sbs file
- Members:
- mIdentifier (str): input identifier. Among
sbslibrary.__dict_CompNodeInputs
,sbslibrary.__dict_FunctionInputs
or 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.
- mIdentifier (str): input identifier. Among
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: |
|
---|
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class sbscommon.connections.SBSConnectionSplitpoint(aScenePos='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class 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.
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class sbscommon.connections.SBSGUIConnection(aIdentifier='', aConnRef='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Visual 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.
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class sbscommon.connections.SBSRouting(aInput='', aOutput='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Routing 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.
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|