- 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
mdlsbsbridge
Module mdlsbsbridge aims to define SBSObjects that are relative to a Substance graph instance in a MDL graph, mostly:
class mdl.mdlsbsbridge.MDLInputBridging(aLocalIdentifier='', aIdentifier='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information of an input bridging of a MDLImplSBSInstance as defined in a .sbs file.
- Members:
- mLocalIdentifier (str): Local identifier of the input
- mIdentifier (str): Identifier of the input
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 mdl.mdlsbsbridge.MDLOutputBridging(aUID='', aIdentifier='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information of an output bridging of a MDLImplSBSInstance as defined in a .sbs file.
- Members:
- mUID (str): UID of the output
- mIdentifier (str): Identifier of the 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: |
|
---|
class mdl.mdlsbsbridge.MDLParamValue(aValue=None, aTagName='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information on a MDL parameter value as defined in a .sbs file
- Members:
- mValue (str): value of the parameter.
- mTagName (str): the tag name associated to this parameter in the .sbs file (bool, int1,.., int4, float1,.., float4, string)
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.
getType()
Get the type of this value
Returns: | The type as a ParamTypeEnum if success, None otherwise |
---|
getTypedValue()
Get the value in the type of the parameter (bool, int, …).
Returns: | The value in the type of the parameter 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 |
getValue()
Get the value.
Returns: | The value as a string if defined, None otherwise |
---|
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
setValue(aValue, aType=None)
Set the value, and if aType is specified, set the tagname accordingly to the type of the value. If aType is let None, keep the current type.
Parameters: |
|
---|
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class mdl.mdlsbsbridge.MDLParameter(aName='', aValue=None, aIsDefaultValue=None)
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information of a parameter of a Substance Graph instance inserted in a MDLGraph.
- Members:
- mName (str): name of the parameter.
- mValue (
MDLParamValue
): value of this parameter. - mIsDefaultValue (str, optional): boolean indicating if the value of this parameter is the default one. Default to False
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.
getType()
Get the type of this parameter
Returns: | the type of this parameter as a ParamTypeEnum if possible, None otherwise |
---|
getTypedValue()
Get the value in the type of the parameter (bool, int, …).
Returns: | The value in the type of the parameter 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 |
getValue()
Get the value of this parameter
Returns: | the value as a string if it exists, None otherwise |
---|
isDefaultValue()
Returns: | True if this value is the default value of the parameter |
---|
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
setIsDefaultValue(isDefaultValue)
Set if this parameter has the default value or not.
Parameters: | isDefaultValue (bool) – True to define that this parameter has the default value. |
---|
setValue(aValue, aType=None)
Set the value of this parameter, and if aType is specified, set its type too, otherwise let the current type.
Parameters: |
|
---|
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|