I know the MEL command to remove an element of a multi is:
removeMultiInstance
It wouldn't be hard to make a script to check for weights with no associated targets and remove them.
You could add the code to: $MAYA_LOCATION/scripts/others/doBlendShape.mel so they always disappear.
EDIT: Seems like it always renames those attributes from "target_name" to "weight[?]" when it removes the target. So this script is a bit naive and just removes attributes named weight[?]. It may well fall apart on a real scene ;)
global proc cleanUpBlendShapeWeights(){
string $bs[] = `ls -sl -type "blendShape"`;
for ($b in $bs) {
string $weights[] = `listAttr -m ($b+".weight")`;
for ($w in $weights) {
if (`gmatch $w "weight\\[*\\]"`) {
removeMultiInstance ($b+"."+$w);
}
}
}
}
Save as cleanUpBlendShapeWeights.mel and source it.
Then pick the blendShape nodes and type in the scriptEditor
cleanUpBlendShapeWeights();
I’m a little bit embarrassed, I don’t understand .mel too well…I guess I don’t know what the naming should be. removeMultiInstance choice.input[4]; change to = removeMultiInstance Weight[7]; and so on?
http://joel3d.com/images2010/RemoveBlenshapeProblem2.jpg
Sorry to be so stupid.