def groupOrient(target='none',orig='none', group="GRP"):
"""
groups the second object and snaps the group to the second (point and orient). The group arg is to name the suffix you want the group to have (default is '_GRP')
Arguments: target (to be constrained to), orig (obj to move), group (suffix for group)
"""
if (target == "none"):
sel = getTwoSelection()
target = sel[0]
orig = sel[1]
cmds.select(orig)
grpName = "%s_%s"%(orig,group)
cmds.group(name=grpName)
pc = cmds.pointConstraint(target, grpName)
oc = cmds.orientConstraint(target, grpName)
cmds.delete(pc)
cmds.delete(oc)
cmds.select(clear=True)
return(grpName)
评论列表
文章目录