# 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/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/util.py
# def getDriverDrivenFromConstraint(constraint):
# def returnDriverObject(attribute, skipConversionNodes=False):
# def returnDrivenAttribute(attribute, skipConversionNodes=False):
# def returnDrivenObject(attribute, skipConversionNodes=True):
# def getAllObjectUnderGroup(group, type='mesh'):
# def moveShape(source, destination):
# def get_distance(obj1, obj2):
#     def ctr_dist(objA, objB):
# def get_distance_from_coords(bboxMin, bboxMax):
# def lock_and_hide_all(node):
# def unlock_and_unhide_all(node):
# def no_render(tgt):
# def invertSelection():
# def getPlanarRadiusBBOXFromTransform(transform, radiusFactor=2):
# def matrixConstrain(driver, driven, parent=None, translate=True, rotate=True, scale=False):


import pymel.core as pm
from mayaLib.rigLib.utils import common, control
from mayaLib.rigLib.utils import util

            doOffset=True,
            doModify=True,
            objBBox=mainCtrlAttachObj
        )
        self.haloCtrl.getOffsetGrp().visibility.set(0)
        self.createHalo(mainCtrlAttachObj, 1)

        mainVisAts = ['modelVis', 'jointsVis']
        mainDispAts = ['modelDisp', 'jointsDisp']
        mainObjList = [self.modelGrp, self.jointsGrp]
        mainObjVisDvList = [1, 0]

        # add rig visibility connections
        for at, obj, dfVal in zip(mainVisAts, mainObjList, mainObjVisDvList):
            pm.addAttr(self.globalCtrl.getControl(), ln=at, at='enum', enumName='off:on', k=1, dv=dfVal)
            pm.setAttr(self.globalCtrl.getControl() + '.' + at, cb=1)
            pm.connectAttr(self.globalCtrl.getControl() + '.' + at, obj + '.v')

        # add rig display type connections
        for at, obj in zip(mainDispAts, mainObjList):
            pm.addAttr(self.globalCtrl.getControl(), ln=at, at='enum', enumName='normal:template:reference', k=1, dv=2)
            pm.setAttr(self.globalCtrl.getControl() + '.' + at, cb=1)
            pm.setAttr(obj + '.ove', 1)
            pm.connectAttr(self.globalCtrl.getControl() + '.' + at, obj + '.ovdt')

        # add rig display level connection
        displayLevel = 'displayLevel'
        levelGrp = [self.fastModelGrp, self.mediumModelGrp, self.slowModelGrp]
        pm.addAttr(self.globalCtrl.getControl(), ln=displayLevel, at='enum', enumName='fast:medium:slow', k=1, dv=1)
        pm.setAttr(self.globalCtrl.getControl() + '.' + displayLevel, cb=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/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/util.py
# def getDriverDrivenFromConstraint(constraint):
# def returnDriverObject(attribute, skipConversionNodes=False):
# def returnDrivenAttribute(attribute, skipConversionNodes=False):
# def returnDrivenObject(attribute, skipConversionNodes=True):
# def getAllObjectUnderGroup(group, type='mesh'):
# def moveShape(source, destination):
# def get_distance(obj1, obj2):
#     def ctr_dist(objA, objB):
# def get_distance_from_coords(bboxMin, bboxMax):
# def lock_and_hide_all(node):
# def unlock_and_unhide_all(node):
# def no_render(tgt):
# def invertSelection():
# def getPlanarRadiusBBOXFromTransform(transform, radiusFactor=2):
# def matrixConstrain(driver, driven, parent=None, translate=True, rotate=True, scale=False):


# Path: mayaLib/rigLib/base/module.py
import pymel.core as pm
from mayaLib.rigLib.utils import common, control
from mayaLib.rigLib.utils import util

            doOffset=True,
            doModify=True,
            objBBox=mainCtrlAttachObj
        )
        self.haloCtrl.getOffsetGrp().visibility.set(0)
        self.createHalo(mainCtrlAttachObj, 1)

        mainVisAts = ['modelVis', 'jointsVis']
        mainDispAts = ['modelDisp', 'jointsDisp']
        mainObjList = [self.modelGrp, self.jointsGrp]
        mainObjVisDvList = [1, 0]

        # add rig visibility connections
        for at, obj, dfVal in zip(mainVisAts, mainObjList, mainObjVisDvList):
            pm.addAttr(self.globalCtrl.getControl(), ln=at, at='enum', enumName='off:on', k=1, dv=dfVal)
            pm.setAttr(self.globalCtrl.getControl() + '.' + at, cb=1)
            pm.connectAttr(self.globalCtrl.getControl() + '.' + at, obj + '.v')

        # add rig display type connections
        for at, obj in zip(mainDispAts, mainObjList):
            pm.addAttr(self.globalCtrl.getControl(), ln=at, at='enum', enumName='normal:template:reference', k=1, dv=2)
            pm.setAttr(self.globalCtrl.getControl() + '.' + at, cb=1)
            pm.setAttr(obj + '.ove', 1)
            pm.connectAttr(self.globalCtrl.getControl() + '.' + at, obj + '.ovdt')

        # add rig display level connection
        displayLevel = 'displayLevel'
        levelGrp = [self.fastModelGrp, self.mediumModelGrp, self.slowModelGrp]
        pm.addAttr(self.globalCtrl.getControl(), ln=displayLevel, at='enum', enumName='fast:medium:slow', k=1, dv=1)
        pm.setAttr(self.globalCtrl.getControl() + '.' + displayLevel, cb=1)

        common.setDrivenKey(self.globalCtrl.getControl() + '.' + displayLevel, [0, 1, 2], levelGrp[0] + '.v', [1, 0, 0])
