PDA

View Full Version : Asighing shader to all geo


nottoshabi
10-19-2011, 09: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.



cmds.select (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?

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

CGTalk Moderation
10-19-2011, 09: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.