# Path: mayaLib/pipelineLib/utility/nameCheck.py
# def nameCheck(name):
#     """
#     Return new univocal Name
#     :param name: str
#     :return: str
#     """
#     nameList = pm.ls(name)
#     nameCount = len(nameList)
# 
#     newNameRPart = str(name).rpartition('_')
#     newName = newNameRPart[0].replace('*', '') + str(nameCount + 1) + newNameRPart[1] + newNameRPart[2]
#     return newName
# 
# 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/shaderLib/base/shader_base.py
# def build_lambert(shaderType='lambert', shaderName='tmp-shader', color=(0.5, 0.5, 0.5), transparency=(0.0, 0.0, 0.0)):
# def build_surfaceshader(shaderType='surfaceShader', shaderName='tmp-shader', color=(0.5, 0.5, 0.5)):
# def assign_shader(geo, shader):
#     def __init__(self, shader_name, shader_type='aiStandard'):
#     def get_shader(self):
#     def assign_shader(self, geo):
#     def connect_color_texture(self, file_node, slot_name):
#     def connect_luminance_texture(self, file_node, slot_name):
#     def connect_fresnel(self, file_node, slot_name):
#     def connect_normal(self, file_node, slot_name):
# class Shader_base():


from string import ascii_letters as letters
from mayaLib.pipelineLib.utility import nameCheck
from mayaLib.rigLib.utils import util
from mayaLib.shaderLib.base import shader_base
import pymel.core as pm
        glb_ctrl_b = pm.circle(c=[0, 0, 2],
                               sw=360,
                               r=0.3,
                               nr=[0, 1, 0],
                               ch=0,
                               n='%sglobal_b_CTRL' % (name))[0]
        # grabs it's shape recolors it
        glb_ctrl_bshape = glb_ctrl_b.getShape()
        glb_ctrl_bshape.overrideEnabled.set(1)
        glb_ctrl_bshape.overrideColor.set(17)
        # parents the shapeNode of secondary curve the primary curve
        pm.parent(glb_ctrl_bshape,
                  glb_ctrl,
                  r=True,
                  s=True)
        # deletes empty transformNode
        pm.delete(glb_ctrl_b)
        # return primary control transformNode
        pm.select(glb_ctrl,
                  r=True)
        return glb_ctrl

    def flexiplane(self, prefix=''):
        """
        Build FlexiPlane
        :param index: number of flexiplane in scene (auto managed by maya)
        :return: FlexiPlane group node
        """

        fp_name = '%sflexiPlane' % prefix

# Path: mayaLib/pipelineLib/utility/nameCheck.py
# def nameCheck(name):
#     """
#     Return new univocal Name
#     :param name: str
#     :return: str
#     """
#     nameList = pm.ls(name)
#     nameCount = len(nameList)
# 
#     newNameRPart = str(name).rpartition('_')
#     newName = newNameRPart[0].replace('*', '') + str(nameCount + 1) + newNameRPart[1] + newNameRPart[2]
#     return newName
# 
# 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/shaderLib/base/shader_base.py
# def build_lambert(shaderType='lambert', shaderName='tmp-shader', color=(0.5, 0.5, 0.5), transparency=(0.0, 0.0, 0.0)):
# def build_surfaceshader(shaderType='surfaceShader', shaderName='tmp-shader', color=(0.5, 0.5, 0.5)):
# def assign_shader(geo, shader):
#     def __init__(self, shader_name, shader_type='aiStandard'):
#     def get_shader(self):
#     def assign_shader(self, geo):
#     def connect_color_texture(self, file_node, slot_name):
#     def connect_luminance_texture(self, file_node, slot_name):
#     def connect_fresnel(self, file_node, slot_name):
#     def connect_normal(self, file_node, slot_name):
# class Shader_base():


# Path: mayaLib/rigLib/utils/flexiplane.py
from string import ascii_letters as letters
from mayaLib.pipelineLib.utility import nameCheck
from mayaLib.rigLib.utils import util
from mayaLib.shaderLib.base import shader_base
import pymel.core as pm

        glb_ctrl_b = pm.circle(c=[0, 0, 2],
                               sw=360,
                               r=0.3,
                               nr=[0, 1, 0],
                               ch=0,
                               n='%sglobal_b_CTRL' % (name))[0]
        # grabs it's shape recolors it
        glb_ctrl_bshape = glb_ctrl_b.getShape()
        glb_ctrl_bshape.overrideEnabled.set(1)
        glb_ctrl_bshape.overrideColor.set(17)
        # parents the shapeNode of secondary curve the primary curve
        pm.parent(glb_ctrl_bshape,
                  glb_ctrl,
                  r=True,
                  s=True)
        # deletes empty transformNode
        pm.delete(glb_ctrl_b)
        # return primary control transformNode
        pm.select(glb_ctrl,
                  r=True)
        return glb_ctrl

    def flexiplane(self, prefix=''):
        """
        Build FlexiPlane
        :param index: number of flexiplane in scene (auto managed by maya)
        :return: FlexiPlane group node
        """

        fp_name = '%sflexiPlane' % prefix

        fp_name = nameCheck.nameCheck(fp_name + '*_GRP').replace('_GRP', '', 1)  # flexiPlane_GRP