Liard's Art
  • Home
  • Gallery
    • Games
    • Comics
    • Stories
  • Commissions
    • Main Page
    • Terms of service
  • Oc’s
  • Resources
    • Models
    • Tutorials
  • Social Media
    • Patreon
    • Discord Server
    • Stream
    • Twitter
  • User
    • Login
    • Edit Profile
    • Patron YCH Form
Select Page
test
				
					from maya import cmds
import maya.mel as mel

mesh = cmds.ls(sl=True)
cmds.select(cmds.skinCluster(mesh[0], query=True, inf=True), replace=True)
joints = cmds.ls(sl=True)
bindgrp = [mesh[1]]
bindgrp.extend(joints)
newskinCluster = cmds.skinCluster(bindgrp, toSelectedBones=True)[0]
origSkincluster = mel.eval('findRelatedSkinCluster '+mesh[0])

#Wrap new mesh to old mesh.
cmds.copySkinWeights(sourceSkin=origSkincluster,destinationSkin= newskinCluster, noMirror=True, surfaceAssociation='closestPoint', influenceAssociation='oneToOne')
cmds.select(mesh[1])

print 'Done'
				
			

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy