# 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
        # delete the flexiplane
        delete_flex = [pm.delete(f.getParent()) for f in flex]
        return flex, curve_name

    def create_plane(self, name, width=10, lengthratio=0.2):
        """
        Create NURBS plane
        :param name: string
        :param width:
        :param lengthratio:
        :return:
        """
        nurbs_plane = pm.nurbsPlane(name=name,
                                    width=width,
                                    lengthRatio=lengthratio,
                                    patchesU=width / 2,
                                    degree=3,
                                    axis=[0, 1, 0],
                                    constructionHistory=False)
        return nurbs_plane

    def create_lambret(self, geo, color=(0.5, 0.5, 0.5), transparency=(0.0, 0.0, 0.0)):
        """
        Create base lamber shader
        :param geo: list of geo to apply shader
        :param color: es: (0,1,0)
        :param transparency: es: (0,1,0)
        :return: none
        """
        name = 'flexiPlane_lambert_material'

# 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

        # delete the flexiplane
        delete_flex = [pm.delete(f.getParent()) for f in flex]
        return flex, curve_name

    def create_plane(self, name, width=10, lengthratio=0.2):
        """
        Create NURBS plane
        :param name: string
        :param width:
        :param lengthratio:
        :return:
        """
        nurbs_plane = pm.nurbsPlane(name=name,
                                    width=width,
                                    lengthRatio=lengthratio,
                                    patchesU=width / 2,
                                    degree=3,
                                    axis=[0, 1, 0],
                                    constructionHistory=False)
        return nurbs_plane

    def create_lambret(self, geo, color=(0.5, 0.5, 0.5), transparency=(0.0, 0.0, 0.0)):
        """
        Create base lamber shader
        :param geo: list of geo to apply shader
        :param color: es: (0,1,0)
        :param transparency: es: (0,1,0)
        :return: none
        """
        name = 'flexiPlane_lambert_material'

        my_shader = shader_base.build_lambert(shaderType='lambert',