0

Hi everyone I am trying to write some script to automate my work in Maya.

Right now I am looking for the way to add materials to the hypershade.

I can't see anything on console (Script editor) so I can't se what python api I should use.

I know that maya treat materials as sets, and to assign a material to polygon I need to put it in this set, but I don't know how to create a new set.

So my question is: How I add a material to the scene using python maya-api?

4

1 回答 1

1

you have to use createNode :

node = cmds.createNode('blinn', name='yipikai')

于 2018-03-20T17:48:40.727 回答