Hi All! I'm creating a tool that involves creating a PSD file texture node through a Python script. In the above picture, a texture node created through script is on the left ('scriptTex') and a texture node created through the Hypershade in Maya is on the right ('psdFileTex2').
Notice that the texture on the left is brighter than the one on the right (this affects the artwork when a psd file is applied). Has anyone else experienced this? Is there something I'm overlooking or a fix? This is on Maya 2016 SP5.
And here is a script to create the texture node with incoming connections from a 2d Placement node.
Thank you for any help provided!
psdTex = cmds.shadingNode('psdFileTex', asTexture=True, name='scriptTex')
psdPlace2d = cmds.shadingNode('place2dTexture', asUtility=True, name='scriptPlace2d')
cmds.connectAttr(psdPlace2d+'.outUV', psdTex+'.uvCoord')
cmds.connectAttr(psdPlace2d+'.outUvFilterSize', psdTex+'.uvFilterSize')
cmds.connectAttr(psdPlace2d+'.vertexCameraOne', psdTex+'.vertexCameraOne')
cmds.connectAttr(psdPlace2d+'.vertexUvOne', psdTex+'.vertexUvOne')
cmds.connectAttr(psdPlace2d+'.vertexUvThree', psdTex+'.vertexUvThree')
cmds.connectAttr(psdPlace2d+'.vertexUvTwo', psdTex+'.vertexUvTwo')
cmds.connectAttr(psdPlace2d+'.coverage', psdTex+'.coverage')
cmds.connectAttr(psdPlace2d+'.mirrorU', psdTex+'.mirrorU')
cmds.connectAttr(psdPlace2d+'.mirrorV', psdTex+'.mirrorV')
cmds.connectAttr(psdPlace2d+'.noiseUV', psdTex+'.noiseUV')
cmds.connectAttr(psdPlace2d+'.offset', psdTex+'.offset')
cmds.connectAttr(psdPlace2d+'.repeatUV', psdTex+'.repeatUV')
cmds.connectAttr(psdPlace2d+'.rotateFrame', psdTex+'.rotateFrame')
cmds.connectAttr(psdPlace2d+'.rotateUV', psdTex+'.rotateUV')
cmds.connectAttr(psdPlace2d+'.stagger', psdTex+'.stagger')
cmds.connectAttr(psdPlace2d+'.translateFrame', psdTex+'.translateFrame')
cmds.connectAttr(psdPlace2d+'.wrapU', psdTex+'.wrapU')
cmds.connectAttr(psdPlace2d+'.wrapV', psdTex+'.wrapV')
cmds.setAttr(psdTex+'.colorSpace', 'sRGB', type='string')
Replies
node.colorManagementEnabled == True
node.workingSpace == 'scene-linear Rec 709/sRGB'
In older versions of Maya, those attributes were set to False and an empty string respectively. I was developing the tool in 2015 and didn't run into this problem until a coworker was testing it in 2016. The values above are the default values for 2016. Now I need to add in a check for the Maya version number to see if it's necessary to change those attributes or not. Thanks Autodesk...