# 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 functools import partial
from maya import cmds
from .Library import dpUtils
from importlib import reload
            # disable colorOverride of all shapes inside of the moduleGrp:
            childrenModuleList = cmds.listRelatives(self.moduleGrp, allDescendents=True)
            if childrenModuleList:
                if colorIndex != 0:
                    for child in childrenModuleList:
                        if cmds.getAttr(child+'.overrideEnabled') == 1:
                            cmds.setAttr(child+'.overrideEnabled', 0)
                else:
                    for child in childrenModuleList:
                        if cmds.getAttr(child+'.overrideColor') != 0:
                            cmds.setAttr(child+'.overrideEnabled', 1)
    
    
    def displayAnnotation(self, value, *args):
        """ Get the current display setting from interface to show or hide the Annotation for this module.
        """
        # verify integrity of the guideModule:
        if self.verifyGuideModuleIntegrity():
            self.annotation = self.moduleGrp+"_Ant"
            cmds.setAttr(self.annotation+'.visibility', value)
            cmds.setAttr(self.moduleGrp+'.displayAnnotation', value)
    
    
    def checkFatherMirror(self, *args):
        """ Check all fathers and verify if there are mirror applied to father.
            Then, stop mirror for this guide or continue creating its mirror.
            Return "stopIt" if there's a father guide mirror.
        """
        # verify integrity of the guideModule:
        if self.verifyGuideModuleIntegrity():

# 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/dpLayoutClass.py
from functools import partial
from maya import cmds
from .Library import dpUtils
from importlib import reload

            # disable colorOverride of all shapes inside of the moduleGrp:
            childrenModuleList = cmds.listRelatives(self.moduleGrp, allDescendents=True)
            if childrenModuleList:
                if colorIndex != 0:
                    for child in childrenModuleList:
                        if cmds.getAttr(child+'.overrideEnabled') == 1:
                            cmds.setAttr(child+'.overrideEnabled', 0)
                else:
                    for child in childrenModuleList:
                        if cmds.getAttr(child+'.overrideColor') != 0:
                            cmds.setAttr(child+'.overrideEnabled', 1)
    
    
    def displayAnnotation(self, value, *args):
        """ Get the current display setting from interface to show or hide the Annotation for this module.
        """
        # verify integrity of the guideModule:
        if self.verifyGuideModuleIntegrity():
            self.annotation = self.moduleGrp+"_Ant"
            cmds.setAttr(self.annotation+'.visibility', value)
            cmds.setAttr(self.moduleGrp+'.displayAnnotation', value)
    
    
    def checkFatherMirror(self, *args):
        """ Check all fathers and verify if there are mirror applied to father.
            Then, stop mirror for this guide or continue creating its mirror.
            Return "stopIt" if there's a father guide mirror.
        """
        # verify integrity of the guideModule:
        if self.verifyGuideModuleIntegrity():

            mirroredGuideFather = dpUtils.mirroredGuideFather(self.moduleGrp)