def define(self):
    _short = self.mNode
    _str_func = '[{0}] define'.format(_short)

    ATTR.set_alias(_short, 'sy', 'blockScale')
    self.setAttrFlags(attrs=['sx', 'sz', 'sz'])
    self.doConnectOut('sy', ['sx', 'sz'])
    ATTR.set_hidden(_short, 'baseSize', True)

    _shapes = self.getShapes()
    if _shapes:
        log.debug("|{0}| >>  Removing old shapes...".format(_str_func))
        mc.delete(_shapes)

    _size = self.atUtils('defineSize_get')

    #_sizeSub = _size / 2.0
    log.debug("|{0}| >>  Size: {1}".format(_str_func, _size))
    _crv = CURVES.create_fromName(name='locatorForm',
                                  direction='z+',
                                  size=_size * 2.0)

    SNAP.go(_crv, self.mNode)
    CORERIG.override_color(_crv, 'white')
    CORERIG.shapeParent_in_place(self.mNode, _crv, False)
    mHandleFactory = self.asHandleFactory()
    self.addAttr('cgmColorLock', True, lock=True, hidden=True)

    if self.cgmName == 'default':
        self.cgmName = 'eyeLook'
        self.doName()
Exemple #2
0
def define(self):
    _short = self.mNode
    ATTR.set(_short, 'translate', [0, 0, 0])
    ATTR.set(_short, 'rotate', [0, 0, 0])
    ATTR.set_standardFlags(self.mNode,
                           attrs=['translate', 'rotate', 'sx', 'sz'])
    for a in ['x', 'z']:
        ATTR.connect("{0}.sy".format(_short), "{0}.s{1}".format(_short, a))
    ATTR.set_alias(_short, 'sy', 'blockScale')
Exemple #3
0
def define(self):
    try:
        _short = self.mNode
        ATTR.set_alias(_short,'sy','blockScale')    
        self.setAttrFlags(attrs=['sx','sz','sz'])
        self.doConnectOut('sy',['sx','sz'])
        ATTR.set_min(_short,'controlOffset',.001)
        
        try:mc.delete(self.getShapes())
        except:pass
    except Exception,err:
        cgmGEN.cgmExceptCB(Exception,err,localDat=vars())