- 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
qtclasses
Content included in qtclasses module:
Module qtclasses provides an implementation of a very small subset of classes present in PyQt API, in particular the QVariant object, in order to handle the objects serialized in the .sbs file from a Qt object, as it is the case for the Baking Parameters.
class qtclasses.qtclasses.QtVariantTypeEnum
NONE = 0 BOOL = 1 INT = 2 DOUBLE = 6 VARIANT_MAP = 8 VARIANT_LIST = 9 STRING = 10 STRING_LIST = 11 BYTE_ARRAY = 12 URL = 17 SIZE = 21
class qtclasses.qtclasses.QtVariant(aType=None, aValue=None)
Bases: object
Class QtVariant provides the definition of a variant object.
- Members
-
- mType (
QtVariantTypeEnum
): type of the variant object - mValue (any type): value
- mType (
getValue()
Get the value of the variant object
Returns: | The value of the variant object |
---|
getValueStr()
Get the value of the variant object converted into a string
Returns: | The value of the variant object, as a string |
---|
setValue(aValue)
Set the value of the variant object, without modifying its type.
Parameters: | aValue (any type compatible with the current type of the variant object) – The value to set |
---|---|
Raise: | TypeError if the type of the value is incompatible with the type of the variant object |
class qtclasses.qtclasses.QtVariantMap(aMap)
getItem(aKey)
Get the variant object of the given key in the map
Parameters: | aKey (str) – The key to look for |
---|---|
Returns: | The variant object with this key if found, None otherwise |
getItemValue(aKey)
Get the value of the given key in the map
Parameters: | aKey (str) – The key to look for |
---|---|
Returns: | The value of the variant object with this key if found, None otherwise |
getSize()
Get the size of the map
Returns: | The size of the map as an integer |
---|
setItem(aKey, aValue)
Set the given item with the given key
Parameters: |
|
---|---|
Returns: | The size of the map as an integer |
pop(aKey, aDefault)
Remove the item at the given key and return it.
Parameters: |
|
---|---|
Returns: | The item removed if found, of the given default value if not found |
class qtclasses.qtclasses.QtColor(aMode=1, aAlpha=0, aC1=0, aC2=0, aC3=0, aC4=0)
Bases: object
Class QtColor provides the definition of a color.
- Members
-
- mMode (
QtColorModeEnum
)}: the color mode. - mAlpha (int): Alpha component value
- mC1 (int): First component value
- mC2 (int): Second component value
- mC3 (int): Third component value
- mC4 (int): Fourth component value
- mMode (
class QtColorModeEnum
Bases: object
Color mode enumeration
NONE = 0 ARGB = 1 AHSV = 2 ACMYK = 3 AHSL = 4
getColor()
Get the color in the appropriate format depending on the color mode (RGB or HSV)
Returns: | The color as a list of 4 int [R,G,B,A] or [H,S,V,A] |
---|
isRGBA()
Check if the color is defined as an RGBA color
Returns: | True if RGBA, False otherwise |
---|
isHSVA()
Check if the color is defined as an HSVA color
Returns: | True if HSVA, False otherwise |
---|
setColorRGBA(aColorRGBA)
Set the RGBA color with the provided values. R, G, B, and A component must be in the range [0;255]
Parameters: | aColorRGBA (list of 4 int in the range [0;255]) – The RGBA color to set |
---|---|
Returns: | nothing |
setColorHSVA(aColorHSVA)
Set the HSV and Alpha color with the provided values. H component must be in the range [0;359] S, V, and A component must be in the range [0;255]
Parameters: | aColorHSVA (list of 4 int. H in the range [0;359], S, V and A in the range [0;255]) – The HSVA color to set |
---|---|
Returns: | nothing |