# Path: mayaLib/rigLib/utils/common.py
# def centerPivot(obj, targetPivot=None):
# def freezeTranform(obj):
# def deleteHistory(obj):
# def deleteNonDeformerHistory(obj):
# def deleteConnection(objAttrList):
# def setDrivenKey(driver, driverValueList, driven, drivenValueList, cvType='linear'):
# 
# Path: mayaLib/rigLib/utils/deform.py
# def blendShapeDeformer(base, blendshapeList, nodeName, defaultValue=[1, ], frontOfChain=False):
# def wrapDeformer(wrappedObjs, wrapperObj):
# def deltaMushDeformer(geo, smoothingIterations=10, smoothingStep=0.5):
# def shrinkWrapDeformer(wrappedObj, wrapperObj):
# def cMuscleSystemDeformer(obj, relativeSticky=True):
# def cMuscleConnectMuscle(muscleMainObj, muscleObjList):
# def softModDeformer(vertex):
# def meshCollision(deformer, deformed):
# 
# Path: mayaLib/rigLib/utils/name.py
# def removeSuffix(name):
# def getSide(name):
# def getAlpha(i):
# 
# Path: mayaLib/rigLib/utils/skin.py
# def selectSkinClusterObject():
# def disableInheritsTransformOnSkinClusters():
# def copySkinWeightBetweenMesh(selection=pm.ls(sl=True)):
# def copyBind(source, destination, sa='closestPoint', ia='closestJoint'):
# def copyBindSelected(selectionList):
# def findRelatedSkinCluster(geo):
# def saveSkinWeights(characterName, geoList,
#                     projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
#                     skinWeightsDir='weights/skinCluster', swExt='.swt',
#                     doDirectory=True):
# def loadSkinWeights(characterName, geoList,
#                     projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
#                     skinWeightsDir='weights/skinCluster', swExt='.swt'):
# def ngSkinToolInit(geo):
# def ngSkinToolRaplceLayer(geo, sourceLayer, destinationLayer):
# def ngSkinToolDeleteNode(geo):


import pymel.core as pm
from mayaLib.rigLib.utils import common
from mayaLib.rigLib.utils import deform
from mayaLib.rigLib.utils import name
from mayaLib.rigLib.utils import skin
            pm.parent(clothGrp, rigModelGrp)

        # save attribute
        self.baseObj = baseObj
        self.wrapDeformer = wrapDeformer
        self.shrinkWrapDeformer = shrinkWrapDeformer
        self.cMuscleDeformer = cMuscleDeformer

    def getWrapBaseObj(self):
        return self.baseObj

    def getWrapDeformer(self):
        return self.wrapDeformer

    def getShrinkWrapDeformer(self):
        return self.shrinkWrapDeformer

    def getCMuscleDeformer(self):
        return self.cMuscleDeformer

    def makeProxyGeo(self, geo, percentage=50):
        proxyName = name.removeSuffix(geo.name()) + 'Proxy_GEO'
        proxyGeo = pm.duplicate(geo, n=proxyName)[0]
        pm.polyReduce(proxyGeo, p=percentage,
                      ver=1, trm=0, shp=0, keepBorder=1, keepMapBorder=1, keepColorBorder=1, keepFaceGroupBorder=1,
                      keepHardEdge=1, keepCreaseEdge=1, keepBorderWeight=0.5, keepMapBorderWeight=0.5,
                      keepColorBorderWeight=0.5, keepFaceGroupBorderWeight=0.5, keepHardEdgeWeight=0.5,
                      keepCreaseEdgeWeight=0.5, useVirtualSymmetry=0, symmetryTolerance=0.01, sx=0, sy=1, sz=0, sw=0,
                      preserveTopology=1, keepQuadsWeight=1, vertexMapName='', cachingReduce=1, ch=1, vct=0, tct=0,
                      replaceOriginal=1)

