mgear.core.skin

Functions to work with skinCluster data.

This module is derivated from Chad Vernon’s Skin IO.

`Chad Vernon’s github

<https://github.com/chadmv/cmt/tree/master/scripts/cmt/deform>`_

mgear.core.skin.collectBlendWeights(skinCls, dagPath, components, dataDic)
mgear.core.skin.collectData(skinCls, dataDic)
mgear.core.skin.collectInfluenceWeights(skinCls, dagPath, components, dataDic)
mgear.core.skin.exportJsonSkinPack(packPath=None, objs=None, *args)
mgear.core.skin.exportSkin(filePath=None, objs=None, *args)
mgear.core.skin.exportSkinPack(packPath=None, objs=None, use_json=False, *args)
mgear.core.skin.getCurrentWeights(skinCls, dagPath, components)

Get the skincluster weights

Parameters:
  • skinCls (PyNode) – The skincluster node
  • dagPath (MDagPath) – The skincluster dagpath
  • components (MObject) – The skincluster components
Returns:

The skincluster weights

Return type:

MDoubleArray

mgear.core.skin.getGeometryComponents(skinCls)

Get the geometry components from skincluster

Parameters:skinCls (PyNode) – The skincluster node
Returns:The dagpath for the components componets: The skincluster componets
Return type:dagPath
mgear.core.skin.getObjsFromSkinFile(filePath=None, *args)
mgear.core.skin.getSkinCluster(obj)

Get the skincluster of a given object

Parameters:obj (dagNode) – The object to get skincluster
Returns:The skin cluster pynode object
Return type:pyNode
mgear.core.skin.importSkin(filePath=None, *args)
mgear.core.skin.importSkinPack(filePath=None, *args)
mgear.core.skin.selectDeformers(*args)
mgear.core.skin.setBlendWeights(skinCls, dagPath, components, dataDic, compressed)
mgear.core.skin.setData(skinCls, dataDic, compressed)
mgear.core.skin.setInfluenceWeights(skinCls, dagPath, components, dataDic, compressed)
mgear.core.skin.skinCopy(sourceMesh=None, targetMesh=None, *args)