Removing blendShape targets from blendShape node

Its really irritating that maya doesn’t allow any simple way of removing blendshape target (the attribute itself and Information stored) from blendShape node that already has his targets removed. The remove blendShape option only allow to remove those blendshape target index that already has there targets. If you see through hyperGraph connections you will see there is connection from shape node of targetShape.worldMesh[0] to your blendShape node to inputTarget multi index that will something like blendShape1.inputTarget[0].inputTargetGroup[0].inputTargetItem[6000].inputGeomTarget (a multiElement) all further targets you add will have something called weight index which is equivalent to inputTargetGroup[#] number. you can also query index number using this mel command aliasAttr -rm blendShape1.targetNameAttr; it will remove the alias name out of blendShape attribute and give you weight index number.

WeightIndex

in above example 0 is the weight index. I hope i am able to explain how maya is storing blendShape in multiElement. I have written a script to remove blendshape targets with blendshape and target name as input. download it

scPurgeShapes.mel

Advertisements

One thought on “Removing blendShape targets from blendShape node

  1. Hi, I have the exact same problem and came already up with a similar solution.
    However, my and your script doesnt work for me (Maya 2012) as every run of the script ironically creates two more attribute instances (or indices)…which I originally wanted to remove.

    Do you know any fix for that?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s