- 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
sbsbakingconverter
Module sbsbakingconverter aims to provide the definition of a BakingConverter.
class pysbs.sbsbakers.sbsbakingconverter.BakingConverter(aIdentifier='', aConverterID='', aBakerType='imagemeshconverter', aIsSelected=True, aForcedOutputFormat=None, aCommonProperties=None, aProperties=None, aOverrides=None, aGlobalParams=None)
Bases: object
This class provide the definition of a Baking converter.
- Members
- mConverterID (str): id of the converter (unique)
- mBakerType (str): Kind of converter, between ‘imagemeshconverter’ (default) and ‘vectorialmeshconverter’
- mIdentifier (str): identifier of the converter
- mIsSelected (bool): True to activate this baker. Default to True
- mForcedOutputFormat (str): Allow to force a particular output format for this converter. Default to None
fromSBSTree(self, aIndexConverter, aSBSTree, removeUsedOptions = False)
Parse the given sbs tree to set the BakingConverter
Parameters: |
|
---|---|
Returns: | True if success |
getAllParameters()
Get all the parameters defined on this Baker
Returns: | a list of BakingParam |
---|
getOverrideState(aParameter)
Get the given parameter override state
Parameters: | aParameter (ConverterParamEnum or str) – Identifier of the parameter to get |
---|---|
Returns: | The override state as a boolean if possible, None otherwise |
getParameter(aParameter)
Get the given parameter
Parameters: | aParameter (ConverterParamEnum or str) – Identifier of the parameter to get |
---|---|
Returns: | The parameter as a QtVariant if found, None otherwise |
Raise: | api_exceptions.SBSLibraryError |
getParameterValue(aParameter)
Get the value of the parameter with the given identifier
Parameters: | aParameter (ConverterParamEnum or str) – Identifier of the parameter to get |
---|---|
Returns: | The parameter value in the type of the parameter if found, None otherwise |
moveDown()
Move down this converter in the list of the parent baking parameters
moveUp()
Move up this converter in the list of the parent baking parameters
resetDefaultProperty(aParameter)
Reset the given overriden default property, to match the global default property of the Baking Parameters
Parameters: | aParameter (ConverterParamEnum or str) – The property to reset |
---|
setFileParameterValueFromPath(aParameter, aAbsPath)
Set the file path value of the given parameter as the relative path of the given resource. Only parameters ‘MESH__CAGE_FILE’, ‘MESH__SKEW_MAP’, ‘NORMAL_MAP’, ‘TEXTURE_FILE’, ‘DIRECTION_FILE’ can be set by this function. An exception will be raised if the parameter is not appropriate.
Parameters: |
|
---|---|
Returns: | True if success, False otherwise |
Raise: |
|
setFileParameterValueFromPreviousBaker(aParameter, aPreviousBaker)
Set the file path value of the given parameter as the relative path of the given resource. Only parameters ‘NORMAL_MAP’, ‘TEXTURE_FILE’, ‘DIRECTION_FILE’ can be set by this function. An exception will be raised if the parameter is not appropriate or if the converter is invalid.
Parameters: |
|
---|---|
Returns: | True if success, False otherwise |
Raise: |
|
setFileParameterValueFromResource(aParameter, aResource)
Set the file path value of the given parameter as the relative path of the given resource. Only parameters ‘MESH__CAGE_FILE’, ‘MESH__SKEW_MAP’, ‘NORMAL_MAP’, ‘TEXTURE_FILE’, ‘DIRECTION_FILE’ can be set by this function. An exception will be raised if the resource is invalid or if the parameter is not appropriate.
Parameters: |
|
---|---|
Returns: | True if success, False otherwise |
Raise: |
|
setGlobalParams(aGlobalParams)
Set the reference to the parent Global Parameters
Parameters: | aGlobalParams (BakingParameters ) – The global parameters that include this converter |
---|---|
Returns: | Nothing |
setParameterValue(aParameter, aParamValue)
Set the value of the given parameter on this converter. Raise an exception if the parameter is not allowed on this converter.
Parameters: |
|
---|---|
Returns: | Nothing |
Raise: |
|
setSelected(aSelected)
Select or deselect for the baking
Parameters: | aSelected (bool) – True to select the converter, False to deselect it |
---|
toSBSOptionList(aIndexConverter)
Convert the object structure of the BakingConverter into a list of sbs options, as it is saved in the .sbs file
Parameters: | aIndexConverter (int) – Index of this converter in the Baking Parameters |
---|---|
Returns: | A list of SBSOptions object with the content of the BakingConverter |
updateDefaultProperties()
Update all the default properties that are not overriden, to match the global default properties of the Baking Parameters
updateDefaultProperty(aParameter)
Update the given default property if it is not overriden, to match the global default property of the Baking Parameters
Parameters: | aParameter (ConverterParamEnum or str) – The property to update |
---|