- 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
modeloperand
Module moduleoperand aims to define SBSObjects that are relative to a model operand, Each class handle an operand type
class modelgraph.modeloperand.ModelBaseOperand(**kwargs)
Bases: pysbs.modulegraph.moduleoperand.ModuleOperand
ModelBaseOperand is the base class for operand, each typed operand inherited of ModelBaseOperand Members:
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 |
getValue()
Return value without special chars and type :return: str
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelBoolOperand(**kwargs)
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 |
getValue()
Return value in correct python form :return: bool
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: bool
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelEnumOperand(**kwargs)
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 |
getValue()
Return value in correct python form :return: int
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setType()
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: int
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelFloat2Operand(**kwargs)
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 |
getValue()
Return value in correct python form :return: list(float, float)
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: list(bool, bool) or tuple(bool, bool)
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelFloat3Operand(**kwargs)
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 |
getValue()
Return value in correct python form :return: list(float, float, float)
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: list(bool, bool, bool) or tuple(bool, bool, bool)
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelFloatOperand(**kwargs)
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 |
getValue()
Return value in correct python form :return: float
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: float
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelIntegerOperand(**kwargs)
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 |
getValue()
Return value in correct python form :return: int
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: int
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelListOperand(aClassType=<class 'float'>, **kwargs)
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 |
getValue()
Return value in correct python form :return: list()
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: list or tuple
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelSceneTreeOperand(**kwargs)
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 |
getValue()
Return value in correct python form :return: str
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue()
Set hardcoded value custom{scenetree}()
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|
class modelgraph.modeloperand.ModelStringOperand(**kwargs)
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 |
getValue()
Return value without special chars and type :return: str
parse(aContext, aDirAbsPath, aSBSParser, aXmlNode)
Parse recursively the given xml node to retrieve the content of the SBSObject.
promote()
Convert this base operand to a typed operand by surcharging the current class by a corresponding typed class
setMetaDataAcceptConnection(value=True)
Set the metadata ‘accept_connection’ to the corresponding value.
Parameters: | value (bool) – True or False |
---|
setValue(value=None)
Convert in the correct syntax for this operand type :param value: a value :type value: str
switchMetaDataDefault()
Helper to switch metadata ‘is_default_value’, used when a value is changed
write(aSBSWriter, aXmlNode)
Write recursively the content of the SBSObject into the given xml node.
Parameters: |
|
---|