gsee

AM_MPC py2.7

Nov 25th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.60 KB | None | 0 0
  1. sel = mc.ls(selection=True)
  2. mc.select(d=True)
  3.  
  4. mpc_childrens = sel[:-1]
  5. mpc_parent = sel[-1]
  6.  
  7. if sel:
  8.     for t in sel:
  9.         if mc.nodeType(t) != 'transform' and len(sel) < 3:
  10.             mc.warning('Select 3 transforms mini')
  11.  
  12.         else:
  13.             for p in mpc_childrens:
  14.                 mc.parentConstraint(mpc_parent, p, mo=True)
  15.  
  16.             mc.select(mpc_parent, r=True)
  17. else:
  18.     mc.warning('Select 3 transforms mini')
Add Comment
Please, Sign In to add comment