# 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/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):


import pymel.core as pm
from mayaLib.rigLib.base import module
from mayaLib.rigLib.utils import control

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

        # control locator reference position
        if bodyLocator == '' or chestLocator == '' or pelvisLocator == '':
            pass
        bodyLocator, chestLocator, pelvisLocator = self.makeControlLocatorReferencePosition(spineJoints)

        # make IK handle
        spineIk, effector, spineCurve = pm.ikHandle(n=prefix + '_IKH', sol='ikSplineSolver', sj=spineJoints[0],
                                                    ee=spineJoints[-1],  # -2
                                                    createCurve=True, numSpans=2)

        # rename curve
        pm.rename(spineCurve, prefix + '_CRV')

        # make spine curve clusters
        spineCurveCVs = pm.ls(spineCurve + '.cv[*]', fl=1)
        numSpineCVs = len(spineCurveCVs)
        spineCurveClusters = []

        for i in range(numSpineCVs):
            cls = pm.cluster(spineCurveCVs[i], n=prefix + 'Cluster%d' % (i + 1))[1]
            spineCurveClusters.append(cls)

        pm.hide(spineCurveClusters)

        # parent spine curve
        pm.parent(spineCurve, self.rigmodule.partsNoTransGrp)

        # make controls

# 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/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/base/spine.py
import pymel.core as pm
from mayaLib.rigLib.base import module
from mayaLib.rigLib.utils import control

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

        # control locator reference position
        if bodyLocator == '' or chestLocator == '' or pelvisLocator == '':
            pass
        bodyLocator, chestLocator, pelvisLocator = self.makeControlLocatorReferencePosition(spineJoints)

        # make IK handle
        spineIk, effector, spineCurve = pm.ikHandle(n=prefix + '_IKH', sol='ikSplineSolver', sj=spineJoints[0],
                                                    ee=spineJoints[-1],  # -2
                                                    createCurve=True, numSpans=2)

        # rename curve
        pm.rename(spineCurve, prefix + '_CRV')

        # make spine curve clusters
        spineCurveCVs = pm.ls(spineCurve + '.cv[*]', fl=1)
        numSpineCVs = len(spineCurveCVs)
        spineCurveClusters = []

        for i in range(numSpineCVs):
            cls = pm.cluster(spineCurveCVs[i], n=prefix + 'Cluster%d' % (i + 1))[1]
            spineCurveClusters.append(cls)

        pm.hide(spineCurveClusters)

        # parent spine curve
        pm.parent(spineCurve, self.rigmodule.partsNoTransGrp)

        # make controls

        self.bodyCtrl = control.Control(prefix=prefix + 'Body', translateTo=bodyLocator, rotateTo=spineJoints[-1],
