Message 1 of 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi i am not being able to get the name of the material while running this script. Its on a standar Surface
import maya.cmds
objTransform = "pPlane200"
objMesh = cmds.listRelatives(objTransform, shapes=True)[0]
objSe = cmds.listConnections(objMesh, type="shadingEngine")[0]
objMat = cmds.listConnections(objMesh, ".surfaceShader") or [0]
print(objMat)
and i get this error l any help?
Error: ValueError: file <maya console> line 6: No object matches name: .surfaceShader
Solved! Go to Solution.