Writes the Photoshop file layer set into different formats. The output file depth (bit per channel ) can be different from that of the input. If the input is 16 bpc and output is 8 bpc, there will be data loss. In query mode, return type is based on queried flag.
Dynamic library stub function
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
alphaChannelIdx (aci) | int | ||
Index of the alpha channel to output, if not supplied, writes out the default alpha channel. The index is zero based. This is useful to write out specific alpha channels available as Additional Alpha Channelsof Photoshop. |
|||
bytesPerChannel (bpc) | int | ||
|
|||
emptyLayerSet (els) | bool | ||
Option to check if the given layer set is empty or not. This should be used in query mode and input file name and layer set names should be specified. Flag can have multiple arguments, passed either as a tuple or a list. |
|||
format (format) | unicode | ||
|
|||
layerName (lyn) | unicode | ||
|
|||
layerSetName (lsn) | unicode | ||
|
|||
outFileName (ofn) | unicode | ||
|
|||
preMultiplyAlpha (pma) | bool | ||
|
|||
psdFileName (ifn) | unicode | ||
|
Derived from mel command maya.cmds.psdExport
Example:
import pymel.core as pm
# Write the layer set 1 of psd file as 16 bit tif file
pm.psdExport( ifn='/tmp/test.psd', ofn='/tmp/test.set1.tif', lsn='Set 1', format='tif', bpc=2 )
# Query if the layer set "Set 2" is empty.
pm.psdExport( ifn='/tmp/test.psd', lsn='Set 2', q=True, els=True )