If you change the type of shader in Hypershade, Maya discards every time the name of your shader. So if you had a Lambert shader called “my_shader”, and you changed it to a Blinn shader, your shader would be automatically renamed “blinn1”.  If you don’t like this just go this folder:

C:\Program Files\Autodesk\Maya(version)\scripts\AETemplates and open AEshaderTypeNew.mel

Find this line (at the very bottom):

delete $shaderNode;

And add this line just after:

rename $replaceNode $shaderNode;


And Maya will keep the name of your existing shader!