View Full Version : Asighing shader to all geo

10 October 2011, 08:09 PM
Im trying to assign the default Lambert 1 to all the geo in my file. And this line does of code does not do anything. I dont even get an error. (allGeo)
cmds.hyperShade (asign='initialShadingGroup')

I also noticed that maya uses a set to do the assign, but when I tryed add this line in nothing happens.

cmds.sets('initialShadingGroup', edit=True, forceElement=True )

How would you guys go about doing this?

10 October 2011, 08:50 PM
# hypershade command assigns SHADERS, not shadingEngines
cmds.hyperShade(assign='lambert1') # and you spelled assign wrong
cmds.sets(allGeo, edit=True, forceElement='initialShadingGroup')

CGTalk Moderation
10 October 2011, 08:50 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.