I used MFnSkinCluster.getPointsAffectedByInfluence to get the vertices
affected by an influence. When I print out the selection list of the
points it says that there is only one point even though I know that
influence affects more points. Please help me out with what's going on
here! here is the script I used:
import maya.OpenMaya as om
import maya.OpenMayaAnim as oma
om.MGlobal.clearSelectionList()
om.MGlobal.selectByName('skinCluster2')
infs = om.MDagPathArray()
sList = om.MSelectionList()
om.MGlobal.getActiveSelectionList(sList)
node = om.MObject()
sList.getDependNode( 0, node )
skin = oma.MFnSkinCluster(node)
numInfs = skin.influenceObjects(infs)
skinPath = om.MDagPath()
index = 0
skin.getPathAtIndex(index,skinPath)
geo = om.MItGeometry(skinPath)
weights = om.MDoubleArray()
pointsInfl = om.MSelectionList()
skin.getPointsAffectedByInfluence(infs[3], pointsInfl, weights)
print 'pointsInfl %s'% pointsInfl
print pointsInfl.length()
--
view archives: http://groups.google.com/group/python_inside_maya
change your subscription settings:
http://groups.google.com/group/python_inside_maya/subscribe