# 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/ctrlShape.py
# def copyShape(source, destination, mode=''):
# def extractCtrlShape():
#     def __init__(self, name, scale, shape='circle', normalDirection=[0, 0, 0]):
#     def transformCtrl(self, ctrl, normalDirection=[0, 0, 0], scale=1):
# def circleCtrlShape(name, normalDirection=[1, 0, 0], scale=1):
# def sphereCtrlShape(name, scale=1):
# def moveCtrlShape(name, scale):
# def trapeziumCtrlShape(name, normalDirection=[0, 0, 0], scale=1):
# def chestCtrlShape(name, normalDirection=[1, 1, 0], scale=1):
# def hipCtrlShape(name, normalDirection=[0, -1, 1], scale=1):
# def headCtrlShape(name, normalDirection=[0, -1, 1], scale=1):
# def displayCtrlShape(name='display', normalDirection=[0, 1, 0], scale=1):
# def ikfkCtrlShape(name='ikfk', normalDirection=[0, 1, 0], scale=1):
# def controlShapeAdaptive(controlList, geoList, ctrlSmooth=6, scaleConstant=1.5, rebuildCV=32):
# class CtrlShape():
# 
# Path: mayaLib/rigLib/utils/name.py
# def removeSuffix(name):
# def getSide(name):
# def getAlpha(i):
# 
# 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
import mayaLib.pipelineLib.utility.nameCheck as nc
from mayaLib.rigLib.utils import common
from mayaLib.rigLib.utils import ctrlShape
from mayaLib.rigLib.utils import name
from mayaLib.rigLib.utils import util

        :param translateTo: str, reference object for control position
        :param rotateTo: str, reference object for control orientation
        :param parent: str, object to be parent of new control
        :param shape: str, control shape type (normal direction)
        :param lockChannels: list( str ), list of channels on control to be locked and non-keyable
        :param objBBox: str, object to calculate ctrl scale
        :param autoBBox: bool, auto find scale value from Proxy Geo if exist
        :return: None
        """

        # name handle
        if '*' in prefix:
            prefix = nc.nameCheck(prefix + '_CTRL').split('_')[0]

        ctrlObject = None
        circleNormal = [1, 0, 0]

        scale = self.calculateScale(scale, translateTo=translateTo, objBBox=objBBox)

        # custom shape
        if shape in ['circle', 'circleX']:
            circleNormal = [1, 0, 0]

        elif shape == 'circleY':
            circleNormal = [0, 1, 0]

        elif shape == 'circleZ':
            circleNormal = [0, 0, 1]

        elif shape == 'sphere':

# 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/ctrlShape.py
# def copyShape(source, destination, mode=''):
# def extractCtrlShape():
#     def __init__(self, name, scale, shape='circle', normalDirection=[0, 0, 0]):
#     def transformCtrl(self, ctrl, normalDirection=[0, 0, 0], scale=1):
# def circleCtrlShape(name, normalDirection=[1, 0, 0], scale=1):
# def sphereCtrlShape(name, scale=1):
# def moveCtrlShape(name, scale):
# def trapeziumCtrlShape(name, normalDirection=[0, 0, 0], scale=1):
# def chestCtrlShape(name, normalDirection=[1, 1, 0], scale=1):
# def hipCtrlShape(name, normalDirection=[0, -1, 1], scale=1):
# def headCtrlShape(name, normalDirection=[0, -1, 1], scale=1):
# def displayCtrlShape(name='display', normalDirection=[0, 1, 0], scale=1):
# def ikfkCtrlShape(name='ikfk', normalDirection=[0, 1, 0], scale=1):
# def controlShapeAdaptive(controlList, geoList, ctrlSmooth=6, scaleConstant=1.5, rebuildCV=32):
# class CtrlShape():
# 
# Path: mayaLib/rigLib/utils/name.py
# def removeSuffix(name):
# def getSide(name):
# def getAlpha(i):
# 
# 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/utils/control.py
import pymel.core as pm
import mayaLib.pipelineLib.utility.nameCheck as nc
from mayaLib.rigLib.utils import common
from mayaLib.rigLib.utils import ctrlShape
from mayaLib.rigLib.utils import name
from mayaLib.rigLib.utils import util

        :param translateTo: str, reference object for control position
        :param rotateTo: str, reference object for control orientation
        :param parent: str, object to be parent of new control
        :param shape: str, control shape type (normal direction)
        :param lockChannels: list( str ), list of channels on control to be locked and non-keyable
        :param objBBox: str, object to calculate ctrl scale
        :param autoBBox: bool, auto find scale value from Proxy Geo if exist
        :return: None
        """

        # name handle
        if '*' in prefix:
            prefix = nc.nameCheck(prefix + '_CTRL').split('_')[0]

        ctrlObject = None
        circleNormal = [1, 0, 0]

        scale = self.calculateScale(scale, translateTo=translateTo, objBBox=objBBox)

        # custom shape
        if shape in ['circle', 'circleX']:
            circleNormal = [1, 0, 0]

        elif shape == 'circleY':
            circleNormal = [0, 1, 0]

        elif shape == 'circleZ':
            circleNormal = [0, 0, 1]

        elif shape == 'sphere':

            ctrlObject = ctrlShape.sphereCtrlShape(name=prefix + '_CTRL', scale=scale)
