10.10.09

Keep Maya from renaming your shaders.

Posted in MEL, update at 11:32 am by Seith

Every time you change a shader’s type in Maya’s attribute editor, Maya discards the name of your shader. So if you had a shader called “my_carefully_named_shader” that happened to be a Lambert, and you changed it to a Blinn, your shader would be automatically renamed “blinn1″. Great, no? No. So if like me you’re tired of Maya renaming your shaders when it shouldn’t, just go to C:\Program Files\Autodesk\Mayaxxxx\scripts\AETemplates and open AEshaderTypeNew.mel. In the last proc (called AEshaderTypeCB(…)) find this line (usually 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! Yay!

1 Comment »

  1. Randa said,

    May 14, 2010 at 10:12 pm

    Love your seamless ik/fk joint system. Thank you, thank you, thank you!I’ve been looking for a way to do that for what seems forever.

    And kudos on “Despicable Me”, awesome minions!

    Cheers,

    Randa

Leave a Comment