예제 #1
0
def evalManagerState(mode='off'):
    '''
    wrapper function for the evalManager so that it's switching is recorded in 
    the undo stack via the Red9.evalManager_switch plugin
    '''
    if r9Setup.mayaVersion()>=2016:
        if not cmds.pluginInfo('evalManager_switch', q=True, loaded=True):
            try:
                cmds.loadPlugin('evalManager_switch')
            except:
                log.warning('Plugin Failed to load : evalManager_switch')
        try:
            # via the plug-in to register the switch to the undoStack
            cmds.evalManager_switch(mode=mode)
        except:
            log.debug('evalManager_switch plugin not found, running native Maya evalManager command')
            cmds.evaluationManager(mode=mode)  # run the default maya call instead
        log.debug('EvalManager - switching state : %s' % mode)
    else:
        log.debug("evalManager skipped as you're in an older version of Maya")
예제 #2
0
def evalManagerState(mode='off'):
    '''
    wrapper function for the evalManager so that it's switching is recorded in
    the undo stack via the Red9.evalManager_switch plugin
    '''
    if r9Setup.mayaVersion() >= 2016:
        if not cmds.pluginInfo('evalManager_switch', q=True, loaded=True):
            try:
                cmds.loadPlugin('evalManager_switch')
            except:
                log.warning('Plugin Failed to load : evalManager_switch')
        try:
            # via the plug-in to register the switch to the undoStack
            cmds.evalManager_switch(mode=mode)
        except:
            log.debug('evalManager_switch plugin not found, running native Maya evalManager command')
            cmds.evaluationManager(mode=mode)  # run the default maya call instead
        log.debug('EvalManager - switching state : %s' % mode)
    else:
        log.debug("evalManager skipped as you're in an older version of Maya")