# Path: mayaLib/rigLib/utils/common.py
# def centerPivot(obj, targetPivot=None):
# def freezeTranform(obj):
# def deleteHistory(obj):
# def deleteNonDeformerHistory(obj):
# def deleteConnection(objAttrList):
# def setDrivenKey(driver, driverValueList, driven, drivenValueList, cvType='linear'):
# 
# Path: mayaLib/rigLib/utils/deform.py
# def blendShapeDeformer(base, blendshapeList, nodeName, defaultValue=[1, ], frontOfChain=False):
# def wrapDeformer(wrappedObjs, wrapperObj):
# def deltaMushDeformer(geo, smoothingIterations=10, smoothingStep=0.5):
# def shrinkWrapDeformer(wrappedObj, wrapperObj):
# def cMuscleSystemDeformer(obj, relativeSticky=True):
# def cMuscleConnectMuscle(muscleMainObj, muscleObjList):
# def softModDeformer(vertex):
# def meshCollision(deformer, deformed):
# 
# Path: mayaLib/rigLib/utils/name.py
# def removeSuffix(name):
# def getSide(name):
# def getAlpha(i):
# 
# Path: mayaLib/rigLib/utils/skin.py
# def selectSkinClusterObject():
# def disableInheritsTransformOnSkinClusters():
# def copySkinWeightBetweenMesh(selection=pm.ls(sl=True)):
# def copyBind(source, destination, sa='closestPoint', ia='closestJoint'):
# def copyBindSelected(selectionList):
# def findRelatedSkinCluster(geo):
# def saveSkinWeights(characterName, geoList,
#                     projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
#                     skinWeightsDir='weights/skinCluster', swExt='.swt',
#                     doDirectory=True):
# def loadSkinWeights(characterName, geoList,
#                     projectPath=str(pm.workspace(q=True, dir=True, rd=True) + 'scenes/') + 'rig/',
#                     skinWeightsDir='weights/skinCluster', swExt='.swt'):
# def ngSkinToolInit(geo):
# def ngSkinToolRaplceLayer(geo, sourceLayer, destinationLayer):
# def ngSkinToolDeleteNode(geo):


# Path: mayaLib/rigLib/utils/slidingCloth.py
import pymel.core as pm
from mayaLib.rigLib.utils import common
from mayaLib.rigLib.utils import deform
from mayaLib.rigLib.utils import name
from mayaLib.rigLib.utils import skin

            pm.parent(clothGrp, rigModelGrp)

        # save attribute
        self.baseObj = baseObj
        self.wrapDeformer = wrapDeformer
        self.shrinkWrapDeformer = shrinkWrapDeformer
        self.cMuscleDeformer = cMuscleDeformer

    def getWrapBaseObj(self):
        return self.baseObj

    def getWrapDeformer(self):
        return self.wrapDeformer

    def getShrinkWrapDeformer(self):
        return self.shrinkWrapDeformer

    def getCMuscleDeformer(self):
        return self.cMuscleDeformer

    def makeProxyGeo(self, geo, percentage=50):
        proxyName = name.removeSuffix(geo.name()) + 'Proxy_GEO'
        proxyGeo = pm.duplicate(geo, n=proxyName)[0]
        pm.polyReduce(proxyGeo, p=percentage,
                      ver=1, trm=0, shp=0, keepBorder=1, keepMapBorder=1, keepColorBorder=1, keepFaceGroupBorder=1,
                      keepHardEdge=1, keepCreaseEdge=1, keepBorderWeight=0.5, keepMapBorderWeight=0.5,
                      keepColorBorderWeight=0.5, keepFaceGroupBorderWeight=0.5, keepHardEdgeWeight=0.5,
                      keepCreaseEdgeWeight=0.5, useVirtualSymmetry=0, symmetryTolerance=0.01, sx=0, sy=1, sz=0, sw=0,
                      preserveTopology=1, keepQuadsWeight=1, vertexMapName='', cachingReduce=1, ch=1, vct=0, tct=0,
                      replaceOriginal=1)

        common.deleteHistory(proxyGeo)