# Path: mayaLib/utility/bSkinSaver.py
# def bFindSkinCluster(objectName, bSkinPath=OpenMaya.MDagPath()):
# def bLoadVertexSkinValues(inputFile, ignoreJointLocks):
# def vertexToId(vertex):
# def vertexToIdList(verts):
# def bSaveVertexSkinValues(inputFile, ignoreSoftSelection):
# def bSaveSkinValues(inputFile):
# def bSkinObject(objectName, fileJoints, weights):
# def bLoadSkinValues(loadOnSelection, inputFile):
# def getSoftSelection():


import os
import maya.mel as mel
import pymel.core as pm
from mayaLib.utility import bSkinSaver
            return None

    return pm.ls(skincluster)[0]


def saveSkinWeights(characterName, geoList,
                    projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
                    skinWeightsDir='weights/skinCluster', swExt='.swt',
                    doDirectory=True):
    """
    save weights for character geometry objects
    """
    # check folder
    directory = os.path.join(projectPath, characterName, skinWeightsDir)
    if not os.path.exists(directory):
        if doDirectory:
            os.makedirs(directory)
        else:
            print('Path to save SkinCluster not found!')
            return

    if not isinstance(geoList, list):
        geoList = pm.ls(geoList)

    for obj in geoList:
        # weights file
        wtFile = os.path.join(projectPath, characterName, skinWeightsDir, obj + swExt)

        # save skin weight file
        pm.select(obj)

# Path: mayaLib/utility/bSkinSaver.py
# def bFindSkinCluster(objectName, bSkinPath=OpenMaya.MDagPath()):
# def bLoadVertexSkinValues(inputFile, ignoreJointLocks):
# def vertexToId(vertex):
# def vertexToIdList(verts):
# def bSaveVertexSkinValues(inputFile, ignoreSoftSelection):
# def bSaveSkinValues(inputFile):
# def bSkinObject(objectName, fileJoints, weights):
# def bLoadSkinValues(loadOnSelection, inputFile):
# def getSoftSelection():


# Path: mayaLib/rigLib/utils/skin.py
import os
import maya.mel as mel
import pymel.core as pm
from mayaLib.utility import bSkinSaver

            return None

    return pm.ls(skincluster)[0]


def saveSkinWeights(characterName, geoList,
                    projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
                    skinWeightsDir='weights/skinCluster', swExt='.swt',
                    doDirectory=True):
    """
    save weights for character geometry objects
    """
    # check folder
    directory = os.path.join(projectPath, characterName, skinWeightsDir)
    if not os.path.exists(directory):
        if doDirectory:
            os.makedirs(directory)
        else:
            print('Path to save SkinCluster not found!')
            return

    if not isinstance(geoList, list):
        geoList = pm.ls(geoList)

    for obj in geoList:
        # weights file
        wtFile = os.path.join(projectPath, characterName, skinWeightsDir, obj + swExt)

        # save skin weight file
        pm.select(obj)

        bSkinSaver.bSaveSkinValues(wtFile)