Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

how can i find a bone from a vertex?

how can i find a bone from a vertex?

Anonymous
Not applicable
1,029 Views
2 Replies
Message 1 of 3

how can i find a bone from a vertex?

Anonymous
Not applicable

is there a command that will return a list of bones (with weight value),
with the input of a vertex from a mesh with a skincluster?
possibly in python?

any information would help, thanks!

0 Likes
Accepted solutions (1)
1,030 Views
2 Replies
Replies (2)
Message 2 of 3

rajasekaransurjen
Collaborator
Collaborator
Accepted solution

Hi,

Try this.....

 

import maya.cmds as cmds
import maya.mel as mel

rsSlVtx = cmds.ls(sl=True)
objName = cmds.listRelatives(cmds.ls(rsSlVtx, o=True), p=True)
rsSkinCluster = mel.eval('findRelatedSkinCluster '+objName[0])

rsInfJoits = cmds.skinPercent( 'skinCluster1', rsSlVtx[0], query=True, transform=None )
rsInfVal =  cmds.skinPercent( 'skinCluster1', rsSlVtx[0],query=True, value=True )

for i in range(0,len(rsInfJoits)):
    if(rsInfVal[i] != 0):
        print rsInfJoits[i],"=",rsInfVal[i]

Best regards,
Rajasekaran Surjen.

Message 3 of 3

Anonymous
Not applicable

cool! seems to work! thanks for the help!

0 Likes