def __init__(self): win = cmds.window(t='Scene Information', s=False, w=200, h=300) cmds.renameUI(win, 'mncToolsLaySceneInfoViewer') cmas = cmds.columnLayout(adj=True) f1 = cmds.frameLayout(l='Sequence Credential', w=200) fc1 = cmds.columnLayout(adj=True, p=f1) cmds.rowColumnLayout(nc=2, columnWidth=[(1, 80), (2, 120)], p=fc1) cmds.text(l='Series: ') cmds.text(l=PRJSRSvar, fn="boldLabelFont") cmds.text(l='Episode: ') cmds.text(l=PRJEPSvar, fn="boldLabelFont") cmds.text(l='Sequence: ') cmds.text(l=PRJSEQvar, fn="boldLabelFont") f2 = cmds.frameLayout(l='Shot Listing', w=200, p=cmas) cmds.rowColumnLayout(nc=2, columnWidth=[(1, 80), (2, 120)], p=f2) cmds.text(l='Shot', fn='boldLabelFont') cmds.text(l='Duration', fn='boldLabelFont') fc2 = cmds.scrollLayout(horizontalScrollBarThickness=10, p=f2, h=200) cmds.rowColumnLayout(nc=2, columnWidth=[(1, 80), (2, 100)], p=fc2) cmds.columnLayout(adj=True, p=fc2) cmds.separator() cmds.rowColumnLayout(nc=2, columnWidth=[(1, 80), (2, 100)], p=fc2) cmds.separator() cmds.separator() cnt = 0 LENSHOTLISvar = len(SHOTNAMElis) while cnt < LENSHOTLISvar: cmds.text(l=SHOTNAMElis[cnt]) cmds.text(l=SHOTDURATIONlis[cnt]) cmds.separator() cmds.separator() cnt += 1 cmds.showWindow() return
def __init__(self): if cmds.window('mncShotSetup', exists=True): cmds.deleteUI('mncShotSetup', wnd=True) win = cmds.window(t='Shot Setup - [' + PRJ_NAME + ']', s=False, mb=False) cmds.renameUI(win, 'mncShotSetup') cmas = cmds.columnLayout(adj=True) f1 = cmds.frameLayout(l='ECF File', p=cmas) cmds.rowColumnLayout(nc=2) cmds.textScrollList('ecfList', w=220, h=150, sc=self.populateContent) f2 = cmds.frameLayout(l='Episode Content', p=cmas) cmds.columnLayout(adj=True) cmds.textScrollList('shotContent', w=220, h=300) cmds.showWindow() f4 = cmds.frameLayout(l='Command', p=cmas) cmds.rowColumnLayout(nc=3) cmds.button(l='SETUP SHOT', c=lambda *args: self.setupShot(new=True), bgc=[1.0, 0.643835616566, 0.0]) cmds.button(l='UPDATE SHOT', c=lambda *args: self.setupShot(new=False)) cmds.button(l='CLEAR SHOT', c=self.deleteShot) self.populateECF() return
def __init__(self): if cmds.window('subdivManager', exists=True):cmds.deleteUI('subdivManager', wnd=True) win = cmds.window(t='Subdiv Approx Mgr', s=False, w=200) cmds.renameUI(win, 'subdivManager') cmds.columnLayout('cmas', adj=True) cmds.textScrollList('samListTextScroll', w=200, h=250) cmds.separator(p='cmas') cmds.button(l='REFRESH', bgc=[1.0,0.643835616566,0.0], p='cmas', c=self.populateSubdv) cmds.showWindow() #popper cmds.popupMenu(p='samListTextScroll') cmds.menuItem(l='New Subdiv Approx', c=self.addNewSubDiv) cmds.menuItem(l='Delete Subdiv Approx', c=self.deleteSubDv) cmds.menuItem(d=True) cmds.menuItem(l='Add Selected Object', c=self.assignToSubdiv) cmds.menuItem(l='Remove Selected Object', c=self.removeFromSubdiv) cmds.menuItem(d=True) cmds.menuItem(l='Select Assigned Object', c=self.selectSubdiv) cmds.menuItem(d=True) cmds.menuItem(l='Select Subdiv Node', c=self.editSubdiv) cmds.menuItem(d=True) cmds.menuItem(l='Rename Subdiv Node', c=self.rename) self.populateSubdv() return
def __init__(self): global RESTtxtscr, TEXTvar win = cmds.window(t='Node Search', s=False) cmds.renameUI(win, 'MNCA_nodesearch') cmas = cmds.columnLayout(adj=True) f1 = cmds.frameLayout(l='Search Keyword', p=cmas, w=250) cmds.columnLayout(adj=True) TEXTvar = cmds.textField(cc=self.SEARCHfn) f2 = cmds.frameLayout(l='Search Result', p=cmas) cmds.columnLayout(adj=True) RESTtxtscr = cmds.textScrollList(h=200, ams=True, dcc=self.SELECTfn) cmds.showWindow() return
def __init__(self): global ALIGROTtchkbx if cmds.window('mncToolsAnimNullGenerator', exists=True): cmds.deleteUI('mncToolsAnimNullGenerator', wnd=True) win = cmds.window(t='Null Generator', s=False, w=200) cmds.renameUI(win, 'mncToolsAnimNullGenerator') cmas = cmds.columnLayout(adj=True) ALIGROTtchkbx = cmds.checkBox(l='Align Rotation', v=True, w=160) cmds.separator() cmds.button(l='ATTACH NULL', c=self.NULLGENfn, h=20, bgc=[1.0, 0.643835616566, 0.0]) cmds.showWindow() return
def __init__(self): if cmds.window('veShotBuilder', exists=True): cmds.deleteUI('veShotBuilder', wnd=True) win = cmds.window(t='Shot Builder - [' + PRJ_NAME + ']', s=False) cmds.renameUI(win, 'veShotBuilder') cmas = cmds.rowColumnLayout(nc=2) left = cmds.columnLayout(adj=True, p=cmas) f1 = cmds.frameLayout(l='Asset Open', p=left) cmds.columnLayout(adj=True) cmds.optionMenu('assetType', w=150, cc=self.populate) cmds.menuItem(l='') for chk in ASSET_TYPES: cmds.menuItem(l=chk['tag']) cmds.text(l='Search Asset :', fn='boldLabelFont', al='left') cmds.textField('assetSearch', cc=self.populate) f2 = cmds.frameLayout(l='Asset Content', p=left) cmds.columnLayout(adj=True) cmds.textScrollList('assetContent', w=150, h=150, sc=self.populateInformation) right = cmds.columnLayout(adj=True, p=cmas) f3 = cmds.frameLayout(l='Asset Information', p=right) pf3 = cmds.columnLayout(adj=True) f3split = cmds.rowColumnLayout(nc=2, p=pf3) cmds.columnLayout(adj=True, p=f3split) cmds.picture('preview', image=SCRIPT_ROOT + '/NA.png', w=150, h=150) cmds.columnLayout(adj=True, p=f3split) cmds.text(l='Asset Name :', fn='boldLabelFont', al='left') cmds.textField('assetName', en=False) cmds.text(l='Asset Description :', fn='boldLabelFont', al='left') cmds.scrollField('assetDesc', h=70, en=False, ww=True) cmds.text(l='Asset Path :', fn='boldLabelFont', al='left') cmds.textField('assetPath', en=False) cmds.separator(p=pf3) cmds.button(l='REFERENCE ASSET TO CURRENT SCENE FILE', p=pf3, h=70, bgc=[1.0, 0.730158729907, 0.0], \ c=self.referenceAsset) cmds.showWindow() return
def __init__(self): global CAMSEARCHvar,CAMtxtscr win = cmds.window(t='MNCA Frame Killer',s=False) cmds.renameUI(win, 'MNCAFramekiller') cmas=cmds.columnLayout(adj=True) f1=cmds.frameLayout(l='Camera Listing',w=200) CAMtxtscr=cmds.textScrollList() CAMSEARCHvar= cmds.ls('shotMaster',dag=True) cmds.textScrollList(CAMtxtscr,e=True,ra=True) for chk in CAMSEARCHvar: if chk.find('cam_master')>=0: cmds.textScrollList(CAMtxtscr,e=True,a=chk) cmds.columnLayout(adj=True,p=cmas) cmds.separator() cmds.button(l='KILL FRAME COUNT',bgc=[1.0,0.643835616566,0.0],c=self.KILLCAMCOUNTfn) cmds.button(l='ACTIVATE FRAME COUNT',bgc=[0.0,1.0,0.0],c=self.ACTIVATEFRAMECOUNTfn) cmds.button(l='REFRESH',c=self.REFRESHfn) cmds.showWindow() return
def __init__(self): global SCRIPTlis, PROJECTtxt if cmds.window('synopticLauncher',exists=True): cmds.deleteUI('synopticLauncher',wnd=True) win = cmds.window(t='Synoptic Launcher',s=False,w=200) cmds.renameUI(win, 'synopticLauncher') cmas=cmds.columnLayout(adj=True,w=200) f2=cmds.frameLayout(l='Synoptic',p=cmas) SCRIPTlis=cmds.textScrollList(w=200,h=300,dcc=self.RUNSYNfn) cmds.popupMenu(p=SCRIPTlis) cmds.menuItem(l='Run Synoptic',c=self.RUNSYNfn) cmds.menuItem(l='Delete Synoptic',c=self.DELETEfn) cmds.menuItem(divider=True) cmds.menuItem(l='Refresh',c=self.REFRESHfn) cmds.showWindow() self.REFRESHfn() return
def __init__(self): if cmds.window('layCamGen', exists=True): cmds.deleteUI('layCamGen', window=True) win = cmds.window(t='Camera Generator', s=False, w=200) cmds.renameUI(win, 'layCamGen') cmas = cmds.columnLayout(adj=True) f0 = cmds.frameLayout(l='Primary Camera Creator', w=200, p=cmas) cmds.button(l='CREATE', bgc=[1.0, 0.643835616566, 0.0], h=30, c=self.generateCamera) f3 = cmds.frameLayout(l='Primary Camera Synoptic', w=200, p=cmas) cmds.columnLayout(adj=True) cmds.button(l='SELECT POS', c=lambda *args: self.selectNode(1)) cmds.button(l='SELECT TILT', c=lambda *args: self.selectNode(2)) cmds.button(l='SELECT SETTING', c=lambda *args: self.selectNode(3)) cmds.button(l='DELETE', bgc=[1, 0, 0], c=self.deleteCamera) cmds.showWindow() return
def renameTab(self, *args): if cmds.layout(self.tab, q=True, ca=True): layoutPath = self.getCurrentTab() current = layoutPath.split('|')[-1] if layoutPath: name = self.nameInput(layout=layoutPath, title='Rename Tab') if name: layoutName = '%s_%s' % (name, self.colSuffix) cmds.renameUI(layoutPath, layoutName) cmds.tabLayout( self.tab, e=True, tli=[cmds.tabLayout(self.tab, q=True, sti=True), name]) self.autoSave()
def __init__(self): global SCRIPTlis, PROJECTtxt if cmds.window('synopticLauncherLocal', exists=True): cmds.deleteUI('synopticLauncherLocal', wnd=True) win = cmds.window(t='Local Synoptic Launcher', s=False, w=150) cmds.renameUI(win, 'synopticLauncherLocal') cmas = cmds.columnLayout(adj=True, w=150) SCRIPTlis = cmds.textScrollList(w=150, h=200, dcc=self.RUNSYNfn) cmds.popupMenu(p=SCRIPTlis) cmds.menuItem(l='Run Synoptic', c=self.RUNSYNfn) cmds.menuItem(l='Delete Synoptic', c=self.DELETEfn) cmds.menuItem(divider=True) cmds.menuItem(l='Refresh', c=self.REFRESHfn) cmds.separator() cmds.showWindow() self.REFRESHfn() return
def __init__(self): global SCRIPTlis, PROJECTtxt if cmds.window('synopticLauncher', exists=True): cmds.deleteUI('synopticLauncher', wnd=True) win = cmds.window(t='Synoptic Launcher', s=False, w=200) cmds.renameUI(win, 'synopticLauncher') cmas = cmds.columnLayout(adj=True, w=200) f1 = cmds.frameLayout(l='Project', p=cmas) PROJECTtxt = cmds.text(fn='boldLabelFont', h=20) f2 = cmds.frameLayout(l='Synoptic', p=cmas) SCRIPTlis = cmds.textScrollList(w=200, h=300, dcc=self.RUNSYNfn) cmds.popupMenu(p=SCRIPTlis) cmds.menuItem(l='Run Synoptic', c=self.RUNSYNfn) cmds.menuItem(l='Delete Synoptic', c=self.DELETEfn) cmds.menuItem(divider=True) cmds.menuItem(l='Refresh', c=self.REFRESHfn) cmds.showWindow() self.REFRESHfn() return
def __init__(self): if cmds.window('mncAnimEyeTools', exists=True): cmds.deleteUI('mncAnimEyeTools', wnd=True) win = cmds.window(t='Eye Tools', s=False, w=200) cmds.renameUI(win, 'mncAnimEyeTools') cmas = cmds.columnLayout(adj=True) suffixFrame = cmds.frameLayout(l='Suffixes') anc = cmds.columnLayout(adj=True, p=suffixFrame) cmds.rowColumnLayout(nc=2, cw=[(1, 100), (2, 100)]) cmds.text(l='R. Eye Up Suffix:', fn='boldLabelFont', bgc=[1, 1, 0]) cmds.text(l='L. Eye Up Suffix:', fn='boldLabelFont', bgc=[0, 1, 1]) cmds.text('rightEyeUpSuffix', l='') cmds.text('leftEyeUpSuffix', l='') cmds.text(l='R. Eye Lo Suffix:', fn='boldLabelFont', bgc=[1, 1, 0]) cmds.text(l='L. Eye Lo Suffix:', fn='boldLabelFont', bgc=[0, 1, 1]) cmds.text('rightEyeLoSuffix', l='') cmds.text('leftEyeLoSuffix', l='') cmds.separator() cmds.separator() cmds.button(l='SET R.EYE UP', c=lambda *args: self.setSuffix(rightEyeUp=True)) cmds.button(l='SET L.EYE UP', c=lambda *args: self.setSuffix(leftEyeUp=True)) cmds.button(l='SET R.EYE LO', c=lambda *args: self.setSuffix(rightEyeLo=True)) cmds.button(l='SET L.EYE LO', c=lambda *args: self.setSuffix(leftEyeLo=True)) cmds.separator(p=anc) cmds.text(l='Eye Dir Suffix:', fn='boldLabelFont', p=anc, bgc=[0, 1, 0]) cmds.text('eyeDirControl', l='', p=anc) cmds.button(l='SET RIGHT DIRECTION EYE CONTROLLER', c=lambda *args: self.setSuffix(rDirEye=True), p=anc) cmds.button(l='SET LEFT DIRECTION EYE CONTROLLER', c=lambda *args: self.setSuffix(lDirEye=True), p=anc) namespaceFrame = cmds.frameLayout(l='Namespace', p=cmas) cmds.columnLayout(adj=True) cmds.text('namespaceText', l='n/a') cmds.separator() cmds.button(l='SET NAMESPACE', c=self.setNamespace) TABS = cmds.tabLayout(innerMarginWidth=5, innerMarginHeight=5, p=cmas) child1 = cmds.columnLayout(adj=True, w=200) f1 = cmds.frameLayout(l='BLINK LIBRARY') fc1 = cmds.columnLayout(adj=True) cmds.textScrollList('blinkLib', p=fc1, h=225) for chk in os.listdir(serverCache): if chk.endswith('.blf') == True: cmds.textScrollList('blinkLib', e=True, a=chk[:-4]) cmds.popupMenu(p='blinkLib') cmds.menuItem(l='Export/Update Blink', c=self.EXPORTBLINKfn) cmds.menuItem(l='Rename Blink', c=self.RENAMEBLINKfn) cmds.menuItem(l='Delete Blink', c=self.DELETEBLINKfn) f11 = cmds.frameLayout(l='SINGLE BLINK') cmds.button(l='APPLY SINGLE BLINK', h=40, bgc=[1.0, 0.643835616566, 0.0], c=self.EYEBLINKfn) cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') cmds.setParent('..') child2 = cmds.columnLayout() cf1 = cmds.frameLayout(l='DARTS SETTINGS') cfc2 = cmds.columnLayout(adj=True, w=200) cmds.text(l='Dart Movement Range:', fn='boldLabelFont') cmds.separator() cmds.textField( 'dartMoveTextField', tx='0.1', cc=lambda *args: self.TEXTDEFAULT1fn( cmds.textField('dartMoveTextField', q=True, tx=True))) cmds.text(l='', h=3) cmds.text(l='Between Dart Max Range (Auto):', fn='boldLabelFont') cmds.separator() cmds.textField( 'dartMaxRanTextField', tx='5', cc=lambda *args: self.TEXTDEFAULT2fn( cmds.textField('dartMaxRanTextField', q=True, tx=True))) cmds.text(l='', h=3) cmds.text(l='Maximum Dart Range (Auto):', fn='boldLabelFont') cmds.separator() cmds.textField( 'dartLimitRangeTextField', tx='1', cc=lambda *args: self.TEXTDEFAULT2fn( cmds.textField('dartLimitRangeTextField', q=True, tx=True))) cmds.text(l='', h=3) cf2 = cmds.frameLayout(l='GENERATE SINGLE DART', p=child2) cmds.columnLayout(adj=True) cmds.button(l='GENERATE SINGLE DART', w=200, bgc=[1.0, 0.643835616566, 0.0], h=40, c=self.SINGLEDARTfn) cf3 = cmds.frameLayout(l='AUTODART', p=child2) cfc3 = cmds.columnLayout(adj=True, w=200) cmds.text(l='Range:', fn='boldLabelFont') cmds.separator() cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1, 98), (2, 2), (3, 98)], p=cfc3) cmds.textField('startDartRange', pht='n/a', tx='0.0', cc=lambda *args: self.TEXTDEFAULT4fn( cmds.textField('startDartRange', q=True, tx=True))) cmds.popupMenu(p='startDartRange') cmds.menuItem(l='Set Current Time as Start Range', c=lambda *args: self.SETRANGEfn('startDartRange')) cmds.text(l='') cmds.textField('endDartRange', pht='n/a', tx='0.0', cc=lambda *args: self.TEXTDEFAULT5fn( cmds.textField('endDartRange', q=True, tx=True))) cmds.popupMenu(p='endDartRange') cmds.menuItem(l='Set Current Time as End Range', c=lambda *args: self.SETRANGEfn('endDartRange')) cmds.text(l='', h=3, p=cfc3) cmds.separator(p=cfc3) cmds.button(l='RUN AUTODART', p=cfc3, h=40, bgc=[1.0, 0.643835616566, 0.0], c=self.AUTODARTfn) cmds.setParent('..') cmds.tabLayout(TABS, edit=True, tabLabel=((child1, 'EYE BLINK'), (child2, 'EYE DART'))) cmds.showWindow() #populate tree = ET.parse(SCRIPT_ROOT + '/xml/eyeConfig.xml') root = tree.getroot() cmds.text('rightEyeUpSuffix', e=True, l=str(root[0].text)) cmds.text('leftEyeUpSuffix', e=True, l=str(root[1].text)) cmds.text('rightEyeLoSuffix', e=True, l=str(root[2].text)) cmds.text('leftEyeLoSuffix', e=True, l=str(root[3].text)) cmds.text('eyeDirControl', e=True, l=str(root[4].text) + '-' + str(root[5].text)) return
def shelfRename(*args): dp = Depend() if cmds.control(dp.shelf, q=1, ex=1): cmds.renameUI(dp.shelf, dp.old)
def editPickerCommand(self, typ, *args): layoutPath = self.getCurrentTab() layoutList = cmds.layout(layoutPath, q=True, ca=True) tabPar = cmds.layout( '%s_%s' % (str(cmds.optionMenuGrp(self.promptTab, q=True, v=True)), self.colSuffix), q=True, fpn=True) if typ == 'ok': # Rename inputName = cmds.textFieldGrp(self.promptName, q=True, tx=True) inputColor = cmds.colorIndexSliderGrp( self.promptColor, q=True, v=True) - 1 if inputName: if layoutList: for x in layoutList: if inputName == x.split('_')[0]: var = False # cmds.warning('CUP: Picker already exists.') else: var = True else: var = True if var: if inputName != cmds.button(self.editCtl, q=True, l=True): # Get Name buttonName = '%s_%s' % (inputName, self.ctlSuffix) # Rename Button cmds.button(self.editCtl, e=True, l=inputName) self.editCtl = cmds.renameUI(self.editCtl, buttonName) # Replace PopupMenu self.removeUI(self.editMenu) self.pickerPopupMenu(self.editCtl) # Edit Layout if tabPar != layoutPath: self.orderLayout(self.editCtl, origin=layoutPath, destination=tabPar) # Edit Color if inputColor != cmds.button(self.editCtl, q=True, bgc=True): cmds.button(self.editCtl, e=True, bgc=self.color[inputColor]) # Clean up self.removeUI(self.pWin, typ='window') self.autoSave() elif typ == 'cancel': self.removeUI(self.pWin, typ='window')