清理GMH系统

在这里插入图片描述
在这里插入图片描述

import maya.cmds as mc

GMH_GrpName=mc.ls(sl=1)[0]

grpName=mc.ls(sl=1)[0].split('_')[0]

mc.select(hi=True)

follicleList=mc.ls(type="follicle",selection=True)
hairSstList=mc.ls(type="hairSystem",selection=True)
pfxHairList=mc.ls(type="pfxHair",selection=True)

shapeList=follicleList+hairSstList+pfxHairList

TransformList=mc.listRelatives(shapeList,parent=1,fullPath=1)

mc.select(TransformList)

mc.parent(w=True)

mc.group(n=grpName+'HairSysGrp')

mc.group(follicleList,name='follicleGrp')

mc.delete(GMH_GrpName)

猜你喜欢

转载自blog.csdn.net/qq_36338099/article/details/89875645