cwisbg

Zero Grp

Aug 28th, 2014
346
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.43 KB | None | 0 0
  1. # Zero Grp
  2. # cwisbg.com Zero Grp
  3. from pymel.core import *
  4. sl = selected()
  5. for s in sl:
  6.     pap = listRelatives(s,p=1)
  7.     pos = s.getTranslation()
  8.     rot = s.getRotation()
  9.     scl = s.getScale()
  10.     nwGrp = group(em=1, n= s+"_zeroGrp")
  11.     move(s, 0,0,0)
  12.     rotate(s,0,0,0)
  13.     scale(s,1,1,1)
  14.     parent(s,nwGrp)
  15.     move(nwGrp, pos)
  16.     rotate(nwGrp, rot)
  17.     scale(nwGrp, scl)
  18.     if pap:
  19.         parent(nwGrp,pap)
Advertisement
Add Comment
Please, Sign In to add comment