def getSkinCluster(mesh):
'''
Return the first skinCluster affecting this mesh.
'''
if mc.nodeType(mesh) in ('mesh','nurbsSurface','nurbsCurve'):
shapes = [mesh]
else:
shapes = mc.listRelatives(mesh, shapes=True, path=True)
for shape in shapes:
history = mc.listHistory(shape, groupLevels=True, pruneDagObjects=True)
if not history:
continue
skins = mc.ls(history, type='skinCluster')
if skins:
return skins[0]
return None
评论列表
文章目录