Hi! I'm trying to assign a material to an object in the script editor using 
python. I've managed to assign the object to maya_material_x, but can't 
seem to find a way to make it one of the presets! Help would be greatly 
appreciated. :)

def applyMaterial():
    myShader = mc.shadingNode('mia_material_x', asShader=True)
    mc.select('myStep*')
    mc.hyperShade(assign = myShader) 


Simple really, don't know why I can't figure it out. XD

Kate

-- 
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/25b05c27-2e35-4bec-abc5-f4c19dc2a40b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to