|
Found the weight data is accessible either in MFnComponent or MItGeometry
selection = OpenMaya.MSelectionList()
softSelection = OpenMaya.MRichSelection()
OpenMaya.MGlobal.getRichSelection(softSelection)
softSelection.getSelection(selection)
pathDag = OpenMaya.MDagPath()
oComp = OpenMaya.MObject()
selection.getDagPath(0, pathDag, oComp)
fnComp = OpenMaya.MFnSingleIndexedComponent(oComp)
for i in range(fnComp.elementCount()):
print fnComp.element(i), fnComp.weight(i).influence()
Author: chadmv
|