Hi I tried the following code to get a shader with some parameters but cant 
add setAttr and gives an error. following is the code

def createShader(shaderType='aiStandard', name='CHROME'):
    

#pm.setAttr('%s.weight' %(name),0.25) 
if name == '':
  name = shaderType
    name = pm.shadingNode(shaderType, asShader=True,  name=name)
    sg = pm.sets(renderable=True, noSurfaceShader=True, empty=True, 
name='%sSG' %(name))
       

what this does is create an aiStandard shader and rename it with Chrome. 
Please help me with this. Thanks in advance.



-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to python_inside_maya+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/50de078a-7b38-4032-937c-61b90b80cce6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to