pymel.core.rendering.psdEditTextureFile

psdEditTextureFile(*args, **kwargs)

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

Dynamic library stub function

Flags:
Long name (short name) Argument Types Properties
addChannel (adc) unicode ../../../_images/create.gif
 
Adds an empty layer set with the given name to a already existing PSD file.
addChannelColor (acc) unicode, float, float, float ../../../_images/create.gif
 
  1. Specifies the filled color of the layer which is created in a layer set given by the layer name.
addChannelImage (aci) unicode, unicode ../../../_images/create.gif
 
  1. 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) unicode ../../../_images/create.gif
 

(M) Deletes the channels (layer sets) from a PSD file. This is a multiuse flag. Flag can have multiple arguments, passed either as a tuple or a list.

psdFileName (psf) unicode ../../../_images/create.gif
 
PSD file name.
snapShotImage (ssi) unicode ../../../_images/create.gif
 
Image file name on the disk containing UV snapshot / reference image.
uvSnapPostionTop (uvt) bool ../../../_images/create.gif
 

Specifies the position of UV snapshot image layer in the PSD file. Truepositions this layer at the top and Falsepositions 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

# 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')

Previous topic

pymel.core.rendering.psdChannelOutliner

Next topic

pymel.core.rendering.psdExport

Core

Core Modules

Other Modules

This Page