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


launchImageEditor( [filename] , [editImageFile=string], [viewImageFile=string])

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

launchImageEditor is undoable, NOT queryable, and NOT editable.

Launch the appropriate application to edit/view the image files specified. This command works only on the Macintosh and Windows platforms.

Return value



editImageFile, viewImageFile
Long name (short name) Argument types Properties
editImageFile(eif) string create
If the file is a PSD, then the specified verison of Photoshop is launched, and the file is opened in it. If file is any other image type, then the preferred image editor is launched, and the file is opened in it.
viewImageFile(vif) string create
Opens up an Image editor to view images.

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 blinn shader with a psd file texture.
cmds.shadingNode('blinn', asShader=True)
cmds.sets(renderable=True, noSurfaceShader=True, empty=True, name='blinn1SG')
cmds.connectAttr('blinn1.outColor', 'blinn1SG.surfaceShader', f=True)
cmds.shadingNode('psdFileTex', asTexture=True)
cmds.connectAttr('psdFileTex1.outColor', 'blinn1.color')
cmds.setAttr('psdFileTex1.fileTextureName', 'C:/test.psd', type='string')

# Create a poly plane, and assign the blinn shader to it.
cmds.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
cmds.sets(e=True, forceElement='blinn1SG')

# Now you can launch Photoshop to edit this psd texture file