Пример #1
0
 def __exit__(self, exc_type, exc_value, traceback):
     if self.managedHIK:
         cmds.keyingGroup(fil=self.keyingGroups)
         cmds.select(self.NodeList)
         mel.eval("hikManipStop")
         log.info('Exit HIK Mode >> HIKContext Manager:')
     if exc_type:
         log.exception('%s : %s' % (exc_type, exc_value))
     if self.objs:
         cmds.select(self.objs)
     return True
Пример #2
0
 def __exit__(self, exc_type, exc_value, traceback):
     if self.managedHIK:
         cmds.keyingGroup(fil=self.keyingGroups)
         cmds.select(self.NodeList)
         mel.eval("hikManipStop")
         log.info('Exit HIK Mode >> HIKContext Manager:')
     if exc_type:
         log.exception('%s : %s'%(exc_type, exc_value))
     if self.objs:
         cmds.select(self.objs)
     return True
Пример #3
0
    def __enter__(self):
        try:
            #We set the keying group mainly for the copyKey code, stops the entire rig being
            #manipulated on copy of single effector data
            self.keyingGroups = cmds.keyingGroup(q=True, fil=True)
            if [node for node in self.NodeList if cmds.nodeType(node) == 'hikIKEffector'\
                or cmds.nodeType(node) == 'hikFKJoint']:
                self.managedHIK = True

            if self.managedHIK:
                cmds.keyingGroup(fil="NoKeyingGroups")
                log.info('Processing HIK Mode >> using HIKContext Manager:')
                cmds.select(self.NodeList)
                mel.eval("hikManipStart 1 1")
        except:
            self.managedHIK = False
Пример #4
0
 def __enter__(self):
     try:
         #We set the keying group mainly for the copyKey code, stops the entire rig being
         #manipulated on copy of single effector data
         self.keyingGroups=cmds.keyingGroup(q=True, fil=True)
         if [node for node in self.NodeList if cmds.nodeType(node) == 'hikIKEffector'\
             or cmds.nodeType(node) == 'hikFKJoint']:
             self.managedHIK = True
             
         if self.managedHIK:
             cmds.keyingGroup(fil="NoKeyingGroups")
             log.info('Processing HIK Mode >> using HIKContext Manager:')
             cmds.select(self.NodeList)
             mel.eval("hikManipStart 1 1")
     except:
         self.managedHIK = False
Пример #5
0
def keyingGroup(*args, **kwargs):
    res = cmds.keyingGroup(*args, **kwargs)
    if not kwargs.get('query', kwargs.get('q', False)):
        res = _factories.maybeConvert(res, _general.PyNode)
    return res