def removeAttrsToRecord(self, attrs=None, *args): node = cmds.ls(sl=True, l=True)[0] if not attrs: attrs = r9Anim.getChannelBoxSelection() if attrs: cmds.recordAttr(node, at=attrs, delete=True) else: raise StandardError('No Channels selected in the ChannelBox to Set')
def removeAttrsToRecord(self,attrs=None,*args): node=cmds.ls(sl=True,l=True)[0] if not attrs: attrs=r9Anim.getChannelBoxSelection() if attrs: cmds.recordAttr(node,at=attrs,delete=True) else: raise StandardError('No Channels selected in the ChannelBox to Set')
def addAttrsToRecord(self, attrs=None, *args): node = cmds.ls(sl=True, l=True)[0] if not attrs: attrs = r9Anim.getChannelBoxSelection() if attrs: try: if self.rotateInRads and self.currAngularUnits == 'deg': log.info('setting AngularUnits to Radians') cmds.currentUnit(angle='rad') cmds.recordAttr(node, at=attrs) except: pass finally: cmds.currentUnit(angle=self.currAngularUnits) log.info('setting AngularUnits back to Degrees') else: raise StandardError('No Channels selected in the ChannelBox to Set')
def addAttrsToRecord(self,attrs=None,*args): node=cmds.ls(sl=True,l=True)[0] if not attrs: attrs=r9Anim.getChannelBoxSelection() if attrs: try: if self.rotateInRads and self.currAngularUnits=='deg': log.info('setting AngularUnits to Radians') cmds.currentUnit(angle='rad') cmds.recordAttr(node,at=attrs) except: pass finally: cmds.currentUnit(angle=self.currAngularUnits) log.info('setting AngularUnits back to Degrees') else: raise StandardError('No Channels selected in the ChannelBox to Set')