- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
One of our scenes is filled with an absurd amount of blend shape groups in the shape editor. These groups number in the thousands and contain no blend shapes or targets.
I'm not clear how they get added as the group names reflect the file (versions) names. Nothing in our process adds these groups and the setAttr on the shapeEditorManager node uses a somewhat obscure indexing to create the hierarchies. I have a feeling something in the import process creates these entries, as we get a number of crashes in TDNshapeEditorManager::mergeDirectories on import. This particular show is using Maya 2016.
Anyway, I want to remove them via a Python script, but my script is not working:
import maya.cmds as cmds
sz = cmds.getAttr('shapeEditorManager.blendShapeDirectory', s = True)
for i in range(0,sz):
print 'Removing: {}'.format(i)
cmds.removeMultiInstance('shapeEditorManager.blendShapeDirectory[{}]'.format(i), b=True)
This removes a few of the groups, but not all. The return value of removeMultiInstance does indicate that the remove failed.
Is there another way to remove or clear the blendShapeDirectory attribute? (other then editing a Maya ascii file)
Thanks,
Chris
Solved! Go to Solution.