Launch the appropriate application to edit/view the image files specified. This command works only on the Macintosh and Windows platforms.
Long name (short name) | Argument Types | Properties | |
---|---|---|---|
editImageFile (eif) | unicode | ![]() |
|
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) | unicode | ![]() |
|
|
Derived from mel command maya.cmds.launchImageEditor
Example:
import pymel.core as pm
import maya.cmds as cmds
# Create a blinn shader with a psd file texture.
pm.shadingNode('blinn', asShader=True)
# Result: nt.Blinn(u'blinn1') #
pm.sets(renderable=True, noSurfaceShader=True, empty=True, name='blinn1SG')
# Result: nt.ShadingEngine(u'blinn1SG') #
pm.connectAttr('blinn1.outColor', 'blinn1SG.surfaceShader', f=True)
pm.shadingNode('psdFileTex', asTexture=True)
# Result: nt.PsdFileTex(u'psdFileTex1') #
pm.connectAttr('psdFileTex1.outColor', 'blinn1.color')
pm.setAttr('psdFileTex1.fileTextureName', 'C:/test.psd', type='string')
# Create a poly plane, and assign the blinn shader to it.
pm.polyPlane(w=10, h=10, sx=10, sy=10, n='pPlane1')
# Result: [nt.Transform(u'pPlane1'), nt.PolyPlane(u'polyPlane1')] #
pm.sets(e=True, forceElement='blinn1SG')
# Now you can launch Photoshop to edit this psd texture file
pm.launchImageEditor(eif=pm.getAttr('psdFileTex1.fileTextureName'))