#-------------------------------------------------------------------------------
# Name:        YJRigToolUI
# Purpose:
#
# Author:      yangjie
#
# Created:     04/07/2014
# Copyright:   (c) yangjie 2014
# Licence:     <hehe>
#-------------------------------------------------------------------------------

from maya.cmds import*
from YJ_RigTool_P import*


def YJ_Create_RigTool_UI():

    if window(r'YJ_RigToolUI',q=1,ex=1):
        deleteUI(r'YJ_RigToolUI',window=1)
    window(r'YJ_RigToolUI',w=300,h=500,s=0)

    columnLayout('Tool_CL')
    frameLayout('LockUNLock_FL',p='Tool_CL',l='Attr Un Lock',cll=0,cl=0,mh=10,mw=20,w=300)
    button(l='Lock(All)',c='YJ_Lock_Attribute(1,["yj"],1 ,1)')
    button(l='UnLock(All)',c='YJ_Lock_Attribute(1,["yj"],0 ,1)')
#
    frameLayout('Shape_FL',p='Tool_CL',l='ShapeChange',cll=0,cl=0,mh=10,mw=20,w=300)
    rowLayout('Shape_Scale_RL',nc=2,cw2=(80,120),p='Shape_FL')
    button(l='Scale',w=80,c='')
    intFieldGrp('Shape_Scale_IFG',l='Shape Scale:',v1=0.5,cw2=[80,80])

    rowLayout('Shape_Rotate_RL',nc=2,cw2=(80,220),p='Shape_FL')
    button(l='Rotate',w=80,c='')
    rowLayout('Shape_Rotate_RL_Chr',nc=3,cw3=(66,66,66),p='Shape_Rotate_RL')
    radioCollection('Shape_Rotate_RC',p='Shape_Rotate_RL_Chr')
    radioButton( 'rx',label='rx' )
    radioButton('ry', label='ry' )
    radioButton( 'rz',label='rz' )
    radioCollection('Shape_Rotate_RC',e=1,sl='rz')
#
    frameLayout('Shape_Mir_FL',p='Tool_CL',l='Shape  Mir',cll=0,cl=0,mh=10,mw=20,w=300)
    rowLayout('Shape_Mir_RL',nc=2,cw2=(120,120),p='Shape_Mir_FL')
    radioCollection('Shape_Mir_RC',p='Shape_Mir_RL')
    radioButton( 'LtoR',label='Left>>Right' )
    radioButton('RtoL', label='Right>>Left' )

    radioCollection('Shape_Mir_RC',e=1,sl='LtoR')
    button(l='Mirror Shape',c='',p='Shape_Mir_FL')




    showWindow()