Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewtConroy/7932c68213b7a2b1a83d548c9a634c62 to your computer and use it in GitHub Desktop.
Save AndrewtConroy/7932c68213b7a2b1a83d548c9a634c62 to your computer and use it in GitHub Desktop.
Same Skin
# select two objects. First, the one with a skinCluster you like. Second, an object you want to have a matching skin.
# Once selected, hit the button. This will make matching skingCluster influences.
#Once this is done, select the objects again and use maya's copy skinweights tool.
import maya.cmds as cmds
import maya.mel as mel
selected = cmds.ls(sl=1)
skinnedMesh = selected[0]
newMesh = selected[1]
skinCluster = mel.eval('findRelatedSkinCluster ' + skinnedMesh)
skinnedJoints = cmds.skinCluster(skinCluster,query=True,inf=True)
cmds.select(skinnedJoints, newMesh)
cmds.skinCluster()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment