Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import maya.cmds as cmds
- '''Runs through a skin cluster and the selected vertices to find if any
- of them have more than a certain amount of joints influencing them, then
- lists them and selects them'''
- #Skin cluster you want to check#
- sCluster = 'YourSkinClusterHere'
- #List anything that has above this value of influence#
- ammount = 0.001
- #List anything that has more than X ammount of influences#
- number = 4
- aboveInfluence= []
- for s in cmds.ls(sl = True, fl = True):
- #Runs through the selected vertices checking for the specified ammount#
- influence = cmds.skinPercent(sCluster, s, ib = ammount, q = True, t = None)
- if len(influence) > number:
- #Puts all that have above X number of joints as influences in a list#
- aboveInfluence.append(s)
- print 'Vertex: ' + s + ' ' + 'No. of Influences: ' + str(len(influence)) + ' ' + 'Influences: ' + str(influence)
- #Selects all vertices that have met the specified parameters#
- cmds.select(aboveInfluence)
- print aboveInfluence
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement