- 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
sbsdialogstate
Module sbsdialogstate aims to provide useful functions to read and modify the converter parameters of the BakingParameters.
class pysbs.sbsbakers.sbsdialogstate.DialogState(aMeshName=u'', aFormat=u'ALG_BAKINGDIALOG_STATE', aVersion=4, aSelectionMode=None, aConverters=None, aCommonOutputParameters=None, aCommonToAllBakersParameters=None, aFromMeshParameters=None, aCommonAOParameters=None, aCommonCurvatureParameters=None, aCommonWSNormalsParameters=None, aSpecificColorMapParameters=None)
Class that contains information on the Baking Parameters of a Scene resource
- Members:
- mFormat (int): dialog state format. Default is 'ALG_BAKINGDIALOG_STATE'
- mVersion (int): dialog state version. Equals 2 with Substance Designer 5.x
- mMeshName (str): name of the Scene resource
- mConverters (list of
BakingConverter
): list of converters - mCommonOutputParameters (list of
BakingConverterParam
): list of common parameters: Output parameters - mCommonToAllBakersParameters (list of
BakingConverterParam
): list of common parameters: Common to all bakers - mFromMeshParameters (list of
BakingConverterParam
): list of common parameters: Common to all 'From Mesh' bakers - mCommonAOParameters (list of
BakingConverterParam
): list of common parameters: Common to all 'Ambient Occlusion' bakers - mCommonCurvatureParameters (list of
BakingConverterParam
): list of common parameters: Common to all 'Curvature' bakers - mCommonWSNormalsParameters (list of
BakingConverterParam
): list of common parameters: Common to all 'World Space Normals' bakers - mSpecificColorMapParameters (list of
BakingConverterParam
): list of common parameters: Common to all 'Color Map From Mesh' bakers
addConverter(aIdentifier)
Add a BakingConverter of the given kind
Parameters: | aIdentifier (BakerEnum ) -- Identifier of the converter to create |
---|---|
Returns: | The created BakingConverter object |
Raise: | SBSImpossibleActionError |
computeUniqueIdentifier(aIdentifier, aSuffixId = 0)
Check if the given identifier is already used and generate a unique identifier if necessary
Parameters: |
|
---|---|
Returns: | A unique identifier, which is either the given one or a new one with a suffix: identifier [id] |
fromQtVariantMap(aQtVariantMap)
Get the content of the given QtVariantMap to set the Dialog State
Parameters: | aQtVariantMap (QtVariantMap ) -- The variant map to use to build the Dialog State |
---|---|
Returns: | True if success |
getCommonAOParameter(aParamID)
Get the given parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getCommonCurvatureParameter(aParamID)
Get the given parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getCommonFromMeshParameter(aParamID)
Get the given parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the 'from mesh' parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getCommonOutputParameter(aParamID)
Get the given output parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the output parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getCommonToAllBakersParameter(aParamID)
Get the given common to all bakers parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getCommonWSNormalsParameter(aParamID)
Get the given parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
getConverter(aConverter)
Get the given converter from the list of defined converters.
Parameters: | aConverter (BakingConverter or BakerEnum or str) -- A BakingConverter object or an identifier (enum or str) |
---|---|
Returns: | The BakingConverter object if found, None otherwise |
getNbConverters()
Get the number of BakingConverter defined
Returns: | The number of BakingConverter as an integer |
---|
getSpecificColorMapParameter(aParamID)
Get the given parameter
Parameters: | aParamID (ConverterParamEnum or str) -- Identifier of the parameter to get |
---|---|
Returns: | The output parameter as a QtVariant if found, None otherwise |
moveDownConverter(aConverter)
Move down the given converter in the converters list
Parameters: | aConverter (BakingConverter or BakerEnum or str) -- Converter to move down in the converter list |
---|---|
Raise: | SBSImpossibleActionError |
moveUpConverter(aConverter)
Move up the given converter in the converters list
Parameters: | aConverter (BakingConverter or BakerEnum or str) -- Converter to move up in the converter list |
---|---|
Raise: | SBSImpossibleActionError |
removeConverter(aConverter)
Remove a given converter
Parameters: | aConverter (BakingConverter or BakerEnum or str) -- Converter to select or its identifier |
---|---|
Returns: | True if success, False otherwise |
Raise: | SBSImpossibleActionError |
selectConverter(aConverter, aSelected=True)
Select the given converter
Parameters: |
|
---|---|
Raise: |
|
setCommonOutputParameter(aParameter)
Set the given output parameter for all converter without override
Parameters: | aParameter (BakingConverterParam ) -- The output parameter to set |
---|---|
Raise: | SBSImpossibleActionError |
setCommonToAllBakerParameter(aParameter)
Set the 'Override Common Output File Parameters' option on the given converter
Parameters: | aParameter (BakingConverterParam ) -- The output parameter to set |
---|---|
Raise: | SBSImpossibleActionError |
toQtVariantMap()
Convert the object structure of the Dialog State into a QtVariantMap, in a format compatible with what is saved in the .sbs file
Returns: | A QtVariantMap object with the content of the DialogState |
---|