Creates a Photoshop file with UVSnap shot image and the layer set names as the input.
Dynamic library stub function
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
channelRGB (chc) | unicode, int, int, int, int | ||
(M) Layer set names, index, red, green and blue values are given as input. Using this flag, the layers created can be filled with specified colors. This is a multi use flag. The index specifies the placement order of layer sets in the created file. |
|||
channels (chs) | unicode, int, bool | ||
(M) Layer set names and index are given as input. This is a multi use flag. A layer set with the given name will be created. The second argument is the index which specifies the placement order of layer sets in the created file. The third argument is a boolean, if “true” a layer is created inside the layer set , “false” creates an empty layer set |
|||
imageFileName (ifn) | unicode, unicode, int | ||
Image file name, Layerset name and index. The image in the file will be transferred to layer set specified. The index specifies the placement order of layer sets in the created psd file. The image file specified can be in any of the formats supported by maya (ex. iff, jpg, gif, tif etc.) |
|||
psdFileName (psf) | unicode | ||
|
|||
snapShotImageName (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 fileFlag can appear in Create mode of commandFlag can have multiple arguments, passed either as a tuple or a list. |
|||
xResolution (xr) | int | ||
|
|||
yResolution (yr) | int | ||
|
Derived from mel command maya.cmds.psdTextureFile
Example:
import pymel.core as pm
# Create a poly plane
pm.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
# Result: [nt.Transform(u'pPlane1'), nt.PolyPlane(u'polyPlane1')] #
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 #
# Create a Photoshop file containing a UV snapshot layer from UV snapshot file we have just created and an image layer from a disk image file
pm.psdTextureFile(xr=512, yr=512, ifn=('C:\\tex.jpg', 'layerSet1', 1), ssi='C:\\uvSnapshot.iff', uvt=1, psf='C:\\final.psd')
# // Saved file: C:\final.psd #