ya know how if you open a shader up in the Attribute Editor there's that pull down menu where you can change it from one shading model to another (Lambert, Blinn, Phong, Anisotropic, and so on) and it'll keep the attribute connections.
Well I've been trying to figure out how to do that through MEL. I haven't been able to find any reference to it in the manuals. When I look at "echo all commands" it seems that Maya is creating a brand new material, reading the connections from the old one, reconnecting to the new one, and deleting the old one. Makes sense. But AFAIK there is no one single command for that procedure.
I'd really rather not have to re-invent the wheel and go through all those steps manually in my script. So does anyone know of an easy way to accomplish this?
The eventual goal is to turn everything into a Lambert while retaining the Transparency attribute but reconnecting the Color to something else.
Does this make any sense?
Any help or just a push in the right direction would be greatly appreciated.
-James