# Path: dpAutoRigSystem/Modules/Library/dpUtils.py
# def findEnv(key, path):
# def findPath(filename):
# def findAllFiles(path, dir, ext):
# def findAllModules(path, dir):
# def findAllModuleNames(path, dir):
# def findLastNumber(nameList, basename):
# def findModuleLastNumber(className, typeName):
# def normalizeText(enteredText="", prefixMax=4):
# def useDefaultRenderLayer():
# def zeroOut(transformList=[], offset=False):
# def originedFrom(objName="", attrString=""):
# def getOriginedFromDic():
# def addHook(objName="", hookType="staticHook"):
# def hook():
# def clearNodeGrp(nodeGrpName='dpAR_GuideMirror_Grp', attrFind='guideBaseMirror', unparent=False):
# def getGuideChildrenList(nodeName):
# def mirroredGuideFather(nodeName):
# def getParentsList(nodeName):
# def getModulesToBeRigged(instanceList):
# def getCtrlRadius(nodeName):
# def zeroOutJoints(jntList=None, displayBone=False):
# def clearDpArAttr(itemList):
# def deleteChildren(item):
# def setJointLabel(jointName, sideNumber, typeNumber, labelString):
# def deleteJointLabel(jointName):
# def extractSuffix(nodeName):
# def filterName(name, itemList, separator):
# def checkRawURLForUpdate(DPAR_VERSION, DPAR_RAWURL, *args):
# def visitWebSite(website, *args):
# def checkLoadedPlugin(pluginName, exceptName=None, message="Not loaded plugin", *args):
# def twistBoneMatrix(nodeA, nodeB, twistBoneName, twistBoneMD=None, axis='Z', inverse=True, *args):
# def validateName(nodeName, suffix=None, *args):
# def articulationJoint(fatherNode, brotherNode, corrNumber=0, dist=1, jarRadius=1.5, doScale=True, *args):
# def getNodeByMessage(grpAttrName, *args):
# def attachToMotionPath(nodeName, curveName, mopName, uValue):
# def profiler(func):
#     def runProfile(*args, **kwargs):
# def extract_world_scale_from_matrix(obj):
# DPAR_PROFILE_MODE = False


