- 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
common
Module compnode.common provides the definition of SBSCompOutput
, SBSOutputBridging
and SBSCompImplWithParams
, which are used in the other modules in compnode
class compnode.common.SBSCompImplWithParams(aParameters=None)
Bases: pysbs.common_interfaces.sbsobject.SBSObject
This class allows to gather the parameter management for classes SBSCompFilter
, SBSCompInstance
, SBSCompInputBridge
and SBSParamsGraphData
- Members:
- mParameters (list of
SBSParameter
): input parameters list.
- mParameters (list of
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.
getDefinition()
Get the definition of the node (Inputs, Outputs, Parameters)
Returns: | a CompNodeDef object |
---|
getDisplayName()
Get the display name of this node
Returns: | the display name as a string |
---|
getParameterValue(aParameter)
Find a parameter with the given name/id among the overloaded parameters and the default node parameters, and return its value.
Parameters: | aParameter (CompNodeParamEnum or str) – Parameter identifier |
---|---|
Returns: | The parameter value if found (string or SBSDynamicValue , 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 |
hasIdenticalParameters(self, other)
Allows to check if two nodes has the same parameters defined with the same values.
Parameters: | other (SBSCompImplWithParams ) – the node to compare with |
---|---|
Returns: | True if the two nodes has the same parameters, False otherwise |
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
setDynamicParameter(aParameter, aRelativeTo = None)
Set the given parameter as dynamic, to init its params.SBSDynamicValue. If Inheritance is None, the default Inheritance for this node is set.
Parameters: |
|
---|---|
Returns: | the |
Raise: |
|
setParameterValue(aParameter, aParamValue, aRelativeTo = None)
Set the value of the given parameter to the given value, if compatible with this node.
Parameters: |
|
---|---|
Returns: | True if succeed, False otherwise |
Raise: |
|
unsetParameter(aParameter)
Unset the given parameter so that it is reset to its default value.
Parameters: | aParameter (CompNodeParamEnum or str) – identifier of the parameter to set |
---|---|
Returns: | True if succeed, False otherwise |
Raise: | api_exceptions.SBSLibraryError |
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class compnode.common.SBSCompInputValue(aIdentifier='', aType=None)
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information about an input value in a .sbs file
- Members:
- mIdentifier (str): Identifier for the input value.
- mType (str): Type for the value. Type definition:
ParamTypeEnum
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 compnode.common.SBSCompOutput(aUID='', aCompType=None)
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information on a compositing node output as defined in a .sbs file
- Members:
- mUID (str): node output unique identifier in the /compNodes/compOutputs/ context.
- mCompType (str): return type of the output (color or grayscale). Type definition:
ParamTypeEnum
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 compnode.common.SBSOutputBridging(aUID='', aIdentifier='')
Bases: pysbs.common_interfaces.sbsobject.SBSObject
Class that contains information on an output bridging as defined in a .sbs file
- Members:
- mUID (str): uid of the compositing node output (/compNode/compOutputs/compOutput/uid).
- mIdentifier (str): graph definition output identifier (/graph/graphOutputs/graphOutput/identifier)
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: |
|
---|