Edits the existing PSD file. Addition and deletion of the channels (layer sets) are supported.
Dynamic library stub function
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
addChannel (adc) | unicode | ||
|
|||
addChannelColor (acc) | unicode, float, float, float | ||
|
|||
addChannelImage (aci) | unicode, unicode | ||
|
|||
deleteChannel (deleteChannel) | unicode | ||
(M) Deletes the channels (layer sets) from a PSD file. This is a multiuse flag.Flag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
psdFileName (psf) | unicode | ||
|
|||
snapShotImage (ssi) | unicode | ||
|
|||
uvSnapPostionTop (uvt) | bool | ||
Specifies the position of UV snapshot image layer in the PSD file. “True” positions this layer at the top and “False” positions the layer at the bottom next to the background layer in the PSD file |
Derived from mel command maya.cmds.psdEditTextureFile
Example:
import pymel.core as pm
import maya.cmds as cmds
# Create a Photoshop file with an image layer from a disk image file
pm.psdTextureFile(xr=512, yr=512, ifn=('C:\\tex.jpg', 'layerSet1', 1), psf='C:\\final.psd')
# // Saved file: C:\final.psd #
# Create a poly plane
pm.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
pm.select('pPlane1')
# Create a snapshot file containing the UVs of pPlane1
pm.uvSnapshot(n='C:\\uvSnapshot.iff', xr=512, yr=512, o=True)
# // Saved file: C:\uvSnapshot.iff #
# Edit the "final.psd" file which we have created, add a UV snapshot layer from snapshot file and an image layer from disk image file
pm.psdEditTextureFile(aci=('layerSet2', 'C:\\tex1.jpg'), ssi='C:\\uvSnapshot.iff', uvt=1, psf='C:\\final.psd')