Last updated on
May 24, 2023
- 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
psdparser
class psdparser.PSDLayer(aName, aLayerNo, aFormat, aWidth, aHeight, aDepth, aColorMode)
Bases: object
Class PSDLayer is used to gather information on a layer of a PSD file
- Members:
- mName (str): name of the function definition.
- mLayerNo (str): unique identifier in the package/ context.
- mFormat (str): various attributes
- mWidth (int): width in pixel
- mHeight (int): height in pixel
- mDepth (
sbsenum.OutputFormatEnum
): bit depth - mColorMode (
sbsenum.ColorModeEnum
): color mode
static convertColorToSbsEnum(aColor)
static convertDepthToSbsEnum(aDepth)
getFilterParamColor()
getFilterParamSize()
psdparser.extractCompositeTo(aContext, aPsdFileAbsPath, aDestinationFolder)
Extract the composite image of the given .psd file into a .png file, and save it in the destination folder.
Parameters: |
|
---|---|
Returns: | the output path as a string |
psdparser.extractLayerTo(aContext, aPsdFileAbsPath, aLayer, aDestinationFolder)
Extract the layer image of the given .psd file into a .png file, and save it in the destination folder.
psdparser.getLayers(aContext, aPsdFileAbsPath)
Get the list of layers included in the given .psd file.
psdparser.getPsdLayerFromList(aPsdLayerList, aLayerName)
psdparser.getPsdLayerNameFromResource(aResource)
Parameters: | aResource (class:.SBSResource) – A Resource which should be based on a .psd layer |
---|---|
Returns: | The layer name as save in the .psd file, or None if the resource is not extracted from a .psd file |