# Path: mayaLib/rigLib/base/module.py
# class Base():
# class Module():
#     def __init__(
#             self,
#             characterName='new',
#             scale=1.0,
#             mainCtrlAttachObj=''
#     ):
#     def getScaleLocator(self):
#     def getDisplayControl(self):
#     def createHalo(self, mainCtrlAttachObj, scale):
#     def createDisplay(self, mainCtrlAttachObj, scale):
#     def createIKFK(self, mainCtrlAttachObj, scale):
#     def __init__(
#             self,
#             prefix='new',
#             baseObj=None
#     ):
# 
# 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/control.py
# class Control():
#     def __init__(
#             self,
#             prefix='new',
#             scale=1.0,
#             translateTo='',
#             rotateTo='',
#             parent='',
#             shape='circle',
#             lockChannels=['s', 'v'],
#             doOffset=True,
#             doModify=False,
#             doDynamicPivot=False,
#             objBBox=''
#     ):
#     def ctrlRadiusFromJoint(self, jnt, useSphere=True):
#     def calculateScale(self, scale, translateTo='', objBBox='', useBBox=False, useMean=False):
#     def getCtrlScale(self):
#     def makeDynamicPivot(self, prefix, scale, translateTo, rotateTo):
#     def getControl(self):
#     def getOffsetGrp(self):
#     def getModifyGrp(self):
#     def getTop(self):
# 
# Path: mayaLib/rigLib/utils/followCtrl.py
# def createFollicle(geo, u, v, prefix):
# def findClosestUVCoordinate(geo, obj):
# def makeControlFollowSkin(geo, ctrl, drivenObj):
# 
# 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.base import module
from mayaLib.rigLib.utils import deform, control
from mayaLib.rigLib.utils import followCtrl
from mayaLib.rigLib.utils import skin
"""
face @ rig
"""




class Face():
    def __init__(self,
                 cvList,
                 skinGeo,
                 prefix='face',
                 headJnt='head_JNT',
                 pointsNumber=5,
                 scale=0.1,
                 baseRig=None
                 ):
        """
        Build Facial Setup
        :param cvList: list of facial curves
        :param prefix: str, prefix to name new objects
        :param rigScale: float, scale factor for size of controls
        :param baseRig: instance of base.module.Base class
        """

        cvList = pm.ls(cvList)
        skinGeo = pm.ls(skinGeo)[0]
        headJnt = pm.ls(headJnt)[0]

        # make rig module

# Path: mayaLib/rigLib/base/module.py
# class Base():
# class Module():
#     def __init__(
#             self,
#             characterName='new',
#             scale=1.0,
#             mainCtrlAttachObj=''
#     ):
#     def getScaleLocator(self):
#     def getDisplayControl(self):
#     def createHalo(self, mainCtrlAttachObj, scale):
#     def createDisplay(self, mainCtrlAttachObj, scale):
#     def createIKFK(self, mainCtrlAttachObj, scale):
#     def __init__(
#             self,
#             prefix='new',
#             baseObj=None
#     ):
# 
# 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/control.py
# class Control():
#     def __init__(
#             self,
#             prefix='new',
#             scale=1.0,
#             translateTo='',
#             rotateTo='',
#             parent='',
#             shape='circle',
#             lockChannels=['s', 'v'],
#             doOffset=True,
#             doModify=False,
#             doDynamicPivot=False,
#             objBBox=''
#     ):
#     def ctrlRadiusFromJoint(self, jnt, useSphere=True):
#     def calculateScale(self, scale, translateTo='', objBBox='', useBBox=False, useMean=False):
#     def getCtrlScale(self):
#     def makeDynamicPivot(self, prefix, scale, translateTo, rotateTo):
#     def getControl(self):
#     def getOffsetGrp(self):
#     def getModifyGrp(self):
#     def getTop(self):
# 
# Path: mayaLib/rigLib/utils/followCtrl.py
# def createFollicle(geo, u, v, prefix):
# def findClosestUVCoordinate(geo, obj):
# def makeControlFollowSkin(geo, ctrl, drivenObj):
# 
# 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/base/face.py
import pymel.core as pm
from mayaLib.rigLib.base import module
from mayaLib.rigLib.utils import deform, control
from mayaLib.rigLib.utils import followCtrl
from mayaLib.rigLib.utils import skin

"""
face @ rig
"""




class Face():
    def __init__(self,
                 cvList,
                 skinGeo,
                 prefix='face',
                 headJnt='head_JNT',
                 pointsNumber=5,
                 scale=0.1,
                 baseRig=None
                 ):
        """
        Build Facial Setup
        :param cvList: list of facial curves
        :param prefix: str, prefix to name new objects
        :param rigScale: float, scale factor for size of controls
        :param baseRig: instance of base.module.Base class
        """

        cvList = pm.ls(cvList)
        skinGeo = pm.ls(skinGeo)[0]
        headJnt = pm.ls(headJnt)[0]

        # make rig module

        self.rigmodule = module.Module(prefix=prefix, baseObj=baseRig)