Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pymel.core as pm
- #select the mesh, the source influence, and the target influence you want to move weights to
- target_mesh, source_influence, target_influence = pm.ls(sl=1)[0:3]# unpack selection
- target_skinCluster = target_mesh.listHistory(type='skinCluster')[0] # pm.mel.findRelatedSkinCluster(target_mesh) should also work
- #verts = target_mesh.select("pSphere1.vtx[*]")
- target_skinCluster.addInfluence(target_influence, weight = 0.0)
- pm.select(target_mesh.vtx[:])
- pm.skinPercent(target_skinCluster, tmw=[source_influence, target_influence]) # the data from the first will be written to the second
- pm.select(cl=1)
- target_skinCluster.removeInfluence(source_influence)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement