Go to: Synopsis. Return value. Flags. Python examples.

Synopsis

psdEditTextureFile([addChannel=string], [addChannelColor=[string, float, float, float]], [addChannelImage=[string, string]], [deleteChannel=string], [psdFileName=string], [snapShotImage=string], [uvSnapPostionTop=boolean])

Note: Strings representing object names and arguments must be separated by commas. This is not depicted in the synopsis.

psdEditTextureFile is undoable, NOT queryable, and NOT editable.

Edits the existing PSD file. Addition and deletion of the channels (layer sets) are supported.

Return value

None

Flags

addChannel, addChannelColor, addChannelImage, deleteChannel, psdFileName, snapShotImage, uvSnapPostionTop
Long name (short name) Argument types Properties
addChannel(adc) string createmultiuse
Adds an empty layer set with the given name to a already existing PSD file.
addChannelColor(acc) [string, float, float, float] createmultiuse
(M) Specifies the filled color of the layer which is created in a layer set given by the layer name.
addChannelImage(aci) [string, string] createmultiuse
(M) Specifies the image file name whose image needs to be added as a layer to a given layer set which is the first string.
deleteChannel(deleteChannel) string createmultiuse
(M) Deletes the channels (layer sets) from a PSD file. This is a multiuse flag.
psdFileName(psf) string create
PSD file name.
snapShotImage(ssi) string create
Image file name on the disk containing UV snapshot / reference image.
uvSnapPostionTop(uvt) boolean create
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

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can have multiple arguments, passed either as a tuple or a list.

Python examples

import maya.cmds as cmds

# Create a Photoshop file with an image layer from a disk image file
cmds.psdTextureFile(xr=512, yr=512, ifn=('C:\\tex.jpg', 'layerSet1', 1), psf='C:\\final.psd')
# // Saved file: C:\final.psd #

# Create a poly plane
cmds.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
cmds.select('pPlane1')

# Create a snapshot file containing the UVs of pPlane1
cmds.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
cmds.psdEditTextureFile(aci=('layerSet2', 'C:\\tex1.jpg'), ssi='C:\\uvSnapshot.iff', uvt=1, psf='C:\\final.psd')