Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #makeBufferGrp
- from pymel.core import *
- def makeBufferGrp():
- sl = selected()
- for s in sl:
- print s
- name = s.split("|")[-1]
- grpCheck = ls("{0}_bufferGrp".format(name))
- if grpCheck:
- p = listRelatives(grpCheck,p=1)
- c = listRelatives(grpCheck,c=1)
- if p:
- parent(c,p)
- else:
- parent(c, w=1)
- delete(grpCheck)
- pap = listRelatives(s,p=1)
- if pap:
- g = group(n="{0}_bufferGrp".format(name),em=1,p = pap[0])
- else:
- g = group(n="{0}_bufferGrp".format(name),em=1,w=1)
- pc = parentConstraint(s,g)
- delete(pc)
- makeIdentity( g, a=1,t=1,r=1,s=1, n=0)
- parent(s, g)
- makeBufferGrp()
Advertisement
Add Comment
Please, Sign In to add comment