joint = "joint1"
jointDag = openMaya.MDagPath()
jointName = openMaya.MSelectionList()
jointName.add(joint)
jointName.getDagPath(0, jointDag)
jointIndex = (skinCluster.indexForInfluenceObject(jointDag))
If I'm not mistaken, this should give me the index value for the joint
that I can then pipe into the setWeights() like so
weight=.45
skinCluster.setWeights(objectPath, compItr.currentItem(), jointIndex,
weight, True, throwAwayWeights)
It seems that the index gets mixed up somehow because sometimes I get
a value of 6 when there's only 2 or 3 joints in the scene, or as I'm
setting values, it will apply a value that I specified for joint1 onto
joint2 or joint3.
Also, when I add a joint to the skinCluster, it gives it a higher
index than the number of joints in the scene.
Any help would be awesome!
Brandon L. Harris
Brandon L. Harris