Skip to content

Instantly share code, notes, and snippets.

@paulwinex
Created April 27, 2018 14:42
Show Gist options
  • Save paulwinex/bc3c04565d1b23ec756a71b820787f3e to your computer and use it in GitHub Desktop.
Save paulwinex/bc3c04565d1b23ec756a71b820787f3e to your computer and use it in GitHub Desktop.
from pymel.core import *
src, trg = selected()
src_bs = src.getShape().inputs(type='blendShape')[0]
trg_bs = trg.getShape().inputs(type='blendShape')[0]
src_targets = [x.split('|')[-1] for x in src_bs.getTarget()]
trg_targets = [x.split('|')[-1] for x in trg_bs.getTarget()]
for st in src_targets:
if st in trg_targets:
src_bs.weight[src_targets.index(st)] >> trg_bs.weight[trg_targets.index(st)]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment