- 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
qtvariantreader
Module qtvariantreader provides the class QtVariantReader which allows the deserialization of a QVariant object.
class pysbs.qtclasses.qtvariantreader.QtVariantReader
Bases: object
Class QtVariantReader allows to read (deserialize) a QtVariant
object from a Byte Array or a base64 encoded string.
static bytesToBool(aStr)
Convert the given string in hexadecimal into a bool
Parameters: | aStr (bytes) – The string to convert |
---|---|
Returns: | The result of the conversion as a bool |
static bytesToChar(aStr)
Convert the given string in hexadecimal into a char
Parameters: | aStr (bytes) – The string to convert |
---|---|
Returns: | The result of the conversion as a char |
static bytesToInt(aStr)
Convert the given string in hexadecimal into an integer
Parameters: | aStr (bytes) – The string to convert |
---|---|
Returns: | The result of the conversion as an integer |
static bytesToInt16(aStr)
Convert the given string in hexadecimal into an integer
Parameters: | aStr (bytes) – The string to convert |
---|---|
Returns: | The result of the conversion as an integer |
static bytesToInt8(aStr)
Convert the given string in hexadecimal into an integer
Parameters: | aStr (bytes) – The string to convert |
---|---|
Returns: | The result of the conversion as an integer |
getFromBase64String(aEncodedString, aType)
Read the given base64 encoded string and return the included QtVariant which must be of the given type
Parameters: |
|
---|---|
Returns: | The |
getFromByteArray(aByteArray, aType)
Read the given byte array and return the included QtVariant which must be of the given type
Parameters: |
|
---|---|
Returns: | The |
readBool()
Read 1 bytes as a Boolean
Returns: | The next boolean as a Boolean |
---|
readByteArray()
Read the next ByteArray
Returns: | The ByteArray as a String |
---|
readChar()
Read 1 bytes as a char
Returns: | The next character as a string |
---|
readDouble()
Read 8 bytes as a double
Returns: | The next double as an Double |
---|
readInt()
Read 4 bytes as an integer
Returns: | The next integer as an Integer |
---|
readInt16()
Read 2 bytes as an integer
Returns: | The next integer as an Integer |
---|
readInt8()
Read 1 byte as an integer
Returns: | The next integer as an Integer |
---|
readKey()
Read the next key (=size of the key + string)
Returns: | The key as a String |
---|
readQtVariant()
Read the next variant item (=type + value)
Returns: | The variant item as a QtVariant |
---|
readQtVariantList()
Read the next variant list
Returns: | The variant map as a list of QtVariant |
---|
readQtVariantMap()
Read the next variant map
Returns: | The variant map as a dictionary of QtVariant |
---|
readQtVariantString()
Read the next string
Returns: | The bytes as a String |
---|
readQtVariantValue()
Read the next variant item value, according to the given type
Returns: | The variant item as a QtVariant |
---|
readSize()
Read the next size object
Returns: | The size as a tuple(int width,int height) |
---|
readString()
Read aSize bytes as a string
Returns: | The bytes as a String |
---|
readStringList()
Read the next string list
Returns: | The string map as a list of string |
---|
readURL()
Read the next URL
Returns: | The url as a string |
---|