#===============================================================================
# YJ_MirrorShape_P
# author: yangjie
# mobilePhone:15850792203
# QQ:691633493
# E-mail:691633493@
#version:1.0
#===============================================================================
from YJ_Rig_Pub import*

def YJ_MirrorListShapes(InLis):
    ObLis = InLis[0]
    MirLis = InLis[1]




def YJ_MirrorShape(InLis):
    Obj = InLis[0]
    Mir = InLis[1]
    Attr = InLis[2]
    PM = YJ_GetMirPM([Obj,Attr])
    group( em=True, name='MirBase' )
    MirName = Obj + "_Mir"
    duplicateCurve( Obj, l= 1, o=1,n = MirName)
    YJ_Try_Parent(MirName,'MirBase')
    setAttr('MirBase'+Attr,-1*PM)
    YJ_Try_Parent(MirName,Mir)
    makeIdentity(MirName, apply=1, translate=1, rotate=1, scale=1 )
    YJ_Parent_Shape(MirName,Mir,0,0)
    delete( 'MirBase' )


def YJ_GetMirPM(InLis):
    Obj = InLis[0]
    Attr = InLis[1]
    AttrVa = getAttr(Obj+Attr)
    if AttrVa > 0:
        PM = -1
    if AttrVa < 0:
        PM = 1
    return PM