def _showUI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, widthHeight=(400, 220)) cmds.columnLayout('uicl_audioMain',adjustableColumn=True) cmds.separator(h=15, style='none') cmds.text(l='Select Audio to Offset') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)]) cmds.button(label='<< Offset', ann='Nudge selected Audio Backwards', command=partial(self.offsetSelectedBy,'negative')) cmds.floatField('AudioOffsetBy', value=10) cmds.button(label='Offset >>', ann='Nudge selected Audio Forwards', command=partial(self.offsetSelectedBy,'positive')) cmds.setParent('..') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)]) cmds.button(label='Offset Range to Start at:', ann='offset the selected range of audionodes such that they start at the given frame', command=self.offsetSelectedTo) cmds.floatField('AudioOffsetToo', value=10) cmds.setParent('..') cmds.separator(h=15, style='in') cmds.button(label='Ripple selected', ann="Ripple offset the selected audio nodes so they're timed one after another", command=self.offsetRipple) cmds.separator(h=15, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(self.win) cmds.window(self.win, e=True, widthHeight=(290, 190))
def _showUI(self): if cmds.window('MouseMoCap', exists=True): cmds.deleteUI('MouseMoCap', window=True) cmds.window('MouseMoCap', title="MouseMoCap", widthHeight=(260, 180)) cmds.columnLayout(adjustableColumn=True) cmds.separator(h=15, style='none') cmds.text('Use the Mouse as a MoCap input devise') cmds.separator(h=15, style='none') cmds.button( label='Set Attributes to Record (chBox)', ann='Prime Selected Attributes in the channelBox for Recording', command=partial(self.addAttrsToRecord)) cmds.button(label='Remove Record Attributes (chBox)', ann='Remove Attrs from Record selected in the channelBox', command=partial(self.removeAttrsToRecord)) cmds.separator(h=15, style='none') cmds.button('MouseMoCapRecord', label='RECORD', bgc=[0.1, 0.8, 0.1], command=partial(self._runRecord)) cmds.separator(h=25, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow('MouseMoCap') cmds.window('MouseMoCap', e=True, widthHeight=(260, 180))
def _showUI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, widthHeight=(400, 220)) cmds.columnLayout('uicl_audioMain',adjustableColumn=True) cmds.separator(h=15, style='none') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)]) cmds.button(label='<< Offset', ann='Nudge selected Audio Backwards', command=partial(self.offsetSelectedBy,'negative')) cmds.floatField('AudioOffsetBy', value=10) cmds.button(label='Offset >>', ann='Nudge selected Audio Forwards', command=partial(self.offsetSelectedBy,'positive')) cmds.setParent('..') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)]) cmds.button(label='Offset Range to Start at:', ann='offset the selected range of audionodes such that they start at the given frame', command=self.offsetSelectedTo) cmds.floatField('AudioOffsetToo', value=10) cmds.setParent('..') cmds.button(label='Ripple selected', ann="Ripple offset the selected audio nodes so they're timed one after another", command=self.offsetRipple) cmds.separator(h=15, style='none') cmds.frameLayout(label='PRO : Broadcast Wav support', cll=True, cl=False, borderStyle='etchedOut') cmds.columnLayout(adjustableColumn=True, en=r9Setup.has_pro_pack()) cmds.separator(h=5, style='none') cmds.text(label="NOTE: These will only run if the audio is\nin the Bwav format and has internal timecode data.") cmds.separator(h=10, style='none') cmds.button(label='Sync Bwavs to Internal Timecode', ann='Sync audio nodes to their originally recorded internal timecode reference', command=self.sync_bwavs) cmds.separator(h=10, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 100)], columnSpacing=[(2,20)]) cmds.button(label='Set Timecode Ref', ann="Set the audio node to use as the reference timecode so all other become relative to this offset", command=self.__uicb_setReferenceBwavNode) cmds.text('bwavRefTC', label='No Reference Set') cmds.setParent('..') cmds.button(label='Sync Bwavs Relative to Selected', ann="Sync audio nodes via their internal timecodes such that they're relative to that of the given reference", command=self.sync_bwavsRelativeToo) cmds.separator(h=10, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 140),(2,140)]) cmds.button(label='Timecode HUD : ON', ann="Live monitor internal Timecode - From a selected node with Timecode Attrs", command=self.timecodeHud) cmds.button(label='Timecode HUD : Kill', ann="Kill all HUD's", command=r9Meta.hardKillMetaHUD) cmds.setParent('uicl_audioMain') cmds.separator(h=10, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(self.win) cmds.window(self.win, e=True, widthHeight=(290, 350))
def _showUI(self): reportData=self.SceneReviewer.getReportData() allowEdit=False sceneName=None date=reportData['date'] if reportData.has_key('sceneName'): sceneName=reportData['sceneName'] author=None if not reportData['author']: #new sceneReport author=getpass.getuser() allowEdit=True elif reportData['author']==getpass.getuser(): #current author of comment == you author=getpass.getuser() allowEdit=True date=time.ctime() else: #current author != you author=reportData['author'] if not date: date=time.ctime() if not sceneName: sceneName=self.getSceneName() if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) window = cmds.window(self.win, title=self.win, s=True, widthHeight=(260,300)) cmds.scrollLayout('reviewScrollLayout',rc=lambda *args:self.resizeTextScrollers()) cmds.columnLayout(adjustableColumn=True,columnAttach=('both',5)) cmds.textFieldGrp('author',label='Author', ed=False, text=author)#, tcc=partial(self.updateInternalDict)) cmds.textFieldGrp('date', label='Date', ed=False, text=date)#, tcc=partial(self.updateInternalDict)) cmds.textFieldGrp('sceneName', label='SceneName', ed=False, text=sceneName) cmds.separator(h=15,style='none') cmds.text(label='Comment') cmds.scrollField('comment', text=reportData['comment'], ed=allowEdit, h=200, wordWrap=False, kpc=partial(self.updateInternalDict), cc=partial(self.updateInternalDict)) cmds.button(label='New Comment',bgc=r9Setup.red9ButtonBGC(1),c=partial(self.addNewComment)) cmds.separator(h=15,style='none') cmds.text(label='History') cmds.scrollField('history', editable=False, en=True, wordWrap=False, h=200,text=reportData['history']) cmds.separator(h=15,style='none') cmds.rowColumnLayout('SceneNodeActivatorRC',numberOfColumns=2,columnWidth=[(1,200),(2,200)]) cmds.button('setReviewActive',label='Activate Live Review',bgc=r9Setup.red9ButtonBGC(1),c=lambda x:self._setReviewStatus('active')) cmds.button('setReviewInActive',label='Disable Live Review',bgc=r9Setup.red9ButtonBGC(1),c=lambda x:self._setReviewStatus('inactive')) cmds.setParent('..') cmds.separator(h=15,style='none') cmds.iconTextButton( style='iconOnly', bgc=(0.7,0,0),image1='Rocket9_buttonStrap2.bmp', c=lambda *args:(r9Setup.red9ContactInfo()),h=22,w=200 ) cmds.showWindow(window) if self.SceneReviewer.exists(): self._setReviewStatus('active') else: self._setReviewStatus('inactive')
def _showUI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, widthHeight=(400, 180)) cmds.columnLayout('uicl_audioMain',adjustableColumn=True) cmds.separator(h=15, style='none') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 100), (2, 90), (3, 100)]) cmds.button(label='<< Offset', ann='Nudge selected Audio Backwards', command=partial(self.offsetSelectedBy,'negative')) cmds.floatField('AudioOffsetBy', value=10) cmds.button(label='Offset >>', ann='Nudge selected Audio Forwards', command=partial(self.offsetSelectedBy,'positive')) cmds.setParent('..') cmds.separator(h=15, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 90)]) cmds.button(label='Offset Range to Start at:', ann='offset the selected range of audionodes such that they start at the given frame', command=self.offsetSelectedTo) cmds.floatField('AudioOffsetToo', value=10) cmds.setParent('..') cmds.separator(h=15, style='none') cmds.frameLayout(label='Broadcast Wav support', cll=True, borderStyle='etchedOut') cmds.columnLayout(adjustableColumn=True) cmds.separator(h=5, style='none') cmds.text(label="NOTE: These will only run if the audio is\nin the Bwav format and has internal timecode data.") cmds.separator(h=10, style='none') cmds.button(label='Sync Bwavs to Internal Timecode', ann='Sync audio nodes to their originally recorded internal timecode reference', command=self.sync_bwavs) cmds.separator(h=10, style='in') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 100)], columnSpacing=[(2,20)]) cmds.button(label='Set Timecode Ref', ann="Set the audio node to use as the reference timecode so all other become relative to this offset", command=self.__uicb_setReferenceBwavNode) cmds.text('bwavRefTC', label='No Reference Set') cmds.setParent('..') cmds.button(label='Sync Bwavs Relative to Selected', ann="Sync audio nodes via their internal timecodes such that they're relative to that of the given reference", command=self.sync_bwavsRelativeToo) cmds.setParent('uicl_audioMain') cmds.separator(h=10, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(self.win) cmds.window(self.win, e=True, widthHeight=(290, 300))
def _showUI(self): self.close() window = cmds.window(self.win, title=self.win, s=True, widthHeight=(450, 700)) cmds.menuBarLayout() cmds.menu(l=LANGUAGE_MAP._Generic_.tools) cmds.menuItem(l=LANGUAGE_MAP._Generic_.vimeo_help, c="import Red9.core.Red9_General as r9General;r9General.os_OpenFile('https://vimeo.com/459389038')") cmds.menuItem(divider=True) cmds.menuItem(l='Delete SceneNode Data', c=self.delete) cmds.scrollLayout('reviewScrollLayout', rc=lambda *args: self._resizeTextScrollers(), cr=True) cmds.columnLayout(adjustableColumn=True, columnAttach=('both', 5)) cmds.textFieldGrp('author', l=LANGUAGE_MAP._SceneReviewerUI_.author, ed=False, text='') cmds.textFieldGrp('date', l=LANGUAGE_MAP._SceneReviewerUI_.date, ed=False, text='') cmds.textFieldGrp('sceneName', l=LANGUAGE_MAP._SceneReviewerUI_.scene_name, ed=False, text='') cmds.separator(h=15, style='none') cmds.text(l=LANGUAGE_MAP._SceneReviewerUI_.comment) cmds.scrollField('comment', text='', ed=True, h=200, wordWrap=False, kpc=partial(self.updateInternalDict), cc=partial(self.updateInternalDict)) cmds.button(l=LANGUAGE_MAP._SceneReviewerUI_.new_comment, bgc=r9Setup.red9ButtonBGC(1), c=partial(self.addNewComment)) cmds.separator(h=15, style='none') cmds.text(l=LANGUAGE_MAP._SceneReviewerUI_.history) cmds.scrollField('history', editable=False, en=True, wordWrap=False, h=200, text='') cmds.separator(h=15, style='none') cmds.rowColumnLayout('SceneNodeActivatorRC', numberOfColumns=3, columnWidth=[(1, 200), (2, 200)]) cmds.button('setReviewActive', l=LANGUAGE_MAP._SceneReviewerUI_.activate_live_review, bgc=r9Setup.red9ButtonBGC(1), c=lambda x: self._setReviewStatus('active')) cmds.button('setReviewInActive', l=LANGUAGE_MAP._SceneReviewerUI_.disable_live_review, bgc=r9Setup.red9ButtonBGC(1), c=lambda x: self._setReviewStatus('inactive')) cmds.setParent('..') cmds.separator(h=15, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(window) self._refresh() if self.SceneReviewer.exists(): self._setReviewStatus('active') else: self._setReviewStatus('inactive')
def _showUI(self): if cmds.window('MouseMoCap', exists=True): cmds.deleteUI('MouseMoCap', window=True) cmds.window('MouseMoCap' , title="MouseMoCap", widthHeight=(260, 180)) cmds.columnLayout(adjustableColumn=True) cmds.separator(h=15,style='none') cmds.text('Use the Mouse as a MoCap input devise') cmds.separator(h=15,style='none') cmds.button(label='Set Attributes to Record (chBox)', ann='Prime Selected Attributes in the channelBox for Recording', command=partial(self.addAttrsToRecord)) cmds.button(label='Remove Record Attributes (chBox)', ann='Remove Attrs from Record selected in the channelBox', command=partial(self.removeAttrsToRecord)) cmds.separator(h=15,style='none') cmds.button('MouseMoCapRecord', label='RECORD', bgc=[0.1,0.8,0.1], command=partial(self._runRecord)) cmds.separator(h=25,style='none') cmds.iconTextButton( style='iconOnly', bgc=(0.7,0,0),image1='Rocket9_buttonStrap2.bmp', c=lambda *args:(r9Setup.red9ContactInfo()),h=22,w=200 ) cmds.showWindow('MouseMoCap') cmds.window('MouseMoCap',e=True,widthHeight=(260, 180))
def _UI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, menuBar=True, sizeable=False, widthHeight=(300, 360)) cmds.menu(label='Help') cmds.menuItem(label='Watch MasterClass Video', c=lambda x: self._contactDetails(type='vimeo')) cmds.menuItem(label='Contact', c=lambda x: self._contactDetails(type='email')) cmds.menuItem(label='Blog', c=lambda x: self._contactDetails(type='blog')) cmds.columnLayout(adjustableColumn=True) cmds.text(fn="boldLabelFont", label="Advanced Bind Options") cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, cw=((1, 150), (2, 150)), cs=((1, 10))) cmds.checkBox(value=self.settings.BindRots, label="BindRots", ann="Bind only the Rotates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('BindRots', True), \ ofc=lambda x:self.settings.__setattr__('BindRots', False)) cmds.checkBox(value=self.settings.BindTrans, label="BindTrans", ann="Bind only the Translates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('BindTrans', True), \ ofc=lambda x:self.settings.__setattr__('BindTrans', False)) cmds.checkBox(value=1, label="AlignRots CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('AlignToControlRots', True), \ ofc=lambda x:self.settings.__setattr__('AlignToSourceRots', True)) cmds.checkBox(value=1, label="AlignTrans CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('AlignToControlTrans', True), \ ofc=lambda x:self.settings.__setattr__('AlignToSourceTrans', True)) cmds.checkBox(value=self.settings.ResetRotates, label="Reset Rots Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('ResetRotates', True), \ ofc=lambda x:self.settings.__setattr__('ResetRotates', False)) cmds.checkBox(value=self.settings.ResetTranslates, label="Reset Trans Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('ResetTranslates', True), \ ofc=lambda x:self.settings.__setattr__('ResetTranslates', False)) cmds.setParent('..') cmds.separator(h=10, style="none") cmds.button(label="BasicBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeBase(pm.selected()[0], pm.selected()[1], settings=self.settings).AddBinderNode()) cmds.button(label="ComplexBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeTwin(pm.selected()[0], pm.selected()[1], settings=self.settings).AddBinderNode()) cmds.button(label="AimerBind", al="center",\ ann="Select the Joint on the driving Skeleton to AIM at, then the Controller to be driven, finally a node on the driven skeleton to use as UpVector", \ c=lambda x:BindNodeAim(pm.selected()[0], pm.selected()[1], pm.selected()[2], settings=self.settings).AddBinderNode()) cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 147), (2, 147)]) cmds.button(label="Select BindNodes", al="center", \ ann="Select Top Group Node of the Source Binder", \ c=lambda x:pm.select(GetBindNodes(cmds.ls(sl=True,l=True)))) cmds.button(label="Select BoundControls", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:pm.select(GetBoundControls(cmds.ls(sl=True,l=True)))) cmds.setParent('..') cmds.button(label="Bake Binder", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:BakeBinderData(cmds.ls(sl=True,l=True))) cmds.separator(h=15, style="none") cmds.button(label="Link Skeleton Hierarchies", al="center", \ ann="Select Root joints of the source and destination skeletons to be connected", \ c=lambda x:BindSkeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1])) cmds.button(label="MakeStabilizer", al="center", \ ann="Select the nodes you want to extract the motion data from", \ c=lambda x:MakeStabilizedNode()) cmds.separator(h=20, style="none") cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(self.win)
def _UI(self): if cmds.window(self.win, exists=True):cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, menuBar=True, sizeable=False, widthHeight=(300,360)) cmds.menu(label='Help') cmds.menuItem(label='Watch MasterClass Video', c=lambda x:self._contactDetails(type='vimeo')) cmds.menuItem(label='Contact', c=lambda x:self._contactDetails(type='email')) cmds.menuItem(label='Blog' , c=lambda x:self._contactDetails(type='blog')) cmds.columnLayout(adjustableColumn=True) cmds.text(fn="boldLabelFont", label="Advanced Bind Options") cmds.separator (h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, cw=((1,150),(2,150)),cs=((1,10))) cmds.checkBox(value=self.settings.BindRots, label="BindRots", ann="Bind only the Rotates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('BindRots', True), \ ofc=lambda x:self.settings.__setattr__('BindRots', False)) cmds.checkBox(value=self.settings.BindTrans, label="BindTrans", ann="Bind only the Translates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('BindTrans', True), \ ofc=lambda x:self.settings.__setattr__('BindTrans', False)) cmds.checkBox(value=1, label="AlignTrans CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('AlignToControlTrans', True), \ ofc=lambda x:self.settings.__setattr__('AlignToSourceTrans', True)) cmds.checkBox(value=1, label="AlignRots CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('AlignToControlRots', True), \ ofc=lambda x:self.settings.__setattr__('AlignToSourceRots', True)) cmds.checkBox(value=self.settings.ResetTranslates, label="Reset Trans Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('ResetTranslates', True), \ ofc=lambda x:self.settings.__setattr__('ResetTranslates', False)) cmds.checkBox(value=self.settings.ResetRotates, label="Reset Rots Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('ResetRotates', True), \ ofc=lambda x:self.settings.__setattr__('ResetRotates', False)) cmds.setParent('..') cmds.separator (h=10, style="none") cmds.button(label="BasicBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeBase(pm.selected()[0], pm.selected()[1], settings=self.settings).AddBinderNode()) cmds.button(label="ComplexBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeTwin(pm.selected()[0], pm.selected()[1], settings=self.settings).AddBinderNode()) cmds.button(label="AimerBind", al="center",\ ann="Select the Joint on the driving Skeleton to AIM at, then the Controller to be driven, finally a node on the driven skeleton to use as UpVector", \ c=lambda x:BindNodeAim(pm.selected()[0], pm.selected()[1], pm.selected()[2], settings=self.settings).AddBinderNode()) cmds.separator (h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2,columnWidth=[(1,147),(2,147)]) cmds.button(label="Select BindNodes", al="center", \ ann="Select Top Group Node of the Source Binder", \ c=lambda x:pm.select(GetBindNodes(cmds.ls(sl=True,l=True)))) cmds.button(label="Select BoundControls", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:pm.select(GetBoundControls(cmds.ls(sl=True,l=True)))) cmds.setParent('..') cmds.button(label="Bake Binder", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:BakeBinderData(cmds.ls(sl=True,l=True))) cmds.separator (h=15, style="none") cmds.button(label="Link Skeleton Hierarchies", al="center", \ ann="Select Root joints of the source and destination skeletons to be connected", \ c=lambda x:BindSkeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1])) cmds.button(label="MakeStabilizer", al="center", \ ann="Select the nodes you want to extract the motion data from", \ c=lambda x:MakeStabilizedNode()) cmds.separator (h=20, style="none") cmds.iconTextButton( style='iconOnly', bgc=(0.7,0,0),image1='Rocket9_buttonStrap2.bmp', c=lambda *args:(r9Setup.red9ContactInfo()),h=22,w=200 ) cmds.showWindow(self.win)
def _showUI(self): reportData = self.SceneReviewer.getReportData() allowEdit = False sceneName = None date = reportData['date'] if 'sceneName' in reportData: sceneName = reportData['sceneName'] author = None if not reportData['author']: # new sceneReport author = getpass.getuser() allowEdit = True elif reportData['author'] == getpass.getuser(): # current author of comment == you author = getpass.getuser() allowEdit = True date = time.ctime() else: # current author != you author = reportData['author'] if not date: date = time.ctime() if not sceneName: sceneName = self.getSceneName() self.close() window = cmds.window(self.win, title=self.win, s=True, widthHeight=(450, 700)) cmds.scrollLayout('reviewScrollLayout', rc=lambda *args:self._resizeTextScrollers(), cr=True) cmds.columnLayout(adjustableColumn=True, columnAttach=('both', 5)) cmds.textFieldGrp('author', l=LANGUAGE_MAP._SceneReviewerUI_.author, ed=False, text=author) cmds.textFieldGrp('date', l=LANGUAGE_MAP._SceneReviewerUI_.date, ed=False, text=date) cmds.textFieldGrp('sceneName', l=LANGUAGE_MAP._SceneReviewerUI_.scene_name, ed=False, text=sceneName) cmds.separator(h=15, style='none') cmds.text(l=LANGUAGE_MAP._SceneReviewerUI_.comment) cmds.scrollField('comment', text=reportData['comment'], ed=allowEdit, h=200, wordWrap=False, kpc=partial(self.updateInternalDict), cc=partial(self.updateInternalDict)) cmds.button(l=LANGUAGE_MAP._SceneReviewerUI_.new_comment, bgc=r9Setup.red9ButtonBGC(1), c=partial(self.addNewComment)) cmds.separator(h=15, style='none') cmds.text(l=LANGUAGE_MAP._SceneReviewerUI_.history) cmds.scrollField('history', editable=False, en=True, wordWrap=False, h=200, text=reportData['history']) cmds.separator(h=15, style='none') cmds.rowColumnLayout('SceneNodeActivatorRC', numberOfColumns=2, columnWidth=[(1, 200), (2, 200)]) cmds.button('setReviewActive', l=LANGUAGE_MAP._SceneReviewerUI_.activate_live_review, bgc=r9Setup.red9ButtonBGC(1), c=lambda x:self._setReviewStatus('active')) cmds.button('setReviewInActive', l=LANGUAGE_MAP._SceneReviewerUI_.disable_live_review, bgc=r9Setup.red9ButtonBGC(1), c=lambda x:self._setReviewStatus('inactive')) cmds.setParent('..') cmds.separator(h=15, style='none') cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args:(r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(window) if self.SceneReviewer.exists(): self._setReviewStatus('active') else: self._setReviewStatus('inactive')
def _UI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, menuBar=True, sizeable=True, widthHeight=(300, 380)) cmds.menu(label='Help') cmds.menuItem(label='Watch MasterClass Video', c=lambda x: self._contactDetails(opentype='vimeo')) cmds.menuItem(label='Contact', c=r9Setup.red9ContactInfo) # cmds.menuItem(label='Contact', c=lambda x:self._contactDetails(opentype='email')) cmds.menuItem(label='Blog', c=r9Setup.red9_blog) cmds.menuItem(label='Red9HomePage', c=r9Setup.red9_website_home) cmds.columnLayout(adjustableColumn=True) cmds.text(fn="boldLabelFont", label="Advanced Bind Options") cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, cw=((1, 150), (2, 150)), cs=((1, 10))) cmds.checkBox( value=self.settings.bind_rots, label="bind_rots", ann="Bind only the Rotates of the given Controller", al="left", onc=lambda x: self.settings.__setattr__('bind_rots', True), ofc=lambda x: self.settings.__setattr__('bind_rots', False)) cmds.checkBox( value=self.settings.bind_trans, label="bind_trans", ann="Bind only the Translates of the given Controller", al="left", onc=lambda x: self.settings.__setattr__('bind_trans', True), ofc=lambda x: self.settings.__setattr__('bind_trans', False)) cmds.checkBox( value=1, label="AlignRots CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", onc=lambda x: self.settings.__setattr__('align_to_control_rots', True), ofc=lambda x: self.settings.__setattr__('align_to_source_rots', True)) cmds.checkBox( value=1, label="AlignTrans CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", onc=lambda x: self.settings.__setattr__('align_to_control_trans', True), ofc=lambda x: self.settings.__setattr__('align_to_source_trans', True)) cmds.checkBox( value=self.settings.reset_rots, label="Reset Rots Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", onc=lambda x: self.settings.__setattr__('reset_rots', True), ofc=lambda x: self.settings.__setattr__('reset_rots', False)) cmds.checkBox( value=self.settings.reset_trans, label="Reset Trans Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", onc=lambda x: self.settings.__setattr__('reset_trans', True), ofc=lambda x: self.settings.__setattr__('reset_trans', False)) cmds.setParent('..') cmds.separator(h=10, style="none") cmds.button( label="BasicBind", al="center", ann= "Select the Joint on the driving Skeleton then the Controller to be driven", c=lambda x: BindNodeBase(cmds.ls(sl=True, l=True)[0], cmds.ls(sl=True, l=True)[1], settings=self.settings).add_binder_node()) cmds.button( label="ComplexBind", al="center", ann= "Select the Joint on the driving Skeleton then the Controller to be driven", c=lambda x: BindNodeTwin(cmds.ls(sl=True, l=True)[0], cmds.ls(sl=True, l=True)[1], settings=self.settings).add_binder_node()) cmds.button( label="AimerBind", al="center", ann= "Select the Joint on the driving Skeleton to AIM at, then the Controller to be driven, finally a node on the driven skeleton to use as UpVector", c=lambda x: BindNodeAim(cmds.ls(sl=True, l=True)[0], cmds.ls(sl=True, l=True)[1], cmds.ls(sl=True, l=True)[2], settings=self.settings).add_binder_node()) cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 147), (2, 147)]) cmds.button( label="Add BakeMarker", al="center", ann="Add the BoundCtrl / Bake Marker to the selected nodes", c=lambda x: add_bind_markers(cmds.ls(sl=True, l=True))) cmds.button( label="remove BakeMarker", al="center", ann="Remove the BoundCtrl / Bake Marker from the selected nodes", c=lambda x: removeBindMarker(cmds.ls(sl=True, l=True))) cmds.button( label="Select BindNodes", al="center", ann="Select Top Group Node of the Source Binder", c=lambda x: pm.select(get_bind_nodes(cmds.ls(sl=True, l=True)))) cmds.button(label="Select BoundControls", al="center", ann="Select Top Group Node of the Bound Rig", c=lambda x: pm.select( get_bound_controls(cmds.ls(sl=True, l=True)))) cmds.setParent('..') cmds.rowColumnLayout(numberOfColumns=2, columnWidth=[(1, 200), (2, 74)], columnSpacing=[(2, 5)]) cmds.button(label="Bake Binder", al="center", ann="Select Top Group Node of the Bound Rig", c=lambda x: bake_binder_data(cmds.ls(sl=True, l=True), self .settings.bake_debug)) cmds.checkBox( value=self.settings.bake_debug, label="Debug View", ann="Keep viewport active to observe the baking process", al="left", onc=lambda x: self.settings.__setattr__('bake_debug', True), ofc=lambda x: self.settings.__setattr__('bake_debug', False)) cmds.setParent('..') cmds.separator(h=10, style="none") cmds.button( label="Link Skeleton Hierarchies - Direct Connect", al="center", ann= "Select Root joints of the source and destination skeletons to be connected - connect via attrs", c=lambda x: bind_skeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1], method='connect', verbose=True)) cmds.button( label="Link Skeleton Hierarchies - Constraints", al="center", ann= "Select Root joints of the source and destination skeletons to be connected - connect via parentConstraints", c=lambda x: bind_skeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1], method='constrain', verbose=True)) cmds.separator(h=10, style="none") cmds.button( label="MakeStabilizer", al="center", ann="Select the nodes you want to extract the motion data from", c=lambda x: make_stabilized_node()) cmds.separator(h=20, style="none") cmds.iconTextButton(style='iconOnly', bgc=(0.7, 0, 0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args: (r9Setup.red9ContactInfo()), h=22, w=200) cmds.showWindow(self.win) cmds.window(self.win, e=True, h=400)
def _UI(self): if cmds.window(self.win, exists=True): cmds.deleteUI(self.win, window=True) cmds.window(self.win, title=self.win, menuBar=True, sizeable=False, widthHeight=(300,380)) cmds.menu(label='Help') cmds.menuItem(label='Watch MasterClass Video', c=lambda x:self._contactDetails(opentype='vimeo')) cmds.menuItem(label='Contact', c=r9Setup.red9ContactInfo) #cmds.menuItem(label='Contact', c=lambda x:self._contactDetails(opentype='email')) cmds.menuItem(label='Blog', c=r9Setup.red9_blog) cmds.menuItem(label='Red9HomePage', c=r9Setup.red9_website_home) cmds.columnLayout(adjustableColumn=True) cmds.text(fn="boldLabelFont", label="Advanced Bind Options") cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2, cw=((1,150),(2,150)),cs=((1,10))) cmds.checkBox(value=self.settings.bind_rots, label="bind_rots", ann="Bind only the Rotates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('bind_rots', True), \ ofc=lambda x:self.settings.__setattr__('bind_rots', False)) cmds.checkBox(value=self.settings.bind_trans, label="bind_trans", ann="Bind only the Translates of the given Controller", al="left", \ onc=lambda x:self.settings.__setattr__('bind_trans', True), \ ofc=lambda x:self.settings.__setattr__('bind_trans', False)) cmds.checkBox(value=1, label="AlignRots CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('align_to_control_rots', True), \ ofc=lambda x:self.settings.__setattr__('align_to_source_rots', True)) cmds.checkBox(value=1, label="AlignTrans CtrSpace", ann="Force the BindLocator to the position of the Controller", al="left", \ onc=lambda x:self.settings.__setattr__('align_to_control_trans', True), \ ofc=lambda x:self.settings.__setattr__('align_to_source_trans', True)) cmds.checkBox(value=self.settings.reset_rots, label="Reset Rots Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('reset_rots', True), \ ofc=lambda x:self.settings.__setattr__('reset_rots', False)) cmds.checkBox(value=self.settings.reset_trans, label="Reset Trans Offsets", ann="Reset any Offset during bind, snapping the systems together", al="left", \ onc=lambda x:self.settings.__setattr__('reset_trans', True), \ ofc=lambda x:self.settings.__setattr__('reset_trans', False)) cmds.setParent('..') cmds.separator(h=10, style="none") cmds.button(label="BasicBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeBase(cmds.ls(sl=True,l=True)[0], cmds.ls(sl=True,l=True)[1], settings=self.settings).add_binder_node()) cmds.button(label="ComplexBind", al="center",\ ann="Select the Joint on the driving Skeleton then the Controller to be driven", \ c=lambda x:BindNodeTwin(cmds.ls(sl=True,l=True)[0], cmds.ls(sl=True,l=True)[1], settings=self.settings).add_binder_node()) cmds.button(label="AimerBind", al="center",\ ann="Select the Joint on the driving Skeleton to AIM at, then the Controller to be driven, finally a node on the driven skeleton to use as UpVector", \ c=lambda x:BindNodeAim(cmds.ls(sl=True,l=True)[0], cmds.ls(sl=True,l=True)[1], cmds.ls(sl=True,l=True)[2], settings=self.settings).add_binder_node()) cmds.separator(h=15, style="none") cmds.rowColumnLayout(numberOfColumns=2,columnWidth=[(1,147),(2,147)]) cmds.button(label="Add BakeMarker", al="center", \ ann="Add the BoundCtrl / Bake Marker to the selected nodes", \ c=lambda x:add_bind_markers(cmds.ls(sl=True,l=True))) cmds.button(label="remove BakeMarker", al="center", \ ann="Remove the BoundCtrl / Bake Marker from the selected nodes", \ c=lambda x:removeBindMarker(cmds.ls(sl=True,l=True))) cmds.button(label="Select BindNodes", al="center", \ ann="Select Top Group Node of the Source Binder", \ c=lambda x:pm.select(get_bind_nodes(cmds.ls(sl=True,l=True)))) cmds.button(label="Select BoundControls", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:pm.select(get_bound_controls(cmds.ls(sl=True,l=True)))) cmds.setParent('..') cmds.rowColumnLayout(numberOfColumns=2,columnWidth=[(1,200),(2,74)], columnSpacing=[(2,5)]) cmds.button(label="Bake Binder", al="center", \ ann="Select Top Group Node of the Bound Rig", \ c=lambda x:bake_binder_data(cmds.ls(sl=True,l=True), self.settings.bake_debug)) cmds.checkBox(value=self.settings.bake_debug, label="Debug View", ann="Keep viewport active to observe the baking process", al="left", \ onc=lambda x:self.settings.__setattr__('bake_debug', True), \ ofc=lambda x:self.settings.__setattr__('bake_debug', False)) cmds.setParent('..') cmds.separator(h=10, style="none") cmds.button(label="Link Skeleton Hierarchies - Direct Connect", al="center", \ ann="Select Root joints of the source and destination skeletons to be connected - connect via attrs", \ c=lambda x:bind_skeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1], method='connect')) cmds.button(label="Link Skeleton Hierarchies - Constraints", al="center", \ ann="Select Root joints of the source and destination skeletons to be connected - connect via parentConstraints", \ c=lambda x:bind_skeletons(cmds.ls(sl=True)[0], cmds.ls(sl=True)[1], method='constrain')) cmds.separator(h=10, style="none") cmds.button(label="MakeStabilizer", al="center", \ ann="Select the nodes you want to extract the motion data from", \ c=lambda x:make_stabilized_node()) cmds.separator(h=20, style="none") cmds.iconTextButton(style='iconOnly', bgc=(0.7,0,0), image1='Rocket9_buttonStrap2.bmp', c=lambda *args:(r9Setup.red9ContactInfo()),h=22,w=200) cmds.showWindow(self.win) cmds.window(self.win,e=True,h=400)