Kostyuk Rostyslav
Kostyuk Rostyslav

Reputation: 417

How to add an material to the maya scene?

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?

Upvotes: 0

Views: 894

Answers (1)

DrWeeny
DrWeeny

Reputation: 2512

you have to use createNode :

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

Upvotes: 1

Related Questions