from maya import cmds
from .Library import dpUtils
from . import dpBaseClass
from . import dpLayoutClass
        self.sideTMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Side_Translate_MD")
        self.sideRMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Side_Rotate_MD")
        self.nostrilMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Nostril_MD")
        cmds.connectAttr(self.cvLSideLoc+".translateX", self.sideTMD+".input1X", force=True)
        cmds.connectAttr(self.cvLSideLoc+".translateY", self.sideTMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLSideLoc+".translateZ", self.sideTMD+".input1Z", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateX", self.sideRMD+".input1X", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateY", self.sideRMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateZ", self.sideRMD+".input1Z", force=True)
        cmds.connectAttr(self.sideTMD+".outputX", self.cvRSideLoc+".translateX", force=True)
        cmds.connectAttr(self.sideTMD+".outputY", self.cvRSideLoc+".translateY", force=True)
        cmds.connectAttr(self.sideTMD+".outputZ", self.cvRSideLoc+".translateZ", force=True)
        cmds.connectAttr(self.sideRMD+".outputX", self.cvRSideLoc+".rotateX", force=True)
        cmds.connectAttr(self.sideRMD+".outputY", self.cvRSideLoc+".rotateY", force=True)
        cmds.connectAttr(self.sideRMD+".outputZ", self.cvRSideLoc+".rotateZ", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateX", self.nostrilMD+".input1X", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateY", self.nostrilMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateZ", self.nostrilMD+".input1Z", force=True)
        cmds.connectAttr(self.nostrilMD+".outputX", self.cvRNostrilLoc+".translateX", force=True)
        cmds.connectAttr(self.nostrilMD+".outputY", self.cvRNostrilLoc+".translateY", force=True)
        cmds.connectAttr(self.nostrilMD+".outputZ", self.cvRNostrilLoc+".translateZ", force=True)
        cmds.setAttr(self.sideTMD+".input2X", -1)
        cmds.setAttr(self.sideRMD+".input2Y", -1)
        cmds.setAttr(self.sideRMD+".input2Z", -1)
        cmds.setAttr(self.nostrilMD+".input2X", -1)
        
        
    def changeJointNumber(self, enteredNJoints, *args):
        """ Edit the number of joints in the guide.
        """

# Path: dpAutoRigSystem/Modules/Library/dpUtils.py
# def findEnv(key, path):
# def findPath(filename):
# def findAllFiles(path, dir, ext):
# def findAllModules(path, dir):
# def findAllModuleNames(path, dir):
# def findLastNumber(nameList, basename):
# def findModuleLastNumber(className, typeName):
# def normalizeText(enteredText="", prefixMax=4):
# def useDefaultRenderLayer():
# def zeroOut(transformList=[], offset=False):
# def originedFrom(objName="", attrString=""):
# def getOriginedFromDic():
# def addHook(objName="", hookType="staticHook"):
# def hook():
# def clearNodeGrp(nodeGrpName='dpAR_GuideMirror_Grp', attrFind='guideBaseMirror', unparent=False):
# def getGuideChildrenList(nodeName):
# def mirroredGuideFather(nodeName):
# def getParentsList(nodeName):
# def getModulesToBeRigged(instanceList):
# def getCtrlRadius(nodeName):
# def zeroOutJoints(jntList=None, displayBone=False):
# def clearDpArAttr(itemList):
# def deleteChildren(item):
# def setJointLabel(jointName, sideNumber, typeNumber, labelString):
# def deleteJointLabel(jointName):
# def extractSuffix(nodeName):
# def filterName(name, itemList, separator):
# def checkRawURLForUpdate(DPAR_VERSION, DPAR_RAWURL, *args):
# def visitWebSite(website, *args):
# def checkLoadedPlugin(pluginName, exceptName=None, message="Not loaded plugin", *args):
# def twistBoneMatrix(nodeA, nodeB, twistBoneName, twistBoneMD=None, axis='Z', inverse=True, *args):
# def validateName(nodeName, suffix=None, *args):
# def articulationJoint(fatherNode, brotherNode, corrNumber=0, dist=1, jarRadius=1.5, doScale=True, *args):
# def getNodeByMessage(grpAttrName, *args):
# def attachToMotionPath(nodeName, curveName, mopName, uValue):
# def profiler(func):
#     def runProfile(*args, **kwargs):
# def extract_world_scale_from_matrix(obj):
# DPAR_PROFILE_MODE = False


# Path: dpAutoRigSystem/Modules/dpNose.py
from maya import cmds
from .Library import dpUtils
from . import dpBaseClass
from . import dpLayoutClass

        self.sideTMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Side_Translate_MD")
        self.sideRMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Side_Rotate_MD")
        self.nostrilMD = cmds.createNode("multiplyDivide", name=self.guideName+"_Nostril_MD")
        cmds.connectAttr(self.cvLSideLoc+".translateX", self.sideTMD+".input1X", force=True)
        cmds.connectAttr(self.cvLSideLoc+".translateY", self.sideTMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLSideLoc+".translateZ", self.sideTMD+".input1Z", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateX", self.sideRMD+".input1X", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateY", self.sideRMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLSideLoc+".rotateZ", self.sideRMD+".input1Z", force=True)
        cmds.connectAttr(self.sideTMD+".outputX", self.cvRSideLoc+".translateX", force=True)
        cmds.connectAttr(self.sideTMD+".outputY", self.cvRSideLoc+".translateY", force=True)
        cmds.connectAttr(self.sideTMD+".outputZ", self.cvRSideLoc+".translateZ", force=True)
        cmds.connectAttr(self.sideRMD+".outputX", self.cvRSideLoc+".rotateX", force=True)
        cmds.connectAttr(self.sideRMD+".outputY", self.cvRSideLoc+".rotateY", force=True)
        cmds.connectAttr(self.sideRMD+".outputZ", self.cvRSideLoc+".rotateZ", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateX", self.nostrilMD+".input1X", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateY", self.nostrilMD+".input1Y", force=True)
        cmds.connectAttr(self.cvLNostrilLoc+".translateZ", self.nostrilMD+".input1Z", force=True)
        cmds.connectAttr(self.nostrilMD+".outputX", self.cvRNostrilLoc+".translateX", force=True)
        cmds.connectAttr(self.nostrilMD+".outputY", self.cvRNostrilLoc+".translateY", force=True)
        cmds.connectAttr(self.nostrilMD+".outputZ", self.cvRNostrilLoc+".translateZ", force=True)
        cmds.setAttr(self.sideTMD+".input2X", -1)
        cmds.setAttr(self.sideRMD+".input2Y", -1)
        cmds.setAttr(self.sideRMD+".input2Z", -1)
        cmds.setAttr(self.nostrilMD+".input2X", -1)
        
        
    def changeJointNumber(self, enteredNJoints, *args):
        """ Edit the number of joints in the guide.
        """

        dpUtils.useDefaultRenderLayer()