renameBlendshape(blendshapeNode, blendAttrOld, blendAttrNew, message=True)

Function for renaming blendshape target attributes. Annoying because cmds does not support it and blendshapes are index’s with aliased names.

Loops over the blendshape and queries the index to find the alias’s name then replaces the alias if a match.

Credit, original version from Evan Cox

  • blendshapeNode – The blendshape node name

  • blendAttrOld (str) – The old blendshape name “pCube1”

  • blendAttrNew (str) – The new blendshape name “aNiceName”

  • message (bool) – Report any messages to the user?