Пример #1
0
def UI():
	if cmds.window('FBXExport',ex=True):
		cmds.deleteUI('FBXExport',wnd=True)
	window = cmds.window('FBXExport',t='FBX Export Version 1.0.0',wh=(450,300),sizeable=False)

	mainLayout = cmds.columnLayout(w=450, h=300)
	cmds.menuBarLayout()
	# cmds.menu(label ='About Me',helpMenu=True)
	cmds.menu(label='File')
	cmds.menuItem(label='About Me',c=AboutMe)
	cmds.menuItem(label='Help',c=Help)
	cmds.separator(st='in')
	cmds.columnLayout(columnAlign='left', columnAttach=('both', 50), rowSpacing=30, columnWidth=420)
	cmds.text(l='')
	cmds.optionMenu(label ='ExportType:',changeCommand=printNewMenuItem)
	cmds.menuItem( label='Export Selection' )
	cmds.menuItem( label='Export All' )
	
	cmds.rowColumnLayout(numberOfColumns=2)
	cmds.textField("filepath",w=270,pht=configpath, bgc=(0.2,0.2,0.2))
	cmds.button(l='path',w =50,h=20,c=browseFilePath)
	cmds.setParent( '..' )

	cmds.rowColumnLayout(numberOfColumns=2)
	cmds.button(l='Name:',w =50,h=20,en=False)
	cmds.textField('FileName',pht='Enter a filename',ed =True,w=270,bgc=(0.2,0.2,0.2))
	cmds.setParent( '..' )
	cmds.button(l='Export',bgc=(0.3,0.7,0.7),c=ExportFBX)

	cmds.showWindow(window)
Пример #2
0
 def UI_custom(self): 
        
     cmds.rowLayout(nc=2, columnWidth=[1, 100], adj=2)
     cmds.text(label="Number Of Joints:")
     numJoints = len(self.jointInfo)
     self.numberOfJointsField = cmds.intField(value=numJoints, min=2, changeCommand=self.changeNumberOfJoints)
     
     cmds.setParent("..")
     
     joints = self.getJoints()
     
     self.createRotationOrderUIControl(joints[0])
     
     cmds.separator()
     
     cmds.text(label="Orientation:", align="left")
     cmds.rowLayout(nc=3)
     cmds.attrEnumOptionMenu(attribute=self.moduleNamespace+":module_grp.sao_local", label="Local:")
     cmds.text(label="will be oriented to")
     cmds.attrEnumOptionMenu(attribute=self.moduleNamespace+":module_grp.sao_world", label="World:")
     
     cmds.setParent("..")
     
     cmds.separator()
     
     interpolating = False
     if cmds.objExists(self.moduleNamespace+":interpolation_container"):
         interpolating = True
         
     cmds.rowLayout(nc=2, columnWidth=[1, 80], adj=2)
     cmds.text(label="Interpolate:")
     cmds.checkBox(label="", value=interpolating, onc=partial(self.setup_interpolation, True), ofc=self.delete_interpolation)
Пример #3
0
def setAttributeVectorUI():
    global tfXIn, tfXOut, tfYIn, tfYOut, tfZIn, tfZOut, tslVectorList, tfXAdd, tfYAdd, tfZAdd, vectorUI
    vectorUI = 'vectorUI'
    closeUI(vectorUI)
    cmds.window(vectorUI, title = 'vectorUI')
    cmds.columnLayout(columnAttach = ['both', 5], rowSpacing = 5, columnWidth = 210)
    cmds.text('..: random range :..', backgroundColor = [0.15, 0.15, 0.0])
    cmds.gridLayout(numberOfColumns = 6, cellWidthHeight = (33, 20))
    tfXIn = cmds.textField(text = '0.0', backgroundColor = [0.15, 0.1, 0.0])
    tfXOut = cmds.textField(text = '1.0', backgroundColor = [0.15, 0.1, 0.0])
    tfYIn = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.15, 0.1])
    tfYOut = cmds.textField(text = '1.0', backgroundColor = [0.0, 0.15, 0.1])
    tfZIn = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.1, 0.15])
    tfZOut = cmds.textField(text = '1.0', backgroundColor = [0.0, 0.1, 0.15])
    cmds.setParent('..')
    cmds.button('ok', command = 'setAttributeVectorRandom()')
    cmds.separator(style = 'out')
    cmds.text('..: vector list :..', backgroundColor = [0.0, 0.15, 0.15])
    tslVectorList = cmds.textScrollList(allowMultiSelection = True)
    cmds.button('remove', command = 'removeScrollListVector()')
    cmds.gridLayout(numberOfColumns = 4, cellWidthHeight = (50, 20))
    tfXAdd = cmds.textField(text = '0.0', backgroundColor = [0.15, 0.1, 0.0])
    tfYAdd = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.15, 0.1])
    tfZAdd = cmds.textField(text = '0.0', backgroundColor = [0.0, 0.1, 0.15])
    cmds.button('add..', command = 'addScrollListVector()')
    cmds.setParent('..')
    cmds.button('random', command = 'setAttributeListVectorRandom()')
    cmds.button('increment %', command = 'setAttributeListVectorInc()')
    cmds.setParent('..')
    cmds.showWindow()
Пример #4
0
    def _buildSettings(s, *args):
        """
        Load the settings page
        """
        s.page = "settings"

        s._clear()
        cmds.columnLayout(adj=True, p=s.wrapper)
        cmds.iconTextButton(
            h=30,
            ann="Click to return to your Todo list.",
            image="revealSelected.png",
            label="<- Todo",
            style="iconAndTextHorizontal",
            c=s._buildTodo)
        cmds.separator()
        cmds.text(label="Settings are unique to each Maya scene.", h=50)
        frame = cmds.frameLayout(l="Archive options:")
        # Settings module
        s.fireHook("settings.archive", settings=s._buildSettings, callback=lambda x: cmds.setParent(frame))
        cmds.setParent("..")
        cmds.frameLayout(l="Feedback:")
        cmds.iconTextButton(
            image="party.png",
            ann="Have any feedback? Good or bad. Love to hear it! :)",
            l="Leave Feedback...",
            style="iconAndTextHorizontal",
            c=lambda: universalOpen("mailto:[email protected]?subject=Todo Feedback"))  # TODO errors when no folder is chosen because of 0 index
Пример #5
0
    def __init__(self):
        winName = "Size set"
        global typeMenu
        winTitle = winName
        if cmds.window(winName, exists=True):
                cmds.deleteUI(winName)

#         self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=150, h=100 )
        window = cmds.window(winName, title=winTitle, tbm=1, w=250, h=100 )

        cmds.menuBarLayout(h=30)
        cmds.rowColumnLayout  (' selectArrayRow ', nr=1, w=250)

        cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
        
        cmds.rowLayout  (' rMainRow ', w=300, numberOfColumns=6, p='selectArrayRow')
        cmds.columnLayout ('selectArrayColumn', parent = 'rMainRow')
        cmds.setParent ('selectArrayColumn')
        cmds.separator(h=10, p='selectArrayColumn')
        cmds.gridLayout('listBuildButtonLayout', p='selectArrayColumn', numberOfColumns=2, cellWidthHeight=(100, 20))
        typeMenu=cmds.optionMenu( label='ctrl size')
        cmds.menuItem( label="Large" )
        cmds.menuItem( label="Med" )
        cmds.menuItem( label="Small" )           
        cmds.button (label='Change Selection', p='listBuildButtonLayout', command = lambda *args:self.controllerSize())
        cmds.showWindow(window)    
Пример #6
0
def transfertSelectionToTarget_window():
	"""
	This definition creates the 'Transfert Selection To Target' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("transfertSelectionToTarget_window", exists=True)):
		cmds.deleteUI("transfertSelectionToTarget_window")

	cmds.window("transfertSelectionToTarget_window",
		title="Transfert Selection To Target",
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
	cmds.text(label="Target:")
	sources_textField = cmds.textField("target_textField")
	cmds.button("pickTarget_button", label="Pick Target!", command=pickTarget_button_OnClicked)
	cmds.setParent(topLevel=True)

	cmds.separator(style="single")

	cmds.button("transfertSelection_button", label="Transfert Selection!", command=transfertSelection_button_OnClicked)

	setUnsetContextHotkeys()
	scriptJob = cmds.scriptJob(uiDeleted=("transfertSelectionToTarget_window", setUnsetContextHotkeys), runOnce=True)

	cmds.showWindow("transfertSelectionToTarget_window")

	cmds.windowPref(enableAll=True)
Пример #7
0
	def create(self):
		if cmds.window('uvShellAlignWindow', exists = True):
			cmds.deleteUI('uvShellAlignWindow')

		self.window = cmds.window(self.window, title = self.title, widthHeight = self.size)
		self.frameForm = cmds.frameLayout(label = " 1. 基準とする UVShell を選択して登録", bgc = (0.5, 0.3, 0.2), cll = False)
		self.setUVSBtn1 = cmds.button(label = "基準 UVShell を登録"  , command = self.registUVBndBox1, height = 30 )
		cmds.rowLayout( numberOfColumns = 1, adj = True)					

				




		cmds.setParent("..")			
		self.frameForm = cmds.frameLayout(label = " 2. 位置を揃えたい UVShell を選択して実行", bgc = (0.2, 0.3, 0.5), cll = False)
		self.distDcheckBox = cmds.radioButtonGrp('radioBtn', label = "", numberOfRadioButtons = 4 ,
							 sl = 1, cl4 = ['left','left','left','left'] , la4 = [ 'Left', 'Right', 'Bottom', 'Top'], adj = True)

		self.backupPathText = cmds.text("※ 2016/1/5 現在、複数UVを選択した状態での位置揃えには対応していません", font = "smallBoldLabelFont", align = 'left');
		self.setUVSBtn2 = cmds.button(label = "選択した UVShell を揃える" , command = self.registUVBndBox2, height = 30 )
		cmds.setParent("..")	
		
		cmds.separator(width = self.width, style = 'in')
		
		cmds.text("【問い合わせ先】 : TAセクション.村岡", bgc = (0.2, 0.2, 0.2), align = 'left', width = self.width);

		cmds.setParent("..")	
		cmds.showWindow()
Пример #8
0
 def enterTimecodeUI(self, buttonlabel='set', buttonfunc=None):
     '''
     generic UI to enter timecode
     
     :param buttonlabel' = label to add to the button
     :param buttonfunc' = function to bind to the button on exit
     '''
     self.win='Timecode_UI'
     if cmds.window(self.win, exists=True):
         cmds.deleteUI(self.win, window=True)
     cmds.window(self.win, title=self.win)
     cmds.columnLayout(adjustableColumn=True)
     cmds.text(label='Timecode Reference')
     cmds.separator(h=10, style='in')
     cmds.rowColumnLayout(nc=8)
     cmds.text(label='  smpte :  ')
     cmds.textField('tchrs', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tchrs'))
     cmds.text(label=' : ')
     cmds.textField('tcmins', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcmins'))
     cmds.text(label=' : ')
     cmds.textField('tcsecs', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcsecs'))
     cmds.text(label=' : ')
     cmds.textField('tcfrms', tx='00', w=40, cc=lambda x:self.__uicb_checkfield('tcfrms'))
     cmds.setParent('..')
     cmds.button(label=buttonlabel, command=lambda x:self.__uicb_gatherTimecode(buttonfunc))
     cmds.showWindow(self.win)
Пример #9
0
def separator( w=300, h=5 ):
    
    cmds.rowColumnLayout( nc=1, cw=( 1,w ) )
    setSpace( h )
    cmds.separator()
    setSpace( h )
    cmds.setParent( '..' )
Пример #10
0
def windowSHM(*args):
    
    if cmds.window("shdrmnWin", exists = 1):
        cmds.deleteUI("shdrmnWin")
    win = cmds.window("shdrmnWin", title = "Shader manager", w = 500, sizeable = 0)
    
    mainLayout = cmds.columnLayout (w = 500)
    
    cmds.rowColumnLayout(w = 500, nc = 4, parent = mainLayout )
    cmds.textFieldGrp( 'getAiAttrField', text = 'mColor')
    cmds.button(label = "GET TX", w= 83, h = 50, c = getTextureFromShader )
    cmds.button(label = "SHOW TX", w= 83, h = 50, c = assignPREVShader)
    cmds.button(label = "TILE UV", w= 83, h = 50, c = setTileUV)

    
    cmds.rowColumnLayout(w = 500, nc = 1, parent = mainLayout )
    cmds.button(label = "DELETE PREVIEW", w= 500, h = 50, c = deleteShaders, parent = mainLayout )
    cmds.separator(height=10, parent = mainLayout)
    
    cmds.rowColumnLayout(w = 500, nc = 2, parent = mainLayout )
    cmds.button(label = "GET MATERIALS", w= 250, h = 50, c =  getMaterial )
    cmds.button(label = "ASSIGN MATERIALS", w= 250, h = 50, c =  asignMaterial )
       
    
    cmds.showWindow(win)
Пример #11
0
def UI():
    if cmds.window("TressFXExporterUI", exists = True):
        cmds.deleteUI("TressFXExporterUI")

    windowTitle = 'TressFX Exporter' + ' ' + 'v' + tressfx_exporter_version
    window = cmds.window("TressFXExporterUI", title = windowTitle, w=280, h = 260, mnb=False, sizeable=False)
    mainLayout = cmds.columnLayout(w=280, h=260)

    cmds.separator(h=8, style='in')
    cmds.text(label='Number of vertices per strand (4, 8, 16, 32 or 64):', align='left')
    cmds.intField("numVerticesPerStrand", w=30, minValue=4, maxValue=64, value=16 )
    cmds.separator(h=8, style='in')
    cmds.checkBox("bothEndsImmovable", label='Both ends immovable')
    cmds.checkBox("InvertZ", label='Invert Z', value = True)
    cmds.checkBox("exportSkinCheckBox", label='Export skin data', value = False)
    cmds.checkBox("randomStrandCheckBox", label='Randomize strands for LOD', value = True)
    
    cmds.separator(h=15)
    
    cmds.button(label="Set the base mesh", w=170, h=30, command=SetBaseMesh)
    cmds.textField("MeshNameLabel", w=170, editable=False)
    
    cmds.separator(height=10, style='none')
    cmds.button(label="Export as binary (*.tfx)", w=170, h=30, command=ExportBinary)
    
    cmds.separator(h=15)
    
    version_text = 'v' + tressfx_exporter_version
    cmds.text(label=version_text, align='left')
    
    global selected_mesh_shape_name
    selected_mesh_shape_name = ''
    
    cmds.showWindow(window)
Пример #12
0
 def installConvertOption(self):
     """"""
     cmds.rowLayout(nc=2, adj=2)
     cmds.text(l=' Convert:', fn='boldLabelFont')
     self.keepCheck = cmds.iconTextCheckBox( st='textOnly', l='Keep original', v=True )
     cmds.setParent( '..' )
     cmds.separator( style='none' )
Пример #13
0
 def build(self):
     if mc.windowPref(self.win, exists=1):
         mc.windowPref(self.win, remove=1)
     if mc.window(self.win,exists=1):
         mc.deleteUI(self.win)
     mc.window( self.win, title=self.title, widthHeight=(500, 210) )
     cl1 = mc.columnLayout( columnAttach=('both', 2), rowSpacing=3, columnWidth=500, adjustableColumn = True)
     mc.radioCollection()
     self.mouth = mc.radioButton( l='user import', select=1, p=cl1 )
     self.autoR = mc.radioButton( l='auto import', p=cl1 )
     mc.separator()
     mc.frameLayout('selected')
     mc.rowLayout(numberOfColumns=3, columnWidth3=(80, 75, 150), adjustableColumn=2, columnAlign=(1, 'right'), columnAttach=[(1, 'both', 0), (2, 'both', 0), (3, 'both', 0)] )
     mc.text(l='Mode')
     mc.columnLayout()
     mc.radioCollection()
     self.prop = mc.radioButton( l='Prop', select=1 )
     self.character = mc.radioButton( l='Character' )
     mc.setParent( '..' )
     mc.setParent( '..' )
     self.numText = mc.floatFieldGrp( l='Num' )
     self.txtProp = mc.textFieldButtonGrp( label='File Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
     #mc.separator()
     #self.txtCharacter = mc.textFieldButtonGrp( label='Path', text='', buttonLabel='Browse', cw3 = (40,400,50), adjustableColumn3 = 2, cl3 = ('left', 'center', 'right'), bc = self.browse,cc=self.getPath )
     #mc.separator()
     mc.separator(p=cl1)
     mc.button( 'importR', l='Import   Reference   File', p=cl1 )
     mc.setParent( '..' )
Пример #14
0
def snapOnClosestVertex_window():
	"""
	Creates the 'Snap On Closest Vertex' vertex window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("snapOnClosestVertex_window", exists=True)):
		cmds.deleteUI("snapOnClosestVertex_window")

	cmds.window("snapOnClosestVertex_window",
		title="Snap On Closest Vertex",
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.rowLayout(numberOfColumns=3, columnWidth3=(125, 150, 130), adjustableColumn=2, columnAlign=(2, "left"), columnAttach=[(1, "both", spacing), (2, "both", spacing), (3, "both", spacing)])
	cmds.text(label="Reference Object:")
	referenceObject_textField = cmds.textField("referenceObject_textField")
	cmds.button("getReferenceObject_button", label="Get Reference Object!", command=getReferenceObject_button_OnClicked)
	cmds.setParent(topLevel=True)

	cmds.separator(style="single")

	cmds.button("snapIt_button", label="Snap It!", al="center", command=snapIt_button_OnClicked)

	cmds.showWindow("snapOnClosestVertex_window")
	cmds.windowPref(enableAll=True)
Пример #15
0
def setupRLUI():
    if cmds.window("RLWin", exists=True):
        cmds.deleteUI("RLWin")
    
    widgets["win"] = cmds.window("RLWin", t="zbw_setupRL", w=200, h=400)
    widgets["mainCL"] = cmds.columnLayout(w=200)
    widgets["mainFrame"] = cmds.frameLayout(l="Create Render Layers", w=200, cll=True, bgc=(.2,.2,.2))
    
    widgets["CarKey"] = cmds.checkBox(l="Car_Env", v=True)
    widgets["CarEnv"] = cmds.checkBox(l="Car_Key", v=True)
    widgets["BGKey"] = cmds.checkBox(l="BG_Env", v=True)
    widgets["BGEnv"] = cmds.checkBox(l="BG_Key", v=True)
    widgets["AO"] = cmds.checkBox(l="All_AO", v=True)
    widgets["MatteA"] = cmds.checkBox(l="All_MatteA", v=True)
    widgets["MatteB"] = cmds.checkBox(l="All_MatteB", v=True)
    widgets["MoVec"] = cmds.checkBox(l="All_MoVec", v=True)
    widgets["Shadow"] = cmds.checkBox(l="All_Shadow", v=True)
    
    widgets["createBut"] = cmds.button(l="Create Layers", w=200, h=40, bgc=(.6,.8,.6), c=createRL)
    cmds.text("NOTE: this is setting the overrides for \nthe moVec layer RG's and materials \n(if you have them in scene\n for the AO and Movec layers but \n NO passes are set up")
    cmds.separator(h=20, style = "double")
    #widgets["copyBut"] = cmds.button(l="Copy Selected Layer", w=200, h=40, bgc=(.8,.8,.6), c=copyRL)
    #cmds.separator(h=20, style = "double")
    widgets["importBut"] = cmds.button(l="Import RL Shaders File", w=200, h=40, bgc=(.8,.6,.6), c=importRL)
   
    cmds.showWindow(widgets["win"])
    cmds.window(widgets["win"], e=True, w=200, h=400)
Пример #16
0
 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))
Пример #17
0
def copyCrvShapeUI():

	if cmds.window('copyCrvShapeWin', exists=True):
		cmds.deleteUI('copyCrvShapeWin')
	
	cmds.window('copyCrvShapeWin', t='CopyCurve', rtf=True)

	cmds.columnLayout('mainCL', adj=True)

	cmds.text(l='Search for', align='center')

	cmds.textField('searchTF')

	cmds.textField('searchTF', e=True, tx='_L_')

	cmds.separator()

	cmds.text(align='center', l='Replace with')

	cmds.textField('replaceTF')

	cmds.textField('replaceTF', e=True, tx='_R_')

	cmds.separator()

	cmds.button('copyBTN', l='copy', c=partial(copyCrvShape))

	cmds.showWindow('copyCrvShapeWin')
	cmds.window('copyCrvShapeWin', e=True, w=220, h=98)
Пример #18
0
def alignComponents_window():
	"""
	Creates the 'Align Components' main window.
	"""

	cmds.windowPref(enableAll=False)

	if (cmds.window("alignComponents_window", exists=True)):
		cmds.deleteUI("alignComponents_window")

	cmds.window("alignComponents_window",
		title="Align Components",
		width=320)

	spacing = 5

	cmds.columnLayout(adjustableColumn=True, rowSpacing=spacing)

	cmds.button("selectAnchors_button", label="Select Anchors!", command=selectAnchors_button_OnClicked)

	cmds.separator(height=10, style="singleDash")

	cmds.button("alignSelection_button", label="Align Selection!", command=alignSelection_button_OnClicked)

	cmds.separator(height=10, style="singleDash")

	cmds.button("alignSelectionOnXAxis_button", label="Align Selection On X!", command=alignSelectionOnXAxis_button_OnClicked)
	cmds.button("alignSelectionOnYAxis_button", label="Align Selection On Y!", command=alignSelectionOnYAxis_button_OnClicked)
	cmds.button("alignSelectionOnZAxis_button", label="Align Selection On Z!", command=alignSelectionOnZAxis_button_OnClicked)

	cmds.showWindow("alignComponents_window")

	cmds.windowPref(enableAll=True)
Пример #19
0
 def displayInstructions(*pArgs):
     """Shows in an independent window a list of instructions for the user to set things up quickly"""
     if cmds.window( "instructions_window", exists=True ):
         cmds.deleteUI( "instructions_window" )
     instructions_window = cmds.window( "instructions_window", title="Instructions", s=False, mnb=False, mxb=False )
     instructionsLayout = cmds.frameLayout( l="Instructions", collapsable=False, cl=False, mw = 10, mh=10 )
     cmds.rowColumnLayout( nc=3, cw=[(1,20),(2,480),(3,20)], cal=[(2,"left")], parent=instructionsLayout )
     cmds.separator( st="none" )
     cmds.text( l="1. Write an axiom (or initial word), depth and rules. If you don't know what it is put the mouse over the parameter and read the help line.\n2. Click Generate String. Then you will see the result in the text field below, this is just mere text. Now the string needs to be interpreted.\n3. Set all the 'Geometric Interpretation' attributes (Angle, Segment Length...). Remember to put the mouse over it if your are confused.\n4. Click Create Geometry. You will see the result in your scene. If you want to clean the last plant\n\tclick Clean Plant. If you click Create Geometry again you will get another plant.\n6. Always remember to pay attention to the help line and warnings field." )
     cmds.separator( st="none" )
     cmds.separator( st="none" )
     cmds.text( l="\nThis is the meaning for each character you enter in the rules section:" )
     cmds.separator( st="none" )
     cmds.separator( st="none" )
     cmds.text( l="""        
     F    Move forward
     f    Move forward
     L    Leaf
     B    Blossom
     +    Rotate +X (yaw right)
     -    Rotate -X (yaw left)
     ^    Rotate +Y (roll right)
     &    Rotate -Y (roll left)
     <    Rotate +Z (pitch down)
     >    Rotate -Z (pitch up)
     *    Turtle rotates 180 (as it was facing backwards)
     [    Push current turtle state on the stack
     ]    Pop the current turtle state from the stack""" )
     cmds.showWindow( instructions_window )
Пример #20
0
def cleanAndExportUI():
	if cmds.objExists('sharedReferenceNode'):
		cmds.delete('sharedReferenceNode')
	ceWin = 'cleanExportUI2'
	if cmds.window(ceWin,exists=True):
		cmds.deleteUI(ceWin)
	cmds.window(ceWin,title='clean for export')
	cmds.columnLayout(adj=True,co=('both',10))
	cmds.text(align="left",l="List Of Reference Nodes")
	cmds.textScrollList('ceRefList', numberOfRows=8, allowMultiSelection=True )
	populateReferenceList()
	cmds.separator(height=10, style='double' )
	animRange = cmds.ls('AnimRanges')
	if len(animRange) > 0:
	    ranges = cmds.listAttr(animRange[0],ud=True)
	    if len(ranges) > 0:
	        cmds.textScrollList('txtScrRanges',numberOfRows=len(ranges),ams=False)
	        for item in ranges:
	            cmds.textScrollList('txtScrRanges',edit=True, append = item)
	        
	    
	
	cmds.separator(height=10, style='double' )

	cmds.button(label = 'AnimExport!',c=cleanAndExportAnim)
	cmds.button(label = 'MeshExport!',c=cleanAndExportMesh)

	cmds.showWindow(ceWin)
Пример #21
0
 def buildMainLayout(self):
     '''Build the main part of the ui
     '''
     
     tabs = mc.tabLayout()
     tab1 = mc.columnLayout(adj=True)
     
     mc.scrollLayout(cr=True)
     self.shelfLayout = mc.shelfLayout()
     
     self.refreshShelfLayout()
     
     mc.setParent(tabs)
     
     tab2 = mc.columnLayout(adj=True)
 
     mc.separator(height=8, style='none')
     mc.text('Select curve(s) to export. Multiple selected curves will be combined.')
     mc.text('Center and fit the curve in the viewport,')
     mc.text('and make sure nothing else is visible for best icon creation.')
     mc.separator(height=16, style='in')
     
     mc.button('Export Selected Curve', command=self.exportControl, annotation='Select a nurbsCurve to export.')
     
     mc.tabLayout( tabs, edit=True, tabLabel=((tab1, 'Import'), 
                                              (tab2, 'Export')
                                              ))
     
     if not mc.shelfLayout(self.shelfLayout, query=True, numberOfChildren=True):
         mc.tabLayout( tabs, edit=True, selectTab=tab2)
Пример #22
0
    def switch_module(self,dishName,dishFile,*args):
        archive = zipfile.ZipFile(dishFile, 'r')
        jsonFile = archive.read('dish.ini')
        jsondata = json.loads(jsonFile)  
        archive.close()

        #Clear chld
        chldrn = mc.layout( self.InfosTab, query=True, childArray=True )
        for chld in chldrn:
            mc.deleteUI(chld)
        #-------------------------------------------------------------------
        mc.columnLayout( adjustableColumn=True ,p=self.InfosTab ,rs=5)        
        header = """<html>
            <body>
            <h1>%s</h1></body>
            </html>
        """%(dishName )
        
        self.dishType  = dishName
        mc.text( self.module,e=True,l=header,font='boldLabelFont')        
        mc.scrollField( editable=False, wordWrap=True, text=jsondata['moduleInfos'] ,h=140)
        mc.separator()   
        mc.text( l='name bank') 
        mc.columnLayout( adjustableColumn=True)
        LimbMenu = mc.optionMenu( label='',w=224  )
        mc.menuItem( label='NONE')
        mc.setParent('..')
        mc.button(l='Open name composer',h=28)
        mc.optionMenu( LimbMenu ,e=True,changeCommand=partial(self.composePrfX,LimbMenu))

        self.dishPrfx       =  mc.textField()
        mc.button(l='Import', h=42,c=self.validate_dish_before_merge )        
Пример #23
0
 def buildMainLayout(self):
     '''Build the main part of the ui
     '''
     
     #tabs = mc.tabLayout()
     
     #tab1 = mc.columnLayout(adj=True)
     #self.swatch_selected = self.colorControlLayout()
     #mc.button(label='Color Selected', command=self.colorSelected)
     #mc.setParent('..')
 
     #tab2 = mc.columnLayout(adj=True)
     self.swatch_range1 = self.colorControlLayout(label='First Selected')
     self.swatch_range2 = self.colorControlLayout(label='Last Selected')
     mc.separator(horizontal=True, height=10)
     mc.button(label='Color Selected Nodes', command=self.colorSelectedRange)
     #mc.setParent('..')
 
     #tab3 = mc.columnLayout(adj=True)
     #self.positionWidgets = {}
     #for xyz in 'XYZ':
         #for m in ['Min','Max']:        
             #self.positionWidgets[m+xyz] = self.colorControlLayout(label='{} {}'.format(m,xyz))
             
     mc.setParent('..')
def audioUI():
    """UI for the whole thing"""

    if (cmds.window("audioWin", exists=True)):
        cmds.deleteUI("audioWin")

    widgets["win"] = cmds.window("audioWin", t="zbw_audioManager", w=300, h=260)

    widgets["mainCLO"] = cmds.columnLayout()
    widgets["getAudioBut"] = cmds.button(l="Get All Audio In Scene", w=300, h=30, bgc=(.6, .6, .8), c=getAudio)
    cmds.text("Double-click item in list to enable sound and select it", al="left")

    widgets["audioTSL"] = cmds.textScrollList(h=100, w=300, dcc=selectAudio)
    widgets["buttonRCLO"] = cmds.rowColumnLayout(nc=2)
    widgets["deleteSelBut"] = cmds.button(l="Delete Selected", w=150, h=20, bgc=(.8,.6,.6), c=deleteSelected)
    widgets["deleteAllBut"] = cmds.button(l="Delete All Audio", w=150, h=20, bgc=(.8,.4,.4), c=deleteAll)

    cmds.setParent(widgets["mainCLO"])

    cmds.separator(h=20)

    widgets["newAudioBut"] = cmds.button(l="Import New Audio File!", w=300, h=30, bgc=(.6,.8,.6), c=importAudio)
    cmds.separator(h=20)

    widgets["offsetRCLO"] = cmds.rowColumnLayout(nc=2, cw=([1,175], [2, 125]), cal=([1,"left"], [2,"left"]))
    widgets["offsetIFG"] = cmds.intFieldGrp(l="Offset Selected By ", v1=1, cal=([1,"left"], [2,"left"]), cw=([1,100],[2,50]))
    widgets["offsetBut"] = cmds.button(l="Offset!", w=100, h=30, bgc=(.6,.8,.8), c=offsetAudio)

    cmds.showWindow(widgets["win"])
    cmds.window(widgets["win"], e=True, w=300, h=260)
Пример #25
0
	def buildGUI(self):
	
		if cmds.window(self.name, q=True, exists=True):
			cmds.deleteUI(self.name)
		cmds.window(self.name, title=self.title, sizeable=False, mxb=False, mnb=False, toolbox=False, w=100, h=30)
		cmds.columnLayout("mainLayout", adj=True, parent=self.name, co=("left", 5))

		# Add onClose Event
		cmds.scriptJob(uiDeleted=(self.name, self.onClose))
		
		# Help Menu
		cmds.menuBarLayout("menuBar")
		cmds.menu(label="Show Help", helpMenu =True, pmc=self.showHelp)

		# Import paths
		cmds.textFieldButtonGrp("tfbDBPath", label="Links: ", bl="Set Link Path", cw=(1,50), parent="mainLayout", bc=self.setDBPath)
		cmds.textFieldButtonGrp("tfbShaderPath", label="Shaders: ", bl="Set Shader Path", cw=(1,50), parent="mainLayout", bc=self.setShaderPath)
		
		cmds.checkBox("cbSelection", label="Use Selection", parent="mainLayout")
		cmds.checkBox("cbSubstring", label="Substring prefix", parent="mainLayout", value=True)
		cmds.textField("tfSubstring", parent="mainLayout", text="s100_char")

		cmds.separator(h=10, style="none", parent="mainLayout")

		# Buttons
		cmds.rowColumnLayout("buttonsLayout", numberOfColumns=2, parent="mainLayout")
		cmds.button("bExportLinks", label = "Export Links", w=200, h=30, parent="buttonsLayout", c=self.exportLinks)
		cmds.button("bImportShader", label="Link Shaders", w=200, h=30, parent="buttonsLayout", c=self.linkShaders)

		cmds.showWindow(self.name)
	def remappingWindow(self,exsitingData,importedData):
		#if (cmds.window(MainSkinUI.RemapWindowID,ex=True)):
			#cmds.deleteUI(MainSkinUI.RemapWindowID, wnd=True)
		#cmds.window(MainSkinUI.RemapWindowID,w=500,h=340,title='Influence Remapping Dialog')
		formLayout=cmds.setParent(q=True)
		cmds.formLayout(formLayout,e=True,w=500,h=340)
		mainColumnLayout = cmds.columnLayout(w=500,h=340)
		cmds.columnLayout(h=5)
		cmds.setParent('..')
		cmds.columnLayout(cat=['left',25])
		cmds.text(l='The following influences hace no corresponding influence from the imported weight\n'\
					' data. You can remap the influences or skip them',al='left', w=450,h=40)
		cmds.setParent('..')
		cmds.separator(w=500, st='in')
		formLayout = cmds.formLayout()
		exsitingInfluences = cmds.columnLayout()
		cmds.frameLayout(l='Exsiting Influences:')
		self.exsitingInfluencesBox = cmds.textScrollList(w=230,h=230)
		cmds.setParent('..')
		cmds.setParent('..')
		importedInfluences = cmds.columnLayout()
		cmds.frameLayout(l='Imported Influences:')
		self.importedInfluencesLayout = cmds.columnLayout(w=230,h=230)
		cmds.columnLayout(h=5)
		cmds.setParent('..')
		#self.importedInfluencesLayout = cmds.columnLayout(cat=['left',40])
		cmds.formLayout(formLayout,e=True,af=[(exsitingInfluences,'left',10)],ac=[(importedInfluences,'left',10,exsitingInfluences)])
		cmds.setParent(mainColumnLayout)
		cmds.columnLayout(h=5)
		cmds.setParent('..')
		cmds.columnLayout(cat=['left',150])
		cmds.button(l='Import Remapped Skin Weight', w=200, c=self.passRemappingData)
		self.setInfluenceDialog(exsitingData,importedData)
Пример #27
0
    def expose_list(self,tabAnchor,rootData):
        samplingConnections     = rootData[0]
        caption                 = rootData[1]
        mc.textField(  tx=caption,ed=False ,p=tabAnchor , font="boldLabelFont",bgc=[0.8,0.8,0.8])
        mc.optionMenu( label=' Options: ' ,p=tabAnchor , w=432  -30)
        mc.menuItem( label='select' )
        mc.menuItem( label='connect' )
        mc.menuItem( label='swap' )
        mc.menuItem( label='constraint' )
        mc.menuItem( label='Manage Input' )
        scrollWdth = mc.scrollLayout(	horizontalScrollBarThickness=0,verticalScrollBarThickness=8, p=tabAnchor ,h=150,childResizable=True )

        inputIdxList = mc.getAttr(samplingConnections,mi=True )
        ctrlHgt = 24
        for idx  in inputIdxList:
            input = mc.listConnections(samplingConnections+'[%s]'%idx)
            
            if input is not None and len(input)>0:
                input = input[0]
            else:
                input = samplingConnections+'[%s]'%idx

            mc.separator(style='none', p=scrollWdth,h=6 )
            mc.flowLayout( columnSpacing=4  , p=scrollWdth )
            fldLnk = mc.textField(  tx=input,ed=False ,w=395 -30,h=ctrlHgt)
            mc.popupMenu( button=3 ,p=fldLnk)
            mc.menuItem(l='moveUP' )
            mc.menuItem(l='moveDown' )
            mc.menuItem(l='Delete' )
            mc.button( label='<')
Пример #28
0
 def exportAssets_UI(self, *args):
     self.UIElements = {}
     
     # If the window exists, delete it.
     if cmds.window("ExportAssets", exists=True):
         cmds.deleteUI("ExportAssets")
     
     # Create the main window
     self.UIElements["window"] = cmds.window("ExportAssets", widthHeight=(240, 200), s=True )
     
     # Create a flow layout to hold the UI Elements
     self.UIElements["radioFlowLayout"] = cmds.flowLayout(v=True, w=220) 
     cmds.setParent( '..' )  
     
     cmds.setParent(self.UIElements["radioFlowLayout"])
     
     cmds.radioCollection()
     self.UIElements['rigRadioButton'] = cmds.radioButton(l='Export Rig?')
     cmds.radioCollection()
     self.UIElements['setupRadioButton'] = cmds.radioButton(l='Export Setup?')
     
     cmds.separator( height=7, style='in' )
     cmds.text(l='  Rename the Setup?')
     
     self.UIElements['nameTxt'] = cmds.textField(w=220, tx=self.characterName)
     
     self.UIElements['exportButton'] = cmds.button(label='Export Game Assets', width=220, c=self.exportGameAssets)
     
     
     cmds.showWindow(self.UIElements["window"])
Пример #29
0
def createUI (pWindowTitle, pApplyCallback):
    
    windowID = 'MyWindowID'
    
    if cmds.window(windowID, exists=True):
        cmds.deleteUI(windowID)
        
    cmds.window(windowID, title=pWindowTitle, sizeable=False, resizeToFitChildren=True)
    cmds.rowColumnLayout(numberOfColumns=3, columnWidth=[(1,75),(2,60),(3,60)], columnOffset=[(1,'right',3)])

    cmds.text(label='Time Range:') 
    startTimeField = cmds.intField()
    endTimeField = cmds.intField()
    
    cmds.text(label='Attribute:')
    targetAttributeField = cmds.textField()
    
    cmds.separator(h=10, style='none')
    
    cmds.separator(h=10, style='none')
    cmds.separator(h=10, style='none')
    cmds.separator(h=10, style='none')
    
    cmds.separator(h=10, style='none')
    
    cmds.button(label='Apply', command=pApplyCallback)    
    
    def cancelCallback(*pArgs):
        if cmds.window(windowID, exists=True):
            cmds.deleteUI(windowID)
    
    cmds.button(label='Cancel', command=cancelCallback)    
        
    cmds.showWindow()
Пример #30
0
def showCorrectiveBlendshapeWindow():
	"""
	Shows the GUI for the corrective blendshape creator.
	"""
	global bsWin, bsLayout,btnCreateCorrectiveBS, btnConnectCorrectiveBS,btnRestart,lblMsgBS
	if(window(bsWin, q=True, exists=True)):
		deleteUI(bsWin, window=True)
	window(bsWin,width = 270, title="Corrective BS Creator")
	columnLayout(bsLayout, adjustableColumn = True,p=bsWin,co=("both",10), rs=10)
	separator(p=bsLayout, vis=True)
	button(btnCreateCorrectiveBS,p=bsLayout, l="1. Create Corrective Blendshape",h=50,command=createCopy)
	separator(p=bsLayout)
	button(btnConnectCorrectiveBS,p=bsLayout, l="2. Connect Blendshape to Master", h=50,command=connectoToMaster)
	separator(p=bsLayout)
	separator(p=bsLayout, vis=False)
	button(btnRestart, p=bsLayout, l="Restart", h=50, command=restart)
	separator(p=bsLayout)
	text(lblMsgBS,p=bsLayout,l="Select the master, blendshape1 and blendshape2 to create the corrective BS.",ww=True )
	separator(p=bsLayout, vis=True)
	showWindow()
Пример #31
0
def build_gui_simple_ik_leg():
    window_name = "build_gui_simple_ik_leg"
    if cmds.window(window_name, exists =True):
        cmds.deleteUI(window_name)    

    # Main GUI Start Here =================================================================================

    build_gui_simple_ik_leg = cmds.window(window_name, title=script_name + "  (v" + script_version + ')',\
                          titleBar=True, mnb=False, mxb=False, sizeable =True)
                          
    cmds.window(window_name, e=True, s=True, wh=[1,1])

    content_main = cmds.columnLayout(adj = True)

    # Title Text
    title_bgc_color = (.4, .4, .4)
    cmds.separator(h=10, style='none') # Empty Space
    cmds.rowColumnLayout(nc=1, cw=[(1, 270)], cs=[(1, 10)], p=content_main) # Window Size Adjustment
    cmds.rowColumnLayout(nc=3, cw=[(1, 10), (2, 200), (3, 50)], cs=[(1, 10), (2, 0), (3, 0)], p=content_main) # Title Column
    cmds.text(" ", bgc=title_bgc_color) # Tiny Empty Green Space
    cmds.text(script_name, bgc=title_bgc_color,  fn="boldLabelFont", align="left")
    cmds.button( l ="Help", bgc=title_bgc_color, c=lambda x:build_help_gui_ik_leg_generator())
    cmds.separator(h=10, style='none', p=content_main) # Empty Space

    # Body ====================
    body_column = cmds.rowColumnLayout(nc=1, cw=[(1, 260)], cs=[(1,10)], p=content_main)
    
    cmds.rowColumnLayout(nc=2, cw=[(1, 130),(2, 130)], cs=[(1,0),(2, 0)], p=body_column)
    cmds.text("Joint Tag (Suffix)")
    cmds.text("Ctrl Group Tag (Suffix)")
    jnt_tag_text_field = cmds.textField(text=settings.get("jnt_tag"), \
                                           enterCommand=lambda x:update_settings(), textChangedCommand=lambda x:update_settings())
    ctrl_grp_text_field = cmds.textField(text=settings.get("ctrl_grp_tag"), \
                                           enterCommand=lambda x:update_settings(), textChangedCommand=lambda x:update_settings())
    
    
    cmds.separator(h=15, p=body_column)
    
    # CheckboxGrp One
    interactive_container_misc = cmds.rowColumnLayout(p=body_column, numberOfRows=1, h= 25)

    check_box_grp_one = cmds.checkBoxGrp(p=interactive_container_misc, columnWidth2=[140, 1], numberOfCheckBoxes=2, \
                                label1 = 'Custom PVector Ctrl', label2 = "Custom IK Ctrl", v1 = settings.get("def_use_pvector"), v2 = settings.get("def_use_ik_ctrl"), \
                                on2=lambda x:is_custom_ik_ctrl_enabled(True),  of2=lambda x:is_custom_ik_ctrl_enabled(False), \
                                on1 =lambda x:is_custom_pvector_enabled(True), of1=lambda x:is_custom_pvector_enabled(False) ) 
    # CheckboxGrp Two
    interactive_container_misc = cmds.rowColumnLayout(p=body_column, numberOfRows=1, h= 25)

    check_box_grp_two = cmds.checkBoxGrp(p=interactive_container_misc, columnWidth2=[140, 1], numberOfCheckBoxes=2, \
                                label1 = 'Colorize Controls ', label2 = "Custom IK Switch", v1 = settings.get("def_colorize_ctrl"), v2 = settings.get("def_use_ik_switch"), \
                                on2=lambda x:is_custom_ik_switch_enabled(True),  of2=lambda x:is_custom_ik_switch_enabled(False) ) 
    cmds.separator(h=10, p=body_column)
    
    #pVector Ctrl Loader
    pvector_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    pvector_btn = cmds.button(p=pvector_container, l ="Load PVector Ctrl", c=lambda x:update_load_btn_ctrls("pVector"), w=130)
    pvector_status = cmds.button(p=pvector_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130, \
                            c="cmds.headsUpMessage( 'Select your pole vector control and click on \"Load PVector Ctrl Joint\"', verticalOffset=150 , time=5.0)")
    
    #Custom IK Ctrl Loader
    ik_ctrl_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    ik_ctrl_btn = cmds.button(p=ik_ctrl_container, l ="Load IK Ctrl", c=lambda x:update_load_btn_ctrls("ikCtrl"), w=130)
    ik_ctrl_status = cmds.button(p=ik_ctrl_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130, \
                            c="cmds.headsUpMessage( 'Select your IK Switch control and click on \"Load IK Switch Ctrl Joint\"', verticalOffset=150 , time=5.0)")
    
    #IK Switch Ctrl Loader
    ik_switch_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    ik_switch_btn = cmds.button(p=ik_switch_container, l ="Load IK Switch Ctrl", c=lambda x:update_load_btn_ctrls("ikSwitch"), w=130)
    ik_switch_status = cmds.button(p=ik_switch_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130,  \
                            c="cmds.headsUpMessage( 'Select your Custom IK Control and click on \"Load IK Ctrl Joint\"', verticalOffset=150 , time=5.0)")
                            
    
    cmds.separator(h=15, p=body_column)
    # CheckboxGrp Three
    interactive_container_jnt = cmds.rowColumnLayout(p=body_column, numberOfRows=1, h= 25)
    cmds.text("    ") # Increase this to move checkboxes to the right
    check_box_grp_three = cmds.checkBoxGrp(p=interactive_container_jnt, columnWidth2=[130, 1], numberOfCheckBoxes=2, \
                                label1 = 'Make Stretchy Legs ', label2 = "Use Ball Joint", v1 = settings.get("make_stretchy"), v2 = settings.get("def_use_ball_jnt"), \
                                on2=lambda x:is_ball_enabled(True),  of2=lambda x:is_ball_enabled(False)\
                               ,on1=lambda x:update_settings(),  of1=lambda x:update_settings())
                            
    cmds.separator(h=10, p=body_column)
    #Hip Joint Loader
    hip_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    cmds.button(p=hip_container, l ="Load Hip Joint", c=lambda x:update_load_btn_jnt("hip"), w=130)
    hip_status = cmds.button(p=hip_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130, \
                            c="cmds.headsUpMessage( 'Select your hip joint and click on \"Load Hip Joint\"', verticalOffset=150 , time=5.0)")
                            
    #Ankle Joint Loader
    ankle_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    cmds.button(p=ankle_container, l ="Load Ankle Joint", c=lambda x:update_load_btn_jnt("ankle"), w=130)
    ankle_status = cmds.button(p=ankle_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130, \
                            c="cmds.headsUpMessage( 'Select your ankle joint and click on \"Load Ankle Joint\"', verticalOffset=150 , time=5.0)")
                            
    #Ball Joint Loader
    ball_container = cmds.rowColumnLayout( p=body_column, numberOfRows=1)
    ball_load_btn = cmds.button(p=ball_container, l ="Load Ball Joint", c=lambda x:update_load_btn_jnt("ball"), w=130)
    ball_status = cmds.button(p=ball_container, l ="Not loaded yet", bgc=(.2, .2, .2), w=130, \
                            c="cmds.headsUpMessage( 'Select your ball joint and click on \"Load Ball Joint\"', verticalOffset=150 , time=5.0)")
      
    cmds.separator(h=10, p=body_column)
    cmds.separator(h=10, style="none", p=body_column)
    cmds.button(p=body_column, l ="Generate",bgc=(.6, .6, .6), c=lambda x:check_before_running(cmds.checkBoxGrp(check_box_grp_three, q=True, value2=True)))
    cmds.separator(h=10, style="none", p=body_column)
    
    def update_settings():
        settings["make_stretchy"] = cmds.checkBoxGrp(check_box_grp_three, q=True, value1=True)
        
        jnt_tag = parse_text_field(cmds.textField(jnt_tag_text_field,q=True,text=True))
        if jnt_tag != [] and len(jnt_tag) > 0:
            settings["jnt_tag"] = jnt_tag[0]
        
        ctrl_grp_tag = parse_text_field(cmds.textField(ctrl_grp_text_field,q=True,text=True))
        if ctrl_grp_tag != [] and len(ctrl_grp_tag) > 0:
            settings["ctrl_grp_tag"] = ctrl_grp_tag[0]

        
    def is_ball_enabled(state):
        if state:
            cmds.button(ball_load_btn, e=True, en=True)
            cmds.button(ball_status, l ="Not loaded yet", e=True, en=True, bgc=(.2, .2, .2))
            stored_joints["ball_jnt"] = ''
        else:
            cmds.button(ball_load_btn, e=True, en=False)
            cmds.button(ball_status, l ="Not necessary", e=True, en=False, bgc=(.25, .25, .25))
            
    def is_custom_ik_ctrl_enabled(state):
        if state:
            cmds.button(ik_ctrl_btn, e=True, en=True)
            cmds.button(ik_ctrl_status, l ="Not loaded yet", e=True, en=True, bgc=(.2, .2, .2))
            settings["custom_ik_ctrl_name"] = ''
            settings["using_custom_ik_ctrl"] = True
        else:
            cmds.button(ik_ctrl_btn, e=True, en=False)
            cmds.button(ik_ctrl_status, l ="Not necessary", e=True, en=False, bgc=(.25, .25, .25))
            settings["using_custom_ik_ctrl"] = False
            
    def is_custom_ik_switch_enabled(state):
        if state:
            cmds.button(ik_switch_btn, e=True, en=True)
            cmds.button(ik_switch_status, l ="Not loaded yet", e=True, en=True, bgc=(.2, .2, .2))
            settings["custom_ikfk_switch_name"] = ''
            settings["using_custom_ikfk_switch"] = True
        else:
            cmds.button(ik_switch_btn, e=True, en=False)
            cmds.button(ik_switch_status, l ="Not necessary", e=True, en=False, bgc=(.25, .25, .25))
            settings["using_custom_ikfk_switch"] = False
            
    def is_custom_pvector_enabled(state):
        if state:
            cmds.button(pvector_btn, e=True, en=True)
            cmds.button(pvector_status, l ="Not loaded yet", e=True, en=True, bgc=(.2, .2, .2))
            settings["custom_pvector_ctrl"] = ''
            settings["using_custom_pvector_ctrl"] = True
        else:
            cmds.button(pvector_btn, e=True, en=False)
            cmds.button(pvector_status, l ="Not necessary", e=True, en=False, bgc=(.25, .25, .25))
            settings["using_custom_pvector_ctrl"] = False
    
    # Curves Loader @@@@@@@@@@@@
    def update_load_btn_ctrls(button_name):
        
        # Check If Selection is Valid
        received_valid_ctrl = False
        selected_ctrls = cmds.ls(selection=True,tr=1, type='nurbsCurve')
        
        if len(selected_ctrls) == 0:
            cmds.warning("First element in your selection wasn't a control (nurbsCurve)")
        elif len(selected_ctrls) > 1:
            cmds.warning("You selected more than one curve! Please select only one")
        elif cmds.objectType(cmds.listRelatives(selected_ctrls[0], children=True)[0]) == "nurbsCurve":
            received_ctrl = selected_ctrls[0]
            received_valid_ctrl = True
        else:
            cmds.warning("Something went wrong, make sure you selected just one curve")
        
        # If pVector
        if button_name is "pVector" and received_valid_ctrl == True:
            settings["custom_pvector_ctrl"] = received_ctrl
            cmds.button(pvector_status, l=received_ctrl,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(settings.get("custom_pvector_ctrl")))
        elif button_name is "pVector":
            cmds.button(pvector_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one curve and try again', verticalOffset=150 , time=5.0)")
        # If ikCtrl
        if button_name is "ikCtrl" and received_valid_ctrl == True:
            settings["custom_ik_ctrl_name"] = received_ctrl
            cmds.button(ik_ctrl_status, l=received_ctrl,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(settings.get("custom_ik_ctrl_name")))
        elif button_name is "ikCtrl":
            cmds.button(ik_ctrl_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one curve and try again', verticalOffset=150 , time=5.0)")
        # If ikSwitch
        if button_name is "ikSwitch" and received_valid_ctrl == True:
            settings["custom_ikfk_switch_name"] = received_ctrl
            cmds.button(ik_switch_status, l=received_ctrl,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(settings.get("custom_ikfk_switch_name")))
        elif button_name is "ikSwitch":
            cmds.button(ik_switch_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one curve and try again', verticalOffset=150 , time=5.0)")

    # Joints Loader @@@@@@@@@@@@
    def update_load_btn_jnt(button_name):
        
        # Check If Selection is Valid
        received_valid_jnt = False
        selected_joints = cmds.ls(selection=True, type='joint')
        if len(selected_joints) == 0:
            cmds.warning("First element in your selection wasn't a joint")
        elif len(selected_joints) > 1:
            cmds.warning("You selected more than one joint! Please select only one")
        elif cmds.objectType(selected_joints[0]) == "joint":
            joint = selected_joints[0]
            received_valid_jnt = True
        else:
            cmds.warning("Something went wrong, make sure you selected just one joint")
            
        # If Hip
        if button_name is "hip" and received_valid_jnt == True:
            stored_joints["hip_jnt"] = joint
            cmds.button(hip_status, l =joint,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(stored_joints.get("hip_jnt")))
        elif button_name is "hip":
            cmds.button(hip_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one joint and try again', verticalOffset=150 , time=5.0)")
        
        # If Ankle
        if button_name is "ankle" and received_valid_jnt == True:
            stored_joints["ankle_jnt"] = joint
            cmds.button(ankle_status, l =joint,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(stored_joints.get("ankle_jnt")))
        elif button_name is "ankle":
            cmds.button(ankle_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one joint and try again', verticalOffset=150 , time=5.0)")
        
        # If Ball
        if button_name is "ball" and received_valid_jnt == True:
            stored_joints["ball_jnt"] = joint
            cmds.button(ball_status, l =joint,e=True, bgc=(.6, .8, .6), w=130, c=lambda x:if_exists_select(stored_joints.get("ball_jnt")))
        elif button_name is "ball":
            cmds.button(ball_status, l ="Failed to Load",e=True, bgc=(1, .4, .4), w=130,c="cmds.headsUpMessage( 'Make sure you select only one joint and try again', verticalOffset=150 , time=5.0)")


    # Show and Lock Window
    cmds.showWindow(build_gui_simple_ik_leg)
    cmds.window(window_name, e=True, s=False)
    
    # Set Window Icon
    qw = omui.MQtUtil.findWindow(window_name)
    widget = wrapInstance(long(qw), QWidget)
    icon = QIcon(':/kinHandle.png')
    widget.setWindowIcon(icon)
    
    
    # Update Everything
    is_ball_enabled(settings.get("def_use_ball_jnt"))
    is_custom_ik_ctrl_enabled(settings.get("def_use_ik_ctrl"))
    is_custom_ik_switch_enabled(settings.get("def_use_ik_switch"))
    is_custom_pvector_enabled(settings.get("def_use_pvector"))
Пример #32
0
def mainWin():
    global num, drv, stt, end, cb1, cb2, cb3, cb4, rc1, rb1, rb2, rc2, rb3, rb4
    if mc.window('GMR', ex=True) == True:
        mc.deleteUI('GMR', window=True)

    win = mc.window('GMR', t='GMrigGimmick', widthHeight=(300, 765))
    mc.window('GMR', e=True, widthHeight=(300, 765))

    #skinJoint-----------------------------------------------------------------------------------
    mc.columnLayout(adj=True)
    mc.frameLayout(l='duplicateSkinJoint', cll=True)
    mc.button(l='skinJoint', w=300, h=30, c=give_duplicate_skinJnt)
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    #Bend Twist----------------------------------------------------------------------------------
    mc.frameLayout(l='Create Gimmick Joint', cll=True)
    mc.rowLayout(nc=2)
    mc.button(l='Bend->Twist', w=150, h=30, c=give_BendTwist_createJoint)
    mc.button(l='Twist->Bend', w=150, h=30, c=give_TwistBend_createJoint)
    mc.setParent('..')
    mc.button(l='Connect Gimmick Node', w=300, h=30, c=gimmick)
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    #CreateWeighted--------------------------------------------------------------------------------
    mc.frameLayout(l='createWeighted', cll=True)
    mc.frameLayout(l='weighted')
    mc.rowLayout(nc=2, cat=[(1, 'left', 0), (2, 'left', 5)])
    mc.text(' Create many weighted : ')
    num = mc.intField('num', w=145)
    mc.setParent('..')
    mc.rowLayout(nc=3, cat=[(1, 'left', 0), (2, 'left', 5)])
    mc.text(' set drover :')
    drv = mc.textField('drv', w=170)
    mc.button(l='set', w=45, h=20, c=set_drv)
    mc.setParent('..')
    mc.setParent('..')

    mc.frameLayout(l='Range to create weighted')
    mc.rowLayout(nc=3, cat=[(1, 'left', 35), (2, 'left', 5)])
    mc.text('start :')
    stt = mc.textField('stt', w=170)
    mc.button(l='set', w=45, h=20, c=stt_set)
    mc.setParent('..')
    mc.rowLayout(nc=3, cat=[(1, 'left', 42), (2, 'left', 5)])
    mc.text('end :')
    end = mc.textField('end', w=170)
    mc.button(l='set', w=45, h=20, c=end_set)
    mc.setParent('..')
    mc.setParent('..')

    mc.rowLayout(nc=2, w=300)
    mc.button(l='weighted', w=150, h=30, c=give_weighted)
    mc.button(l='mirror', w=150, h=30, c=give_CreateWeighted)
    mc.setParent('..')
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    #AngleDriver-----------------------------------------------------------------------------------
    mc.frameLayout(l='setAngleDriver', cll=True)
    mc.button(l='setAngleDriver', c=give_AngleDriver)
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    #createExpand----------------------------------------------------------------------------------
    mc.frameLayout(l='createExpand', cll=True)
    mc.rowLayout(nc=4,
                 cat=[(1, 'left', 17), (2, 'left', 35), (3, 'left', 35),
                      (4, 'left', 35)])
    cb1 = mc.checkBox('cb1', l='+Y')
    cb2 = mc.checkBox('cb2', l='-Y')
    cb3 = mc.checkBox('cb3', l='+Z')
    cb4 = mc.checkBox('cb4', l='-Z')
    mc.setParent('..')
    mc.button(l='createExpand', c=give_Expand)
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    #CreateSpacer----------------------------------------------------------------------------------
    mc.frameLayout(l='CreateSpacer', cll=True)
    mc.frameLayout(l='Type Select')
    mc.rowLayout(nc=2, cat=[(1, 'left', 50), (2, 'left', 65)])
    rc1 = mc.radioCollection()
    rb1 = mc.radioButton('selb', l='select', select=True)
    rb2 = mc.radioButton('hieb', l='hierachy')
    mc.setParent('..')
    mc.setParent('..')

    mc.frameLayout(label='Node Select')
    mc.rowLayout(nc=2, cat=[(1, 'left', 50), (2, 'left', 40)])
    rc2 = mc.radioCollection()
    rb3 = mc.radioButton('trsb', l='Transform', select=True)
    rb4 = mc.radioButton('jntb', l='joint')
    mc.setParent('..')
    mc.setParent('..')

    mc.button(l='create', c=give_Spacer)
    mc.setParent('..')
    #----------------------------------------------------------------------------------------------
    mc.separator(h=10)
    mc.frameLayout(l='reload module')
    mc.button(l='reload', c=develop)

    mc.showWindow(win)
Пример #33
0
    def ui(cls):
        cmds.window(cls.winName, title='Cache Correct Tool', menuBar=True)

        cls.widgets['createMenu'] = cmds.menu(label='Create',
                                              tearOff=True,
                                              p=cls.winName)
        cls.widgets['addBsMenuItem'] = cmds.menuItem(
            label='Add Blend Shape Node', c=Functions.addBsNode)

        cls.widgets['editMenu'] = cmds.menu(label='Edit',
                                            tearOff=True,
                                            p=cls.winName)
        cls.widgets['selBsMenuItem'] = cmds.menuItem(
            label='Select Blend Shape Node', c=Functions.selBsNode)

        cls.widgets['helpMenu'] = cmds.menu(label='Help',
                                            tearOff=True,
                                            p=cls.winName)

        cls.widgets['mainColLo'] = cmds.columnLayout(adj=True)

        cmds.separator(h=5, p=cls.widgets['mainColLo'])

        cls.widgets['cacheGeoRowColLo'] = cmds.rowColumnLayout(
            numberOfColumns=3)
        cmds.text(label='Cache Geometry: ', p=cls.widgets['cacheGeoRowColLo'])
        cls.widgets['cacheGeoTxtFld'] = cmds.textField(
            p=cls.widgets['cacheGeoRowColLo'])
        cmds.button(label='<<',
                    p=cls.widgets['cacheGeoRowColLo'],
                    c=Functions.loadGeoBS)

        cls.widgets['bsNodeRowColLo'] = cmds.rowColumnLayout(
            numberOfColumns=2, p=cls.widgets['mainColLo'])
        cmds.text(label='Blend Shape Node: ', p=cls.widgets['bsNodeRowColLo'])
        cls.widgets['bsNodeOptMenu'] = cmds.optionMenu(
            cc=Functions.populateCorrectiveTrgList,
            p=cls.widgets['bsNodeRowColLo'])

        cmds.separator(h=10, style='in', p=cls.widgets['mainColLo'])

        cls.widgets['correctiveTrgNameRowColLo'] = cmds.rowColumnLayout(
            numberOfColumns=4,
            columnSpacing=[(3, 30)],
            p=cls.widgets['mainColLo'])
        cmds.text(label='New Corrective: ',
                  p=cls.widgets['correctiveTrgNameRowColLo'])
        cls.widgets['correctiveTrgNameTxtFld'] = cmds.textField(
            p=cls.widgets['correctiveTrgNameRowColLo'])

        cls.widgets['scltBtnRowColLo'] = cmds.rowColumnLayout(
            numberOfColumns=2,
            columnWidth=[(1, 205), (2, 205)],
            columnSpacing=[(2, 5)],
            p=cls.widgets['mainColLo'])
        cls.widgets['sculptBtn'] = cmds.button(
            label='Sculpt',
            p=cls.widgets['scltBtnRowColLo'],
            c=Functions.sculptMode)
        cls.widgets['cancelBtn'] = cmds.button(
            label='Cancel',
            p=cls.widgets['scltBtnRowColLo'],
            c=Functions.cancelSculpt,
            enable=False)
        cls.widgets['createBtn'] = cmds.button(
            label='Create',
            h=40,
            p=cls.widgets['mainColLo'],
            c=Functions.createCorrectiveTarget,
            enable=False)

        cmds.separator(h=5, style='none', p=cls.widgets['mainColLo'])

        cls.widgets['correctiveTrgFrmLo'] = cmds.frameLayout(
            label='Corrective List',
            collapsable=True,
            p=cls.widgets['mainColLo'])
        cls.widgets['correctiveTrgColLo'] = cmds.columnLayout(
            adj=True, p=cls.widgets['correctiveTrgFrmLo'])
        cls.widgets['correctiveTrgTxtScrList'] = cmds.textScrollList(
            allowMultiSelection=True, p=cls.widgets['correctiveTrgColLo'])
        cmds.popupMenu()
        cmds.menuItem(label='Refresh List',
                      c=Functions.populateCorrectiveTrgList)
        cls.widgets['popMenuRename'] = cmds.menuItem(label='Rename',
                                                     c=Functions.rename)
        cls.widgets['popMenuBreak'] = cmds.menuItem(label='Delete Key',
                                                    c=Functions.delKey)
        cls.widgets['popMenuRmv'] = cmds.menuItem(label='Remove',
                                                  c=Functions.removeTrg)
        cls.widgets['slderRowColLo'] = cmds.rowColumnLayout(
            numberOfColumns=2,
            columnWidth=[(1, 370)],
            p=cls.widgets['correctiveTrgColLo'])
        cls.widgets['trgFltSldrGrp'] = cmds.floatSliderGrp(
            field=True,
            columnWidth=[(1, 30)],
            min=0.00,
            max=1.00,
            step=0.01,
            dc=Functions.trgSldrDragCmd,
            cc=Functions.trgSldrDragCmd,
            enable=True,
            p=cls.widgets['slderRowColLo'])
        cmds.symbolButton(image='setKeyframe.png',
                          c=Functions.setKey,
                          p=cls.widgets['slderRowColLo'])

        cmds.window(cls.winName, e=True, w=400, h=300)
        cmds.showWindow(cls.winName)
Пример #34
0
def build_gui_sphere_type():
    ''' Builds the UI for GT Sphere Types '''
    if cmds.window("build_gui_sphere_type", exists=True):
        cmds.deleteUI("build_gui_sphere_type")

    # main dialog Start Here =================================================================================

    build_gui_sphere_type = cmds.window("build_gui_sphere_type", title='Sphere Types - (v' + script_version + ')',\
                          titleBar=True,minimizeButton=False,maximizeButton=False, sizeable =True)
    cmds.window(build_gui_sphere_type, e=True, s=True, wh=[1, 1])

    content_main = cmds.columnLayout(adj=True)

    # Generate Header Image
    icons_folder_dir = cmds.internalVar(userBitmapsDir=True)
    header_img = icons_folder_dir + 'gt_m1_sphere_types.png'

    if os.path.isdir(icons_folder_dir) and os.path.exists(header_img) == False:
        image_enconded = 'iVBORw0KGgoAAAANSUhEUgAAAMgAAAA/CAYAAAClz4c/AAAACXBIWXMAAFxGAABcRgEUlENBAAAF8WlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDggNzkuMTY0MDM2LCAyMDE5LzA4LzEzLTAxOjA2OjU3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG90b3Nob3AvMS4wLyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjEuMCAoV2luZG93cykiIHhtcDpDcmVhdGVEYXRlPSIyMDIwLTExLTA0VDE2OjEzOjMyLTA4OjAwIiB4bXA6TWV0YWRhdGFEYXRlPSIyMDIwLTExLTA0VDE2OjEzOjMyLTA4OjAwIiB4bXA6TW9kaWZ5RGF0ZT0iMjAyMC0xMS0wNFQxNjoxM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OxWL2WCwWAS5YEY1GQ/sn/0UUZFVWZVXekSsjvKzKqvz/TFYVZFVWZQVZVZBVWZUVZFVBVmVVVpBVBVmVVVlBVhVkVVZlBfn/ALnuvEINoqIHAAAAAElFTkSuQmCC'
        #image_64_decode = base64.decodestring(image_enconded)
        image_64_decode = base64.b64decode(image_enconded)
        image_result = open(header_img, 'wb')
        image_result.write(image_64_decode)
        image_result.close()

    cmds.rowColumnLayout(numberOfColumns=1,
                         columnWidth=[(1, 200), (2, 100), (3, 10)],
                         cs=[(1, 10), (2, 5), (3, 5)])

    cmds.image(image=header_img)

    cmds.text("Sphere Options:")
    cmds.separator(h=5, p=content_main, st="none")
    cmds.rowColumnLayout(p=content_main,
                         numberOfColumns=3,
                         columnWidth=[(1, 100), (2, 100), (3, 10)],
                         cs=[(1, 10), (2, 5), (3, 5)])
    cmds.separator(h=3, p=content_main, st="none")
    cmds.button(l="Standard Sphere",
                c=lambda x: create_standard_sphere(),
                w=100)
    cmds.button(l="Platonic Sphere A", c=lambda x: create_platonic_sphere_a())
    #cmds.separator(h=10, st="none" )
    cmds.rowColumnLayout(p=content_main,
                         numberOfColumns=2,
                         columnWidth=[(1, 100), (2, 100), (3, 10)],
                         cs=[(1, 10), (2, 5), (3, 5)])
    cmds.button(l="Cube Sphere", c=lambda x: create_cube_sphere(), w=100)
    cmds.button(l="Platonic Sphere B", c=lambda x: create_platonic_sphere_b())
    cmds.separator(h=10, st="none")

    # Show and Lock Window
    cmds.showWindow(build_gui_sphere_type)
    cmds.window(build_gui_sphere_type, e=True, s=False)

    # Set Window Icon
    qw = omui.MQtUtil.findWindow(build_gui_sphere_type)
    if python_version == 3:
        widget = wrapInstance(int(qw), QWidget)
    else:
        widget = wrapInstance(long(qw), QWidget)
    icon = QIcon(':/lambert.svg')

    widget.setWindowIcon(icon)
Пример #35
0
def createUI(pWindowTitle):

    windowID = 'myWindowID'

    if mc.window(windowID, exists=True):
        mc.deleteUI(windowID)

    mc.window(windowID,
              title=pWindowTitle,
              sizeable=True,
              resizeToFitChildren=True,
              width=200)

    # OPENING ANS SAVING WINDOWS
    def pOpenFileCallback(*pArgs):
        fileOutput = pm.fileDialog2(fileMode=1)  #fileOutput[0]
        myFile = "X:/Documents/SchoolWork/LMU/Fall2016/PipelineCS/FinalTools/history.txt"
        #string $filePath = myFile;
        #$fileId = "`mm.fopen $filePath "r"`";

    def pSaveFileCallback(*pArgs):
        pm.fileDialog2(fileMode=0)

    def pPastaCallback(*pArgs):
        mm.eval("sphere -radius 3;")

    mc.menuBarLayout('Meun')
    mc.menu('File')
    mc.menuItem('Open', command=pOpenFileCallback)
    mc.menuItem('Save As...', command=pSaveFileCallback)
    mc.menuItem('CloseMM')
    mc.menu('Edit')
    mc.menuItem('Copy')
    mc.menuItem('Pasta', command=pPastaCallback)

    mc.rowColumnLayout(numberOfColumns=1,
                       columnWidth=(1, 400),
                       columnOffset=(1, 'left', 3))

    # MENUBAR LAYOUT
    def pRecordCallback(*pArgs):
        print 'Record button pressed.'
        fileHistDir = "X:/Documents/SchoolWork/LMU/Fall2016/PipelineCS/FinalTools/history.txt"
        userHist = mc.scriptEditorInfo(historyFilename=fileHistDir,
                                       writeHistory=True)

    def pExecuteCallback(*pArgs):
        mc.scriptEditorInfo(writeHistory=False)
        print 'Execute button pressed.'

    def pClearCallback(*pArgs):
        print 'Clear button pressed.'
        outputField(clear=True)

    mc.separator(h=10, style="none")

    mc.rowLayout(numberOfColumns=3)
    mc.button(label='Record',
              width=195,
              backgroundColor=(50, 0, 0),
              command=pRecordCallback)
    mc.button(label='Execute',
              width=195,
              backgroundColor=(0, 50, 0),
              command=pExecuteCallback)
    mc.setParent("..")

    mc.separator(h=10, style="none")

    mc.text(label='SELECTED STEPS')

    output = 'test test test'

    def pUpdateOutputField(*pArgs):
        #outputField = mc.cmdScrollFieldExecuter(width= 395, height=400, showLineNumbers=True, sw=True, text= output)
        outputField = mc.cmdScrollFieldReporter(width=395,
                                                height=400,
                                                echoAllCommands=True)

    pUpdateOutputField()

    mc.separator(h=10, style="none")

    #mc.button(label= 'Execute', width=395, backgroundColor=(0, 50, 0), command=pExecuteCallback)
    mc.button(label='Clear', width=395, command=pClearCallback)

    #mc.textScrollList(append=[''])
    mc.scriptEditorInfo(input="")

    mc.separator(h=10, style='none')

    mc.showWindow()
Пример #36
0
    def setup(self):
        width, height, spacer = 500, 241, 2

        cmds.columnLayout('Rig Export', adj=True, p='sme_tabMain')

        cmds.separator(h=1, st='none')

        cmds.rowColumnLayout(nc=4,
                             cs=[(1, spacer), (2, spacer), (3, spacer),
                                 (4, spacer)],
                             cw=[(1, 90), (2, 235), (3, 20), (4, 120)])

        cmds.text('sme_rigFilename_label',
                  al='right',
                  l='Rig Filename',
                  ann='Name of Rig Data to be written to disk.')
        cmds.textField('sme_rigFilename',
                       aie=1,
                       cc=lambda *args: self.check(),
                       ec=lambda *args: self.check(),
                       tx=someGlobals.rig['filename'],
                       ann='Name of Rig Data to be written to disk.')
        cmds.text('sme_rigFilenameExt', al='left', l='.fbx')
        cmds.text('sme_rigDataExists_label', al='left', l=' - Data Exists!')

        cmds.setParent('..')

        cmds.separator(h=2, st='none')
        cmds.separator(h=2, st='in')
        cmds.separator(h=2, st='none')

        cmds.rowColumnLayout(nc=2,
                             cs=[(1, spacer), (2, spacer)],
                             cw=[(1, 50), (2, width - 114)])

        cmds.text(
            'sme_rigName_label',
            al='right',
            l='Name',
            ann=
            'This is the unique name that will be assigned to your Baked Rig.')
        cmds.textField(
            'sme_rigName',
            aie=1,
            cc=lambda *args: self.updateName('sme_rigName'),
            ec=lambda *args: self.updateName('sme_rigName'),
            tx=someGlobals.rig['name'],
            ann=
            'This is the unique name that will be assigned to your Baked Rig.')

        cmds.setParent('..')

        cmds.separator(h=2, st='none')

        cmds.rowColumnLayout(nc=3,
                             cs=[(1, spacer), (2, spacer), (3, spacer)],
                             cw=[(1, 50), (2, width - 114), (3, 50)])

        cmds.button(
            'sme_selectRigToExport_button',
            l='Rig',
            ann=
            'Click this button to select the current Export Rig that is assigned.'
        )
        cmds.textField(
            'sme_rigToSample',
            aie=1,
            cc=lambda *args: self.check(),
            ec=lambda *args: self.check(),
            #tx='|Soldier_Rig_MASTER:Explorer_Model|Soldier_Rig_MASTER:Rig|Soldier_Rig_MASTER:Group|Soldier_Rig_MASTER:Main|Soldier_Rig_MASTER:DeformationSystem|Soldier_Rig_MASTER:Root_M',
            ann=
            'This is the unique name that will be assigned to your Baked Rig.')
        cmds.button(
            'sme_assignRigData_button',
            l='Assign',
            c=lambda *args: self.assign('sme_rigToSample'),
            ann='Assign a new selected export rig for baking and export.')

        cmds.setParent('..')

        cmds.separator(h=2, st='none')
        cmds.separator(h=2, st='out')
        cmds.separator(h=2, st='none')

        cmds.button('sme_rigBake_button', l='Bake and Export Rig')

        cmds.setParent('..')  # Rig Export layout
Пример #37
0
    def createUI(self):
        cmds.setParent(self.window)
        cmds.columnLayout('columnLayout01',
                          width=290,
                          height=470,
                          adjustableColumn=False)
        cmds.columnLayout(parent='columnLayout01', adjustableColumn=True)
        cmds.frameLayout(label='Channels', width=288, borderStyle='in')
        ChannelsRadioCollection = cmds.radioCollection()
        cmds.rowLayout(nc=4)
        cmds.text(label='', width=2, align='left')
        cmds.radioButton('AllKeyable',
                         label=u'AllKeyable',
                         sl=True,
                         onc='radioButtonStatus("AllKeyable")')
        cmds.radioButton('FromAttributes',
                         label=u'FromAttributes',
                         onc='radioButtonStatus("FromAttributes")')
        cmds.radioButton('FromChannelBox',
                         label=u'FromChannelBox',
                         onc='radioButtonStatus("FromChannelBox")')
        cmds.setParent('..')
        cmds.setParent('..')

        cmds.frameLayout(label='Select Attributes',
                         width=288,
                         borderStyle='in',
                         collapse=True,
                         collapsable=True,
                         parent='columnLayout01')
        cmds.rowLayout(nc=6)
        cmds.text(label='    Translate:', width=80, align='left')
        cmds.checkBox('trans_x',
                      label=u'X',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("TAll",False)')
        cmds.checkBox('trans_y',
                      label=u'Y',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("TAll",False)')
        cmds.checkBox('trans_z',
                      label=u'Z',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("TAll",False)')
        cmds.checkBox('trans_All',
                      label=u'All',
                      value=True,
                      enable=False,
                      onc='checkBoxStatus("T",True)',
                      ofc='checkBoxStatus("T",False)')
        cmds.setParent('..')

        cmds.columnLayout(adjustableColumn=True)
        cmds.separator(st='in')
        cmds.setParent('..')

        cmds.rowLayout(nc=5)
        cmds.text(label='    Rotate:', width=80, align='left')
        cmds.checkBox('rot_x',
                      label=u'X',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("RAll",False)')
        cmds.checkBox('rot_y',
                      label=u'Y',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("RAll",False)')
        cmds.checkBox('rot_z',
                      label=u'Z',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("RAll",False)')
        cmds.checkBox('rot_All',
                      label=u'All',
                      value=True,
                      enable=False,
                      onc='checkBoxStatus("R",True)',
                      ofc='checkBoxStatus("R",False)')
        cmds.setParent('..')

        cmds.columnLayout(adjustableColumn=True)
        cmds.separator(st='in')
        cmds.setParent('..')

        cmds.rowLayout(nc=5)
        cmds.text(label='    Scale:', width=80, align='left')
        cmds.checkBox('scl_x',
                      label=u'X',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("SAll",False)')
        cmds.checkBox('scl_y',
                      label=u'Y',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("SAll",False)')
        cmds.checkBox('scl_z',
                      label=u'Z',
                      value=True,
                      enable=False,
                      ofc='checkBoxStatus("SAll",False)')
        cmds.checkBox('scl_All',
                      label=u'All',
                      value=True,
                      enable=False,
                      onc='checkBoxStatus("S",True)',
                      ofc='checkBoxStatus("S",False)')
        cmds.setParent('..')

        cmds.columnLayout(adjustableColumn=True)
        cmds.separator(st='in')
        cmds.setParent('..')

        cmds.columnLayout(parent='columnLayout01',
                          width=288,
                          adjustableColumn=True)
        cmds.frameLayout(label='Time Range', borderStyle='in')
        TimeRangeRadioCollection = cmds.radioCollection()
        cmds.rowLayout(nc=5)
        cmds.text(label='', width=2, align='left')
        cmds.radioButton('TimeSlider',
                         label='TimeSlider',
                         sl=True,
                         onc='radioButtonStatus("TimeSlider")')
        cmds.radioButton('StartEnd',
                         label='Start/End:',
                         width=80,
                         onc='radioButtonStatus("StartEnd")')
        cmds.floatField('StartTime',
                        value=0,
                        precision=3,
                        step=1,
                        enable=False)
        cmds.floatField('EndTime', value=10, precision=3, step=1, enable=False)
        cmds.setParent('..')

        cmds.columnLayout(parent='columnLayout01',
                          width=288,
                          adjustableColumn=True)
        cmds.frameLayout(label='Bake Simulation', borderStyle='in')

        cmds.rowLayout(nc=4)
        cmds.text(label='', width=5)
        cmds.checkBox('POK', label=u'Keep Unbaked', value=True)
        cmds.checkBox('Euler', label=u'Euler Filter', value=False)
        cmds.checkBox('Sim', label=u'Simulation', value=False)
        cmds.setParent('..')

        cmds.rowLayout(nc=4)
        cmds.text(label='    SampleBy:', width=70, align='left')
        cmds.floatField('bakeSample', value=1, precision=3, step=1, width=60)
        cmds.text(label='', width=45, align='left')
        cmds.button('Key Bake',
                    width=100,
                    label='Key Bake',
                    c='BakeFunction()')
        cmds.setParent('..')

        cmds.columnLayout(parent='columnLayout01',
                          width=288,
                          adjustableColumn=True,
                          cal='left')
        cmds.frameLayout(label='Delete static Key', borderStyle='in')
        cmds.rowLayout(nc=2)
        cmds.text(label='    Sample:', width=70, align='left')
        cmds.floatSliderGrp('DelstaticSample',
                            field=True,
                            min=0,
                            max=0.1,
                            precision=3,
                            step=0.001,
                            value=0.01,
                            width=210,
                            cw=(1, 60),
                            cal=(1, 'left'))
        cmds.setParent('..')

        cmds.rowLayout(nc=2)
        cmds.text(label='', width=180, align='left')
        cmds.button('DelStaticKey',
                    width=100,
                    label='Del Static Key',
                    c='DelStaticFunction()')
        cmds.setParent('..')

        cmds.columnLayout(parent='columnLayout01',
                          width=288,
                          adjustableColumn=True)
        cmds.frameLayout(label='Key Reduction (0= flat and linear only)',
                         borderStyle='in')
        cmds.rowLayout(nc=2)
        cmds.text(label='', width=5)
        cmds.checkBox('LockSelectedKey',
                      label=u'Lock Selected Key',
                      value=False)
        cmds.setParent('..')

        cmds.rowLayout(nc=2)
        cmds.text(label='    Sample:', width=70, align='left')
        cmds.floatSliderGrp('ReductKeySample',
                            field=True,
                            min=0.00,
                            max=1.00,
                            precision=3,
                            step=0.01,
                            value=0.5,
                            width=210,
                            cw=(1, 60),
                            cal=(1, 'left'))
        cmds.setParent('..')

        cmds.rowLayout(nc=2)
        cmds.text(label='', width=180, align='left')
        cmds.button('ReductKey',
                    width=100,
                    label='Key Reduction',
                    c='ReductKeyFunction()')
        cmds.setParent('..')
Пример #38
0
def phoenixTools():
    pToolsWindow = cmds.window(
        menuBar=True,
        title="Phoenix Tools by Aaron Aikman 2014  Version 1.0.25",
        width=435,
        height=500)

    form = cmds.formLayout()
    tabs = cmds.tabLayout()
    cmds.formLayout(form,
                    edit=True,
                    attachForm=((tabs, 'top', 0), (tabs, 'left', 0),
                                (tabs, 'bottom', 0), (tabs, 'right', 0)))

    ######################################  CREATION  ######################################

    child1 = cmds.scrollLayout('scrollLayout0')

    #################
    ##  Polygons   ##
    #################

    cmds.frameLayout(label='Polygons', borderStyle='out', cll=True, width=400)
    cmds.separator(style='none')

    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Cube", command="cmds.polyCube()")
    cmds.button(label="2x2 Cube",
                command="cmds.polyCube(w=1, h=1, d=1, sx=2, sy=2, sz=2)")
    cmds.button(label="4x4 Cube",
                command="cmds.polyCube(w=1, h=1, d=1, sx=4, sy=4, sz=4)")
    cmds.button(label="Human Ref",
                command="cmds.polyCube(w=32, h=96, d=32, sx=1, sy=1, sz=1)")

    cmds.setParent('..')
    cmds.separator(w=400, style="in")
    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Sphere", command="cmds.polySphere()")
    cmds.button(label="Diode Sphere", command="cmds.polySphere(sx=4, sy=3)")
    cmds.button(label="8x8 Sphere", command="cmds.polySphere(sx=8, sy=8)")
    cmds.button(label="12x12 Sphere", command="cmds.polySphere(sx=12, sy=12)")

    cmds.setParent('..')
    cmds.separator(w=400, style="in")
    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Plane", command="cmds.polyPlane()")
    cmds.button(label="1x1 Plane",
                command="cmds.polyPlane(w=1, h=1, sx=1, sy=1)")
    cmds.button(label="4x4 Plane",
                command="cmds.polyPlane(w=1, h=1, sx=4, sy=4)")
    cmds.button(label="Floor Plane",
                command="cmds.polyPlane(w=1000, h=1000, sx=1, sy=1)")

    cmds.setParent('..')
    cmds.separator(w=400, style="in")
    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Cylinder", command="cmds.polyCylinder()")
    cmds.button(label="Tri Cylinder",
                command="cmds.polyCylinder(sx=3, sy=1, sz=1)")
    cmds.button(label="12 Cylinder",
                command="cmds.polyCylinder(sx=12, sy=1, sz=1)")
    cmds.button(label="12x4 Cylinder",
                command="cmds.polyCylinder(sx=12, sy=4, sz=1)")

    cmds.setParent('..')
    cmds.separator(w=400, style="in")
    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Torus", command="cmds.polyTorus()")
    cmds.button(label="Quad Torus", command="cmds.polyTorus(sx=4, sy=4)")
    cmds.button(label="Disk", command="makeDisk()")
    cmds.button(label="Prism", command="cmds.polyPrism()")

    cmds.setParent('..')
    cmds.separator(w=400, style="in")
    cmds.gridLayout(numberOfColumns=4, cellWidthHeight=(100, 25))

    cmds.button(label="Cone", command="cmds.polyCone()")
    cmds.button(label="Helix", command="cmds.polyHelix()")
    cmds.button(label="Pipe", command="cmds.polyPipe()")
    cmds.button(label="Pyramid", command="cmds.polyPyramid()")

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')

    #################
    ##     Misc    ##
    #################

    cmds.frameLayout(label='Miscellaneous',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.button(label="Create Geometry Tool",
                command="maya.mel.eval('setToolTo polyCreateFacetContext ;')")
    cmds.button(label="CV Curve Tool", command="cmds.CVCurveTool()")
    cmds.button(label="EP Curve Tool", command="cmds.EPCurveTool()")
    cmds.button(label="Locator", command="cmds.spaceLocator()")

    cmds.setParent('..')

    cmds.setParent('..')

    ######################################  MODELING  ######################################

    child2 = cmds.scrollLayout('scrollLayout1')

    #################
    ##  Mirroring  ##
    #################

    cmds.frameLayout(label='Mirroring', borderStyle='out', cll=True, width=400)

    cmds.separator(style="none")

    cmds.radioButtonGrp('mDir',
                        label='Direction',
                        labelArray3=['X', 'Y', 'Z'],
                        numberOfRadioButtons=3,
                        select=1,
                        cal=(1, 'right'),
                        cw4=(80, 30, 30, 30))
    cmds.radioButtonGrp('mirrorMode',
                        label='Mode',
                        labelArray3=['Duplicate', 'Instance', 'Combined Geo'],
                        numberOfRadioButtons=3,
                        select=1,
                        cal=(1, 'right'),
                        cw4=(80, 70, 70, 100))

    cmds.rowLayout(numberOfColumns=2)

    cmds.text('                         ')
    cmds.button(label="Mirror Object",
                command="mirrorGeo()",
                ann='Select object and place pivot point on symmetry line')

    cmds.setParent('..')

    cmds.separator(style="none")

    cmds.setParent('..')

    ##############
    ##  Pivots  ##
    ##############

    cmds.frameLayout(label='Pivot Manipulation',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.radioButtonGrp('pivPos',
                        label='Pivot Location',
                        labelArray2=['Bottom', 'Center'],
                        numberOfRadioButtons=2,
                        select=1,
                        cal=(1, 'right'),
                        cw3=(80, 60, 60))

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')
    cmds.button(
        label="Move Pivots",
        command="movePivots()",
        ann=
        'Select one or more objects to adjust the pivot point of.\nTool creates a temporary group and will alter the hierarchy.'
    )

    cmds.text('                         ')
    cmds.button(label="Move Object to Origin", command="cmds.move(rpr=True)")

    cmds.setParent('..')
    cmds.separator(style='none')

    cmds.setParent('..')

    ##############
    ##   Manip  ##
    ##############

    cmds.frameLayout(label='Manipulator Orientation',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.radioButtonGrp('manip',
                        label=' ',
                        labelArray2=['World Space', 'Object Space'],
                        numberOfRadioButtons=2,
                        select=1,
                        cal=(1, 'right'),
                        cw3=(80, 100, 60))

    cmds.rowLayout(numberOfColumns=2)

    cmds.text('                         ')

    cmds.button(
        label="Set Manipulator",
        command="setManip()",
        ann=
        'Sets all transformation manipulators to world space or object space')

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')

    ##############
    ##   Holes  ##
    ##############

    cmds.frameLayout(label='Hole Creation',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.intSliderGrp("numSides",
                      l='Number of Sides',
                      field=True,
                      v=8,
                      min=3,
                      max=100,
                      fmx=10000,
                      cal=(1, 'right'),
                      cw3=(100, 100, 200))

    cmds.rowColumnLayout(numberOfColumns=4)

    cmds.text('                         ')
    cmds.button(label="Create Disk",
                command="makeDisk()",
                ann='Creates a disk at the origin point')
    cmds.text('                         ')
    cmds.button(label="Help",
                command="makeHoleHelp()",
                ann='Click for instructions')
    cmds.setParent('..')

    cmds.gridLayout(numberOfColumns=2, cellWidthHeight=(200, 25))
    cmds.button(
        label="Snap Together Tool",
        command="maya.mel.eval('setToolTo snapTogetherToolCtx;')",
        ann=
        'Click the face on the first object to be snapped into location\nafter clicking the face on the second object\nThen press enter'
    )

    cmds.button(label="Combine", command="cmds.polyUnite()")

    cmds.button(
        label="Make Hole Tool",
        command="maya.mel.eval('MakeHoleTool;')",
        ann=
        'Select the face being cut into\nThen select the face to become the hole\nThen press enter'
    )
    cmds.button(label="Quadrangulate Geo",
                command="autoQuad()",
                ann='Select an N-gon to automatically quadrangulate')

    cmds.setParent('..')
    cmds.separator(style='none')
    cmds.separator(style='single')
    cmds.separator(style='none')
    cmds.button(
        label="Make Hole Based On Geo",
        command="makeHolebyGeo()",
        ann=
        'Create a smaller face based upon the number of sides of the selected face'
    )
    cmds.separator(style='none')
    cmds.separator(style='none')

    cmds.setParent('..')

    ##############
    ## Creasing ##
    ##############

    cmds.frameLayout(label='Creasing', borderStyle='out', cll=True, width=400)

    cmds.separator(style='none')

    cmds.rowColumnLayout(numberOfColumns=2)
    cmds.text('                         ')
    cmds.button(label="Toggle Soft Edge Display",
                command="toggleSoftEdges()",
                ann='Toggle dashed lines for soft edges')

    cmds.setParent('..')
    cmds.floatSliderGrp("crsAmt",
                        field=True,
                        v=10,
                        min=0.0,
                        max=10,
                        label='Crease Amount',
                        cal=(1, 'right'),
                        cw3=(90, 100, 210))

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')
    cmds.button(label="Crease Hard Edges", command="creaseHardEdges()")
    cmds.text('                         ')
    cmds.button(label="Uncrease All",
                command="unCrease()",
                ann='Uncreases the edges of the selected object')

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')
    cmds.setParent('..')

    ######################################  UNWRAPPING  ######################################

    child3 = cmds.scrollLayout('scrollLayout2')

    #################
    ## UV Creation ##
    #################

    cmds.frameLayout(label='UV Creation',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')

    cmds.button(label="Unwrap Selected Faces",
                command="unwrapSelectedFaces()",
                ann='Unwraps the selected faces into contiguous shells')

    cmds.setParent('..')

    cmds.separator(style='single')

    cmds.radioButtonGrp('mode',
                        label='Mode',
                        labelArray2=['Unstretched', 'Optimized'],
                        numberOfRadioButtons=2,
                        select=1,
                        cal=(1, 'right'),
                        cw3=(80, 100, 100))

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')

    cmds.button(
        label="Unwrap Cylindrical",
        command="unwrapCylindrical()",
        ann=
        'Select a seam of the cylindrical object to unfold\nUnstretched mode will have no distortion,but will be less optimal for UV placement\nOptimized mode will unwrap into a shell where each face is a square\nAn optimized pipe can then be unfolded using Unfold Pipe'
    )

    cmds.setParent('..')

    cmds.separator(style='single')

    cmds.floatSliderGrp('nSAngle',
                        l='Smoothing Angle',
                        field=True,
                        v=45,
                        min=0.5,
                        max=179.5,
                        cal=(1, 'right'),
                        cw3=(100, 100, 200))

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')
    cmds.button(label="Set Normal Smoothing Angle",
                command="setNormalAngle()",
                ann='Sets smoothing angle for object')

    cmds.text('                         ')
    cmds.text('                         ')
    cmds.text('                         ')

    cmds.button(label="Toggle Soft Edge Display",
                command="toggleSoftEdges()",
                ann='Toggle dashed lines for soft edges')

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.rowColumnLayout(numberOfColumns=3)

    cmds.text('                         ')

    cmds.button(label="Harden Edge", command="cmds.polySoftEdge(a=0)")
    cmds.button(label="Soften Edge", command="cmds.polySoftEdge(a=180)")
    cmds.setParent('..')

    cmds.separator(style='single')

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')

    cmds.checkBox('lyt', label='Layout', value=True)
    cmds.text('                         ')

    cmds.checkBox('unf', label='Unfold', value=True)

    cmds.text('                         ')

    cmds.button(
        label="Unwrap by Smoothing Angle",
        command="unwrapByAngle()",
        ann=
        """Creates UV shells for the selected object based upon the object's edge normals."""
    )

    cmds.text('                         ')

    cmds.button(
        label="Unwrap by Selected Seams",
        command="unwrapBySeams()",
        ann=
        """Creates UV shells for the object using the selected edges as seams."""
    )

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')

    #################
    ## UV Editing  ##
    #################

    cmds.frameLayout(label='UV Editing',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.gridLayout(numberOfColumns=2, cellWidthHeight=(200, 25))

    cmds.button(
        label="Unfold Vertical Pipe",
        command="unfoldPipe(2)",
        ann=
        'Select the UVs of an unfolded pipe or cylindrical object\nthat run around the pipe (i.e.that are not touching the origin or insertion of the pipe)\nIf the width is only one face, select the entire shell\nUse this option for UVs that are tall'
    )
    cmds.button(
        label="Unfold Horizontal Pipe",
        command="unfoldPipe(1)",
        ann=
        'Select the UVs of an unfolded pipe or cylindrical object\nthat run around the pipe (i.e.that are not touching the origin or insertion of the pipe)\nIf the width is only one face, select the entire shell\nUse this option for UVs that are wide'
    )
    cmds.button(label="Select Uvs Edge to Loop",
                command="selectUvEdgeLoop()",
                ann='Select an edge to convert selection to uv edge loop')
    cmds.button(
        label="Straighten Border",
        command="straightenUVBorder()",
        ann=
        'Select a line of border UVs to straighten the UVS in between the furthest UVS'
    )

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')

    ####################
    ## UV Management  ##
    ####################

    cmds.frameLayout(label='UV Management',
                     borderStyle='out',
                     cll=True,
                     width=400)

    cmds.separator(style='none')

    cmds.radioButtonGrp('rot',
                        label='Rotation',
                        labelArray3=['None', '90 Deg', 'Free'],
                        numberOfRadioButtons=3,
                        select=3,
                        cal=(1, 'right'),
                        cw4=(80, 60, 60, 60))

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')
    cmds.button(label="Layout UVs", command="layoutUVs()")

    cmds.setParent('..')

    cmds.separator(style='single')

    cmds.rowColumnLayout(numberOfColumns=2)

    cmds.text('                         ')

    cmds.checkBox('cH', label='Clear Child History', value=False)

    cmds.text('                         ')
    cmds.button(
        label="Transfer UVs",
        command="transferUVs()",
        ann=
        'Select the parent object to derive UVs from\nand then any children to copy the UVs to\nChildren will become UV instances of the parent unless Child History is cleared\nKeeping History tends to slow down performance'
    )

    cmds.setParent('..')

    cmds.separator(style='none')

    cmds.setParent('..')

    cmds.setParent('..')

    cmds.tabLayout(tabs,
                   edit=True,
                   tabLabel=((child1, 'Creation'), (child2, 'Modeling'),
                             (child3, 'Unwrapping')))

    cmds.showWindow(pToolsWindow)
Пример #39
0
def build_help_gui_ik_leg_generator():
    window_name = "build_help_gui_ik_leg_generator"
    if cmds.window(window_name, exists=True):
        cmds.deleteUI(window_name, window=True)

    cmds.window(window_name, title= script_name + " Help", mnb=False, mxb=False, s=True)
    cmds.window(window_name, e=True, s=True, wh=[1,1])

    cmds.columnLayout("main_column", p= window_name)
   
    # Title Text
    cmds.separator(h=12, style='none') # Empty Space
    cmds.rowColumnLayout(nc=1, cw=[(1, 310)], cs=[(1, 10)], p="main_column") # Window Size Adjustment
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1, 10)], p="main_column") # Title Column
    cmds.text(script_name + " Help", bgc=(.4, .4, .4),  fn="boldLabelFont", align="center")
    cmds.separator(h=10, style='none', p="main_column") # Empty Space


    # Body ====================   
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1,10)], p="main_column")
    cmds.text(l='This script assumes that you are using a simple leg', align="left")
    cmds.text(l='composed of a hip joint, a knee joint an ankle joint', align="left")
    cmds.text(l='and maybe ball and toe joints.', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='In case your setup is different, I suggest you try', align="left")
    cmds.text(l='a different solution.', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Joint Tag (Suffix) and Ctrl Group Tag (Suffix):', align="left", fn="boldLabelFont")
    cmds.text(l='These two textfields allow you to define what suffix you', align="left")
    cmds.text(l='used for you base skeleton joints and your control groups.', align="left") 
    cmds.text(l='(used when creating new names or looking for controls)', align="left")
    cmds.separator(h=10, style='none') # Empty Space
    cmds.text(l='The Ctrl Group Tag is used to define the visibility of the', align="left")
    cmds.text(l='FK system.', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Custom PVector Ctrl, IK Ctrl and IK Switch:', align="left", fn="boldLabelFont")
    cmds.text(l='These options allow you to load an already existing', align="left")
    cmds.text(l='control.', align="left")
    cmds.text(l='In case you already created curve you could simply load', align="left")
    cmds.text(l='them and the script will use yours instead of creating a', align="left")
    cmds.text(l='new one', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Colorize Controls: ', align="left", fn="boldLabelFont")
    cmds.text(l='This option looks for "right_" and "left_" tags', align="left")
    cmds.text(l='and assign colors based on the found tag', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Make Stretchy Legs: ', align="left", fn="boldLabelFont")
    cmds.text(l='This option creates measure tools to define how to', align="left")
    cmds.text(l='strechy the leg when it goes beyong its current size.', align="left")
    cmds.text(l='- Term = What is being compared', align="left")
    cmds.text(l='- Condition = Default Size (used for scalling the rig)', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Use Ball Joint:', align="left", fn="boldLabelFont")
    cmds.text(l='This option allows you to define whether or not to use', align="left")
    cmds.text(l='a ball joint.', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='Load \"Content\" Buttons:', align="left", fn="boldLabelFont")
    cmds.text(l='These buttons allow you to load the necessary', align="left")
    cmds.text(l='objects before running the script.', align="left")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.rowColumnLayout(nc=2, cw=[(1, 140),(2, 140)], cs=[(1,10),(2, 0)], p="main_column")
    cmds.text('Guilherme Trevisan  ')
    cmds.text(l='<a href="mailto:[email protected]">[email protected]</a>', hl=True, highlightColor=[1,1,1])
    cmds.rowColumnLayout(nc=2, cw=[(1, 140),(2, 140)], cs=[(1,10),(2, 0)], p="main_column")
    cmds.separator(h=15, style='none') # Empty Space
    cmds.text(l='<a href="https://github.com/TrevisanGMW">Github</a>', hl=True, highlightColor=[1,1,1])
    cmds.separator(h=7, style='none') # Empty Space
    
    # Close Button 
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1,10)], p="main_column")
    cmds.separator(h=10, style='none')
    cmds.button(l='OK', h=30, c=lambda args: close_help_gui())
    cmds.separator(h=8, style='none')
    
    # Show and Lock Window
    cmds.showWindow(window_name)
    cmds.window(window_name, e=True, s=False)
    
    # Set Window Icon
    qw = omui.MQtUtil.findWindow(window_name)
    widget = wrapInstance(long(qw), QWidget)
    icon = QIcon(':/question.png')
    widget.setWindowIcon(icon)
    
    def close_help_gui():
        if cmds.window(window_name, exists=True):
            cmds.deleteUI(window_name, window=True)
Пример #40
0
def build_gui_help_py_curve():
    window_name = "build_gui_help_py_curve"
    if cmds.window(window_name, exists=True):
        cmds.deleteUI(window_name, window=True)

    cmds.window(window_name,
                title=script_name + " Help",
                mnb=False,
                mxb=False,
                s=True)
    cmds.window(window_name, e=True, s=True, wh=[1, 1])

    cmds.columnLayout("main_column", p=window_name)

    # Title Text
    cmds.separator(h=12, style='none')  # Empty Space
    cmds.rowColumnLayout(nc=1, cw=[(1, 310)], cs=[(1, 10)],
                         p="main_column")  # Window Size Adjustment
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1, 10)],
                         p="main_column")  # Title Column
    cmds.text(script_name + " Help",
              bgc=[0, .5, 0],
              fn="boldLabelFont",
              align="center")
    cmds.separator(h=10, style='none', p="main_column")  # Empty Space

    # Body ====================
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1, 10)], p="main_column")
    cmds.text(l='This script generates the Python code necessary to create',
              align="left")
    cmds.text(l='a selected curve.', align="left")
    cmds.separator(h=10, style='none')  # Empty Space
    cmds.text(l='Make sure you delete the curve\'s history before ',
              align="left")
    cmds.text(l='generating the code.', align="left")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.text(l='Add import "maya.cmds":', align="left", fn="boldLabelFont")
    cmds.text(l='Adds a line that imports Maya\'s API. This is necessary',
              align="left")
    cmds.text(l='when running python scripts.', align="left")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.text(l='Close Curve: ', align="left", fn="boldLabelFont")
    cmds.text(l='Adds a line to close the curve after creating it.',
              align="left")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.text(l='"Generate" button:', align="left", fn="boldLabelFont")
    cmds.text(l='Outputs the python code necessary to create the curve',
              align="left")
    cmds.text(l='inside the "Output PYthon Curve" box.', align="left")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.text(l='Run Code:', align="left", fn="boldLabelFont")
    cmds.text(l='Attempts to run the code (or anything written) inside ',
              align="left")
    cmds.text(l='"Output Python Curve" box', align="left")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.rowColumnLayout(nc=2,
                         cw=[(1, 140), (2, 140)],
                         cs=[(1, 10), (2, 0)],
                         p="main_column")
    cmds.text('Guilherme Trevisan  ')
    cmds.text(
        l='<a href="mailto:[email protected]">[email protected]</a>',
        hl=True,
        highlightColor=[1, 1, 1])
    cmds.rowColumnLayout(nc=2,
                         cw=[(1, 140), (2, 140)],
                         cs=[(1, 10), (2, 0)],
                         p="main_column")
    cmds.separator(h=15, style='none')  # Empty Space
    cmds.text(l='<a href="https://github.com/TrevisanGMW">Github</a>',
              hl=True,
              highlightColor=[1, 1, 1])
    cmds.separator(h=7, style='none')  # Empty Space

    # Close Button
    cmds.rowColumnLayout(nc=1, cw=[(1, 300)], cs=[(1, 10)], p="main_column")
    cmds.separator(h=10, style='none')
    cmds.button(l='OK', h=30, c=lambda args: close_help_gui())
    cmds.separator(h=8, style='none')

    # Show and Lock Window
    cmds.showWindow(window_name)
    cmds.window(window_name, e=True, s=False)

    # Set Window Icon
    qw = omui.MQtUtil.findWindow(window_name)
    widget = wrapInstance(long(qw), QWidget)
    icon = QIcon(':/question.png')
    widget.setWindowIcon(icon)

    def close_help_gui():
        if cmds.window(window_name, exists=True):
            cmds.deleteUI(window_name, window=True)
Пример #41
0
 def createColumn(self, i):
     mc.columnLayout()
     mc.text(label=self.titles[i], font="boldLabelFont")
     mc.separator(height=5, style="in")
     self.handleCommand(i)
     mc.setParent("..")
Пример #42
0
def getPrintStudioDialog():
    global downloadInfo
    window = cmds.window(
        title=maya.stringTable['y_printStudio.kPrintStudioDownload'],
        widthHeight=(340, 180),
        menuBar=False,
        sizeable=False)

    formLayout = cmds.formLayout()
    tabLayout = cmds.tabLayout(innerMarginWidth=0,
                               innerMarginHeight=0,
                               tabsVisible=False)
    cmds.formLayout(formLayout,
                    edit=True,
                    attachForm=((tabLayout, 'top', 0), (tabLayout, 'left', 0),
                                (tabLayout, 'bottom', 0), (tabLayout, 'right',
                                                           0)))

    # Tab 1 - Print Studio is not currently installed
    cmds.columnLayout(width=340)
    cmds.columnLayout(width=340)
    cmds.text(width=340,
              height=60,
              label=maya.stringTable['y_printStudio.kNotIntalled1'],
              align='center')
    cmds.text(width=340,
              height=16,
              label=maya.stringTable['y_printStudio.kNotIntalled2'],
              align='center')
    sizeInfo = ''
    if printStudioDownloadURL() is not None:
        file_name = downloadInfo['url'].split('/')[-1]
        sizeInfo = '%s (%d MB)' % (
            file_name, int(round(downloadInfo['size'] / 1048576.0)))
    cmds.text(width=340, height=24, label=sizeInfo, align='center')
    cmds.separator(width=340, height=44, style='none')
    cmds.separator(width=340)
    cmds.setParent('..')
    cmds.rowLayout(numberOfColumns=5,
                   columnAttach=[(1, 'left', 4), (5, 'right', 4)])
    aboutCommand = lambda widget: cmds.showHelp(
        'https://ember.autodesk.com/overview#software', absolute=True)
    aboutButton = cmds.button(
        width=120,
        label=maya.stringTable['y_printStudio.kAboutPrintStudio'],
        command=aboutCommand)
    cmds.separator(width=4, horizontal=False)
    downloadCommand = lambda widget: downloadPrintStudio(window=window,
                                                         tabLayout=tabLayout)
    downloadButton = cmds.button(
        width=94,
        label=maya.stringTable['y_printStudio.kDownload'],
        command=downloadCommand)
    cmds.separator(width=4, horizontal=False)
    cancelCommand = lambda widget: cmds.deleteUI(window, window=True)
    cmds.button(width=94,
                label=maya.stringTable['y_printStudio.kCancel'],
                command=cancelCommand)
    cmds.setParent('..')
    cmds.setParent('..')

    # Tab 2 - Downloading Print Studio Installer
    cmds.columnLayout(width=340)
    cmds.columnLayout(width=340)
    cmds.text(width=340,
              height=60,
              label=maya.stringTable['y_printStudio.kDownloading'],
              align='center')
    cmds.rowLayout(numberOfColumns=1, columnAttach=[(1, 'left', 30)])
    progressBar = cmds.progressBar(width=270, height=16)
    cmds.setParent('..')
    cmds.separator(width=340, height=4, style='none')
    cmds.text(width=340,
              height=60,
              label=maya.stringTable['y_printStudio.kPressToCancel'],
              align='center')

    downloadCommand = lambda widget: downloadPrintStudio(
        window=window, tabLayout=tabLayout, progressBar=progressBar)
    cmds.button(downloadButton, edit=True, command=downloadCommand)

    cmds.tabLayout(tabLayout, edit=True, selectTabIndex=1)
    cmds.showWindow(window)
Пример #43
0
def build_gui_py_curve():
    window_name = "build_gui_py_curve"
    if cmds.window(window_name, exists=True):
        cmds.deleteUI(window_name)

    # Main GUI Start Here =================================================================================

    build_gui_py_curve = cmds.window(window_name, title=script_name + "  v" + script_version,\
                          titleBar=True, mnb=False, mxb=False, sizeable =True)

    cmds.window(window_name, e=True, s=True, wh=[1, 1])

    column_main = cmds.columnLayout()

    form = cmds.formLayout(p=column_main)

    content_main = cmds.columnLayout(adj=True)

    cmds.separator(h=10, style='none')  # Empty Space
    cmds.rowColumnLayout(nc=1, cw=[(1, 270)], cs=[(1, 10)],
                         p=content_main)  # Window Size Adjustment
    cmds.rowColumnLayout(nc=3,
                         cw=[(1, 10), (2, 200), (3, 50)],
                         cs=[(1, 10), (2, 0), (3, 0)],
                         p=content_main)  # Title Column
    cmds.text(" ", bgc=[0, .5, 0])  # Tiny Empty Green Space
    cmds.text(script_name + " v" + script_version,
              bgc=[0, .5, 0],
              fn="boldLabelFont",
              align="left")
    cmds.button(l="Help",
                bgc=(0, .5, 0),
                c=lambda x: build_gui_help_py_curve())
    cmds.separator(h=10, style='none', p=content_main)  # Empty Space

    # Body ====================
    body_column = cmds.rowColumnLayout(nc=1,
                                       cw=[(1, 260)],
                                       cs=[(1, 10)],
                                       p=content_main)

    cmds.rowColumnLayout(nc=1, cw=[(1, 260)], cs=[(1, 10)])

    settings = cmds.checkBoxGrp(columnWidth2=[150, 1], numberOfCheckBoxes=2, \
                                label1 = 'Add import \"maya.cmds\" ', label2 = "Close Curve", v1 = add_import, v2 = close_curve)

    cmds.rowColumnLayout(nc=1, cw=[(1, 230)], cs=[(1, 0)])
    cmds.separator(h=10, style='none')  # Empty Space
    cmds.button(l="Generate",
                bgc=(.6, .8, .6),
                c=lambda x: generate_python_curve())
    cmds.separator(h=10, style='none', p=content_main)  # Empty Space
    cmds.separator(h=10, p=content_main)

    # Bottom ====================
    cmds.rowColumnLayout(nc=1, cw=[(1, 260)], cs=[(1, 10)], p=content_main)
    cmds.text(label='Output Python Curve')
    output_python = cmds.scrollField(editable=True, wordWrap=True)
    cmds.separator(h=10, style='none')  # Empty Space
    cmds.button(l="Run Code",
                c=lambda x: run_output_code(
                    cmds.scrollField(output_python, query=True, text=True)))
    cmds.separator(h=10, style='none')  # Empty Space

    def generate_python_curve():

        not_curve_error = "Please make sure you selected a Nurbs Curve or a Bezier Curve object before generating it"

        if len(cmds.ls(selection=True)) != 0:
            getcontext().prec = 5

            shape = cmds.listRelatives(cmds.ls(sl=1)[0], s=1, fullPath=True)[0]
            type_checker = str(cmds.objectType(shape))

            if "nurbsCurve" in type_checker or "bezierCurve" in type_checker:

                cvs = cmds.getAttr(shape + '.cv[*]')
                cvs_list = []

                for c in cvs:
                    cvs_list.append([
                        float(Decimal("%.3f" % c[0])),
                        float(Decimal("%.3f" % c[1])),
                        float(Decimal("%.3f" % c[2]))
                    ])

                if cmds.checkBoxGrp(settings, q=True, value1=True):
                    out = 'import maya.cmds as cmds\n\ncmds.curve(p='
                else:
                    out = 'cmds.curve(p='

                out += '[%s]' % ', '.join(map(str, cvs_list))
                out += ',d=' + str(cmds.getAttr(shape + '.degree')) + ')'

                if cmds.checkBoxGrp(settings, q=True, value2=True):
                    out += '\n\ncmds.closeCurve(ch=False, ps=False, rpo=True)'
                else:
                    pass

                print("#" * 100)
                print out
                print("#" * 100)

                cmds.scrollField(output_python,
                                 edit=True,
                                 wordWrap=True,
                                 text=out,
                                 sl=True)
                cmds.setFocus(output_python)
            else:
                cmds.warning(not_curve_error)
                cmds.scrollField(output_python,
                                 edit=True,
                                 wordWrap=True,
                                 text=not_curve_error,
                                 sl=True)
                cmds.setFocus(output_python)
        else:
            cmds.warning(not_curve_error)

    # Show and Lock Window
    cmds.showWindow(build_gui_py_curve)
    cmds.window(window_name, e=True, s=False)

    # Set Window Icon
    qw = omui.MQtUtil.findWindow(window_name)
    widget = wrapInstance(long(qw), QWidget)
    icon = QIcon(':/pythonFamily.png')
    widget.setWindowIcon(icon)
    def createCustom(self, *args):
        '''
        #
        #
        #
        #
        #
        '''
        # selection type
        mc.rowColumnLayout(nc=3,
                           cw=[(1, 125), (2, 150), (3, 150)],
                           cs=[1, 5],
                           rs=[1, 3],
                           cal=(
                               [1, "left"],
                               [2, "left"],
                               [3, "left"],
                           ))

        mc.text(l="Mirror As Well?")
        #mc.setParent("..")
        mc.radioButtonGrp(
            "selArmMirrorType_rbg",
            la2=["No", "Yes"],
            nrb=2,
            sl=2,
            cw2=[50, 50],
        )
        mc.setParent("..")
        mc.separator(st="in", h=20, w=500)

        mc.rowColumnLayout(nc=3,
                           cw=[(1, 100), (2, 200), (3, 150)],
                           cs=[1, 5],
                           rs=[1, 3],
                           cal=(
                               [1, "left"],
                               [2, "left"],
                               [3, "left"],
                           ))
        mc.text(l="Initial Limb: ")
        mc.radioButtonGrp(
            "selArmType_rbg",
            la2=["Left", "Right"],
            nrb=2,
            sl=1,
            cw2=[50, 50],
        )
        mc.setParent("..")
        mc.separator(st="in", h=20, w=500)

        # sources
        mc.rowColumnLayout(nc=2, cw=[(1, 100), (2, 370)], cs=[1, 5], rs=[1, 3])
        mc.text(bgc=(0.85, 0.65, 0.25), l="IK Spine: ")
        mc.textFieldButtonGrp("jointLoad_tfbg", cw=(1, 322), bl="  Load  ")

        #mc.text(bgc=(0.85, 0.65, 0.25), l="COG: ")
        #mc.textFieldButtonGrp("cog_tfbg", cw=(1, 322), bl="  Load  ", tx="CTRL_COG")

        mc.text(bgc=(0.85, 0.65, 0.25), l="Shoulder CTRL: ")
        mc.textFieldButtonGrp("ctrlShoulderLoad_tf",
                              cw=(1, 322),
                              bl="  Load  ",
                              tx="CTRL_l_shoulder")

        mc.setParent("..")

        mc.separator(st="in", h=20, w=500)

        # load buttons
        #

        mc.textFieldButtonGrp("jointLoad_tfbg", e=True, bc=self.loadSrc1Btn)
        mc.textFieldButtonGrp("ctrlShoulderLoad_tf",
                              e=True,
                              bc=self.loadSrc2Btn)

        self.selLoad = []
        self.jointArray = []
        mc.showWindow(self.window)
Пример #45
0
    def _start_ui(self):
        # Remove size preference to force the window calculate its size
        windowName = 'VirtuCameraMayaConfigWindow'
        if cmds.windowPref(windowName, exists=True):
            cmds.windowPref(windowName, remove=True)
        self._ui_window = cmds.window(windowName,
                                      width=self._WINDOW_SIZE[0],
                                      height=self._WINDOW_SIZE[1],
                                      menuBarVisible=False,
                                      titleBar=True,
                                      visible=True,
                                      sizeable=True,
                                      closeCommand=self._close_ui,
                                      title='VirtuCamera Configuration')
        form_lay = cmds.formLayout(width=550, height=400)
        col_lay = cmds.columnLayout(adjustableColumn=True,
                                    columnAttach=('both', 0),
                                    width=465)

        cmds.text(label='General Settings', align='left')
        cmds.separator(height=15, style='none')
        cmds.rowLayout(numberOfColumns=3,
                       columnWidth3=(59, 80, 45),
                       columnAttach=[(1, 'both', 0), (2, 'both', 0),
                                     (3, 'both', 0)])
        cmds.separator(style='none')
        cmds.text(label='Server Port', align='right')
        self._port_num_ui = cmds.intField(
            width=45,
            value=self.DEFAULT_SRVPORT,
            minValue=0,
            maxValue=65535,
            changeCommand=self._port_num_changed_ui)
        cmds.setParent('..')
        cmds.separator(height=5, style='none')
        self._cap_mode_ui = cmds.optionMenuGrp(
            label='Capture Mode', changeCommand=self._cap_mode_changed_ui)
        cmds.menuItem(label=self.CAPMODE_BUFFER)
        cmds.menuItem(label=self.CAPMODE_SCREENSHOT)
        cmds.text(
            label=
            "                                          'Viewport Buffer' is faster. 'Screenshot' is experimental, only use it\n                                           if you are having problems visualizing the viewport on the App.",
            align='left')
        cmds.separator(height=25, style='none')
        cmds.separator()
        cmds.separator(height=15, style='none')
        cmds.text(label='Custom Scripts', align='left')
        cmds.separator(height=15, style='none')
        cmds.rowLayout(numberOfColumns=3,
                       columnWidth3=(600, 80, 80),
                       adjustableColumn=1,
                       columnAttach=[(1, 'both', 0), (2, 'both', 0),
                                     (3, 'both', 0)])
        self._script_num_ui = cmds.intSliderGrp(
            field=True,
            label='Script Number',
            minValue=0,
            maxValue=1,
            fieldMinValue=0,
            fieldMaxValue=1,
            value=0,
            dragCommand=self._script_number_changed_ui,
            enable=False)
        self._new_bt_ui = cmds.button(label='New', command=self._new_script_ui)
        self._rem_bt_ut = cmds.button(label='Remove',
                                      command=self._remove_script_ui,
                                      enable=False)
        cmds.setParent('..')
        self._label_ui = cmds.textFieldGrp(
            label='Button Label',
            textChangedCommand=self._label_changed_ui,
            enable=False)
        self._lang_ui = cmds.radioButtonGrp(
            label='Language',
            labelArray2=['Python', 'MEL'],
            numberOfRadioButtons=2,
            select=self.LANG_PY,
            changeCommand=self._languaje_changed_ui,
            enable=False)
        self._code_lb_ui = cmds.text(label='Script Code',
                                     align='left',
                                     enable=False)
        cmds.setParent('..')
        self._ui_sfield = cmds.scrollField(
            editable=True,
            wordWrap=False,
            keyPressCommand=self._code_changed_ui,
            enable=False)
        col_lay2 = cmds.columnLayout(adjustableColumn=True,
                                     columnAttach=('both', 0),
                                     width=465)
        cmds.rowLayout(numberOfColumns=2,
                       columnWidth2=(680, 80),
                       adjustableColumn=1,
                       columnAttach=[(1, 'both', 0), (2, 'both', 0)])
        cmds.separator(style='none')
        self._ui_save = cmds.button(label='Save',
                                    width=80,
                                    command=self._save_ui,
                                    enable=False)
        cmds.setParent('..')
        cmds.setParent('..')
        cmds.formLayout(form_lay,
                        edit=True,
                        attachForm=[(col_lay, 'top', 20),
                                    (col_lay, 'left', 20),
                                    (col_lay, 'right', 20),
                                    (self._ui_sfield, 'left', 20),
                                    (self._ui_sfield, 'right', 20),
                                    (col_lay2, 'bottom', 20),
                                    (col_lay2, 'left', 20),
                                    (col_lay2, 'right', 20)],
                        attachControl=[(self._ui_sfield, 'top', 0, col_lay),
                                       (self._ui_sfield, 'bottom', 15,
                                        col_lay2)])
        cmds.setParent('..')
        cmds.showWindow(self._ui_window)
Пример #46
0
def dbtrace_ui():
    """
    Create a simple window showing the current status of the dbtrace objects
    and providing a callback to change both the enabled state and the output
    location.
    """
    global DBTRACE_SCRIPT_JOB
    global DBTRACE_WINDOW
    global DBTRACE_FRAME
    global DBTRACE_SCROLL
    global DBTRACE_CONTENT
    global DBTRACE_FILTERS
    global DBTRACE_FILTER_TEXT
    global DBTRACE_SHOW_ENABLED
    global DBTRACE_SHOW_DISABLED

    # Default options
    filter_text = ''
    show_enabled = True
    show_disabled = True

    # If calling this for the first time then build the window and the fixed
    # portion of it.
    if not cmds.window(DBTRACE_WINDOW, exists=True):
        # Create an event notifying us when the dbTrace values change so
        # that the UI can be updated accordingly.
        if DBTRACE_SCRIPT_JOB == None:
            DBTRACE_SCRIPT_JOB = cmds.scriptJob(
                event=['dbTraceChanged', 'maya.debug.dbtrace_ui.dbtrace_ui()'])

        DBTRACE_WINDOW = cmds.window(DBTRACE_WINDOW,
                                     title='dbtrace Objects',
                                     iconName='dbtrace Objects')

        # Filtering information goes above all of the traces. This doesn't
        # have to be rebuilt when the traces change.
        DBTRACE_FRAME = cmds.formLayout(DBTRACE_FRAME)

        # First half of the DBTRACE_FRAME, fixed for all content
        DBTRACE_FILTERS = cmds.rowLayout(DBTRACE_FILTERS,
                                         rowAttach=[(1, 'both', 0)],
                                         numberOfColumns=6,
                                         adjustableColumn=2,
                                         columnAlign=[
                                             (1, 'right'), (2, 'left'),
                                             (3, 'center'), (4, 'left'),
                                             (5, 'center'), (6, 'left')
                                         ],
                                         columnAttach=[(col, 'both', 0)
                                                       for col in range(1, 7)])
        #
        cmds.text(label=maya.stringTable['y_dbtrace_ui.kFilter'])
        DBTRACE_FILTER_TEXT = cmds.textField(
            DBTRACE_FILTER_TEXT,
            text=filter_text,
            alwaysInvokeEnterCommandOnReturn=True,
            annotation=maya.stringTable['y_dbtrace_ui.kShowFilterInfo'])
        cmds.textField(
            DBTRACE_FILTER_TEXT,
            edit=True,
            enterCommand='maya.debug.dbtrace_ui.dbtrace_filter_change("{}")'.
            format(DBTRACE_FILTER_TEXT))
        #
        cmds.separator(style='single')  #------------------------------
        #
        DBTRACE_SHOW_DISABLED = cmds.checkBox(
            DBTRACE_SHOW_DISABLED,
            value=show_disabled,
            label=maya.stringTable['y_dbtrace_ui.kShowOff'],
            annotation=maya.stringTable['y_dbtrace_ui.kShowOffInfo'],
            onCommand='maya.debug.dbtrace_ui.dbtrace_filter_off_change(True)',
            offCommand='maya.debug.dbtrace_ui.dbtrace_filter_off_change(False)'
        )
        #
        cmds.separator(style='single')  #------------------------------
        #
        DBTRACE_SHOW_ENABLED = cmds.checkBox(
            DBTRACE_SHOW_ENABLED,
            value=show_enabled,
            label=maya.stringTable['y_dbtrace_ui.kShowOn'],
            annotation=maya.stringTable['y_dbtrace_ui.kShowOnInfo'],
            onCommand='maya.debug.dbtrace_ui.dbtrace_filter_on_change(True)',
            offCommand='maya.debug.dbtrace_ui.dbtrace_filter_on_change(False)')
        cmds.setParent('..')

        # Second half of the DBTRACE_FRAME, rebuilds the trace list as a spreadsheet
        DBTRACE_SCROLL = cmds.scrollLayout(DBTRACE_SCROLL, childResizable=True)

        # Now that all elements are in place create the formLayout attachments to
        # keep all of the rows in the right place.
        cmds.formLayout(DBTRACE_FRAME,
                        edit=True,
                        attachControl=[(DBTRACE_SCROLL, 'top', 5,
                                        DBTRACE_FILTERS)],
                        attachForm=[(DBTRACE_FILTERS, 'top', 0),
                                    (DBTRACE_FILTERS, 'left', 0),
                                    (DBTRACE_FILTERS, 'right', 0),
                                    (DBTRACE_SCROLL, 'left', 0),
                                    (DBTRACE_SCROLL, 'right', 0),
                                    (DBTRACE_SCROLL, 'bottom', 0)])
    else:
        # If the window exists clear out the scrolling content to be rebuilt.
        # It's not the most efficient way of doing it but it's simple.
        #
        if cmds.rowColumnLayout(DBTRACE_CONTENT, query=True, exists=True):
            cmds.deleteUI(DBTRACE_CONTENT)
        #
        # Read in the filtering options from the UI elements
        #
        filter_text = cmds.textField(DBTRACE_FILTER_TEXT,
                                     query=True,
                                     text=True)
        show_disabled = cmds.checkBox(DBTRACE_SHOW_DISABLED,
                                      query=True,
                                      value=True)
        show_enabled = cmds.checkBox(DBTRACE_SHOW_ENABLED,
                                     query=True,
                                     value=True)

    # The frame is the piece that is constant. Attach to it.
    cmds.setParent(DBTRACE_SCROLL)

    # Table is one row per trace object
    DBTRACE_CONTENT = cmds.rowColumnLayout(DBTRACE_CONTENT,
                                           numberOfColumns=4,
                                           columnAlign=[
                                               (1, 'left'), (2, 'left'),
                                               (3, 'left'), (4, 'left')
                                           ],
                                           columnSpacing=[(1, 10), (2, 10),
                                                          (3, 10), (4, 10)])
    cmds.text(label=maya.stringTable['y_dbtrace_ui.kTrace'],
              font='boldLabelFont')
    cmds.text(label=maya.stringTable['y_dbtrace_ui.kOutput'],
              font='boldLabelFont')
    cmds.text(label=maya.stringTable['y_dbtrace_ui.kShow'],
              font='boldLabelFont')
    cmds.text(label=maya.stringTable['y_dbtrace_ui.kDescription'],
              font='boldLabelFont')
    cmds.separator(style='in')
    cmds.separator(style='in')
    cmds.separator(style='in')
    cmds.separator(style='in')

    # Gather all trace objects (they're either on or off)
    trace_names_on = cmds.dbtrace(query=True)
    trace_names_off = cmds.dbtrace(query=True, off=True)

    # Figure out which trace elements to show based on the enabled/disabled filters
    trace_states_to_show = []
    if show_enabled:
        trace_states_to_show += [True]
    if show_disabled:
        trace_states_to_show += [False]

    # Convert the UI names of the traces to (name,level,enable_state) tuples
    trace_objects = []
    for trace_status in trace_states_to_show:
        for trace_object in [trace_names_off, trace_names_on][trace_status]:

            # If there's a text filter on then skip anything not matching it.
            # The filter is on the combined name, including the level where
            # it is applicable.
            if filter_text is not None and len(filter_text) > 0:
                # Use a regex to keep the filter more general
                if not re.search(filter_text, trace_object):
                    continue

            # Split the combined trace name NAME[LEVEL]. When LEVEL isn't
            # specified it's irrelevant and so ignored.
            trace_match = RE_TRACE_NAME.search(trace_object)
            if trace_match:
                trace_name = trace_match.group(1)
                trace_level = int(trace_match.group(2))
            else:
                trace_name = trace_object
                trace_level = 0
# In customer builds the traces with levels > 0 are not active
            if trace_level > 0:
                continue

            trace_objects.append((trace_name, trace_level, trace_status))

    # Create one line per trace object
    for (trace_object, trace_level, trace_state) in trace_objects:
        trace_name = __trace_ui_name(trace_object, trace_level)

        output = cmds.dbtrace(keyword=trace_object,
                              level=trace_level,
                              query=True,
                              output=True)[1]
        info = cmds.dbtrace(keyword=trace_object,
                            level=trace_level,
                            query=True,
                            info=True)[0]

        # Column 1 - Enable/disable checkbox (editable)
        enable_widget = cmds.checkBox(value=trace_state,
                                      label=trace_name,
                                      annotation=str(info))
        cmds.checkBox(
            enable_widget,
            edit=True,
            onCommand=
            'maya.debug.dbtrace_ui.dbtrace_enable_change("{}","{}",{},True)'.
            format(enable_widget, trace_object, trace_level),
            offCommand=
            'maya.debug.dbtrace_ui.dbtrace_enable_change("{}","{}",{},False)'.
            format(enable_widget, trace_object, trace_level))

        # Column 2 - Output location for trace (editable)
        output_field = cmds.textField(text=str(output),
                                      alwaysInvokeEnterCommandOnReturn=True,
                                      width=200)
        cmds.textField(
            output_field,
            edit=True,
            enterCommand=
            'maya.debug.dbtrace_ui.dbtrace_output_change("{}",{}, "{}")'.
            format(trace_object, trace_level, output_field))

        # Column 3 - "Show" button, only enabled if the output file exists
        enabled = True
        if not os.path.isfile(output):
            enabled = False

        cmds.button(
            label='Show',
            enable=enabled,
            command='maya.debug.dbtrace_ui.dbtrace_show_output("{}","{}")'.
            format(trace_object, output))

        # Column 4 - Description of trace (fixed)
        cmds.text(label=str(info))

    if len(trace_objects) == 0:
        cmds.text(label='No trace objects pass the filter',
                  font='obliqueLabelFont')

    cmds.showWindow(DBTRACE_WINDOW)
Пример #47
0
 def customUI(self):
     self.widgets["ribbonNameTFG"] = cmds.textFieldGrp(l="Ribbon Rig Name",
                                                       cal=[(1, "left"),
                                                            (2, "left")],
                                                       cw=[(1, 100),
                                                           (2, 200)],
                                                       tx="ribbon")
     cmds.separator(h=10, style="single")
     self.widgets["jointsIFG"] = cmds.intFieldGrp(
         l="Number of Jnts (3 min)",
         cal=([1, "left"]),
         cw=([1, 125], [2, 100]),
         v1=5)
     self.widgets["axis"] = cmds.radioButtonGrp(l="Ribbon Ctrl Axis",
                                                nrb=3,
                                                l1="x",
                                                l2="y",
                                                l3="z",
                                                cal=([1, "left"]),
                                                cw=([1, 125], [2,
                                                               50], [3,
                                                                     50]),
                                                sl=2,
                                                en=True)
     self.widgets["fkSetupCB"] = cmds.checkBox(l="Setup FK Controls", v=1)
     self.widgets["heightFFG"] = cmds.floatFieldGrp(l="Ribbon Height",
                                                    cal=[(1, "left"),
                                                         (2, "left")],
                                                    cw=[(1, 125), (2, 100)],
                                                    v1=10.0)
     self.widgets["ratioFFG"] = cmds.floatFieldGrp(l="Heigth/width Ratio",
                                                   cal=[(1, "left"),
                                                        (2, "left")],
                                                   cw=[(1, 125), (2, 100)],
                                                   v1=5)
     #create a slider for where we want the middle piece of the ribbon
     self.widgets["centerPosFSG"] = cmds.floatSliderGrp(
         l="Center Ctrl Position",
         f=True,
         cal=[(1, "left"), (2, "left"), (3, "left")],
         cw=[(1, 125), (2, 50), (3, 200)],
         min=0,
         max=1,
         fmn=0,
         fmx=1,
         v=0.5,
         pre=3)
     #option for making (or not) control structure
     #-------option to use my own surface?
     self.widgets["existingGeoCB"] = cmds.checkBox(
         l="Use existing nurbs curve", v=0, cc=self.geoEnable)
     #this will reveal text field grp w button
     #checking and unchecking will activate options (and deactivate)
     self.widgets["geoTFBG"] = cmds.textFieldButtonGrp(l="Select Geometry",
                                                       bl="<<<",
                                                       en=False,
                                                       cal=[(1, "left"),
                                                            (2, "left"),
                                                            (3, "left")],
                                                       cw=[(1, 100),
                                                           (2, 250),
                                                           (3, 50)],
                                                       bc=self.getGeo)
     self.widgets["directionRBG"] = cmds.radioButtonGrp(l="Along U or V?",
                                                        nrb=2,
                                                        l1="u",
                                                        l2="v",
                                                        cal=[(1, "left"),
                                                             (2, "left")],
                                                        cw=[(1, 100),
                                                            (2, 50),
                                                            (3, 50)],
                                                        sl=2,
                                                        en=False)
Пример #48
0
def distributeObject():
    if cmds.window('Distribution', ex=True):
        cmds.deleteUI('Distribution')
    cmds.window('Distribution', w=300, h=400)
    cmds.rowLayout(nc=2)
    cmds.columnLayout()
    cmds.rowLayout(nc=2)
    cmds.textFieldGrp('Distribution_StartPointReference',
                      l='StartPoint',
                      w=400)
    cmds.button('Distribution_Start_Button', l='<<<', w=100)
    cmds.setParent(u=True)
    cmds.rowLayout(nc=2)
    cmds.textFieldGrp('Distribution_EndPointReference', l='EndPoint', w=400)
    cmds.button('Distribution_End_Button', l='<<<', w=100)
    cmds.setParent(u=True)

    txField = cmds.floatFieldGrp(l='TranslateX', nf=2, v1=0, v2=0)
    tyField = cmds.floatFieldGrp(l='TranslateY', nf=2, v1=0, v2=0)
    tzField = cmds.floatFieldGrp(l='TranslateZ', nf=2, v1=0, v2=0)
    rxField = cmds.floatFieldGrp(l='RotateX', nf=2, v1=0, v2=0)
    ryField = cmds.floatFieldGrp(l='RotateY', nf=2, v1=0, v2=0)
    rzField = cmds.floatFieldGrp(l='RotateZ', nf=2, v1=0, v2=0)
    sxField = cmds.floatFieldGrp(l='ScaleX', nf=2, v1=1, v2=1)
    syField = cmds.floatFieldGrp(l='ScaleY', nf=2, v1=1, v2=1)
    szField = cmds.floatFieldGrp(l='ScaleZ', nf=2, v1=1, v2=1)
    seedField = cmds.intSliderGrp(l='Seed', field=True, min=0, max=65535)
    cmds.setParent(u=True)

    cmds.columnLayout()
    cmds.radioCollection()
    cmds.radioButton('Distribution_Linear_Switch', l='Linear', sl=True)
    cmds.radioButton('Distribution_Random_Switch', l='Random')
    cmds.separator(h=60, style='none')
    cmds.radioCollection()
    cmds.radioButton('Distribution_Uniform_Scale', l='Uniform', sl=True)
    cmds.radioButton('Distribution_Solo_Scale', l='Solo')
    cmds.setParent(u=True)
    cmds.showWindow('Distribution')

    fieldList = [
        txField, tyField, tzField, rxField, ryField, rzField, sxField, syField,
        szField, seedField
    ]
    cmds.floatFieldGrp(txField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(tyField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(tzField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(rxField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(ryField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(rzField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(sxField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(syField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.floatFieldGrp(szField,
                       e=True,
                       cc=lambda *args: transformObjects(fieldList))
    cmds.intSliderGrp(seedField,
                      e=True,
                      cc=lambda *args: transformObjects(fieldList))
    cmds.radioButton('Distribution_Uniform_Scale',
                     e=True,
                     cc=lambda *args: transformObjects(fieldList))
    cmds.radioButton('Distribution_Solo_Scale',
                     e=True,
                     cc=lambda *args: transformObjects(fieldList))
    cmds.radioButton('Distribution_Linear_Switch',
                     e=True,
                     cc=lambda *args: transformObjects(fieldList))
    cmds.radioButton('Distribution_Random_Switch',
                     e=True,
                     cc=lambda *args: transformObjects(fieldList))
    cmds.button('Distribution_Start_Button',
                e=True,
                c=lambda *args: startPointReferenceButtonAction(fieldList))
    cmds.button('Distribution_End_Button',
                e=True,
                c=lambda *args: endPointReferenceButtonAction(fieldList))
def createUI():
    global win
    global colorField
    global temperatureField
    global intensityField
    global subdivsField
    global skp
    global sskp
    global noDecayBox
    global doubleSidedBox
    global radiusField
    global sphereSegmentsField
    global rayDistanceField
    
    win="multiLightWin"
    if cmds.window(win,exists=True):
        deleteWindow()
       
    myWindow=cmds.window(win,title="VRay Multiple Light v1.0",resizeToFitChildren=True,sizeable=True,maximizeButton=True,minimizeButton=True)    
    
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
     
    cmds.separator( height=15, style='in')
    
    cmds.frameLayout( label='Common Attributes',  bgc=(0.341,0.341,0.341), collapsable=True)
    
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    cmds.checkBox(label="Enabled",onCommand=("enabled(True)"),offCommand=("enabled(False)"), value=True)
    
    cmds.separator( height=15, style='in')
    
    cmds.radioButtonGrp(label="Color Mode",numberOfRadioButtons=2, width=266, labelArray2=["color","temperature"], changeCommand1="setColorMode(False)",changeCommand2="setColorMode(True)",select=1,adjustableColumn=True,columnAlign=(1,"left"))
    
    cmds.separator( height=15, style='in')
    
    colorField=cmds.colorSliderGrp(label="Color",width=266,hsv=(360,0,0.700),changeCommand=setColor,dragCommand=setColor,adjustableColumn=True,columnAlign=(1,"left"))
    
    temperatureField=cmds.floatSliderGrp(label="Temperature",field=True,width=266, minValue=1000, maxValue=10000, fieldMinValue=1000, fieldMaxValue=30000,dragCommand=setTemperature,changeCommand=setTemperature,value=6500, precision=3, enable=False,adjustableColumn=True,columnAlign=(1,"left"))
        
    intensityField=cmds.floatSliderGrp(label="Intensity",field=True,width=266, minValue=0, maxValue=100, fieldMinValue=0, fieldMaxValue=1000000000,dragCommand=setIntensity,changeCommand=setIntensity,value=30, precision=3,adjustableColumn=True,columnAlign=(1,"left"))
    
    subdivsField=cmds.intSliderGrp(label="Subdivs",field=True,width=266, minValue=1, maxValue=32, fieldMinValue=1, fieldMaxValue=1000000000,dragCommand=setSubdivs,changeCommand=setSubdivs,value=8,adjustableColumn=True,columnAlign=(1,"left"))

    cmds.separator( height=15, style='in')
    
    noDecayBox=cmds.checkBox(label="No Decay",onCommand=("noDecay(True)"),offCommand=("noDecay(False)"))
    #doubleSidedBox=cmds.checkBox(label="Double Sided",onCommand=("doubleSided(True)"),offCommand=("doubleSided(False)"))
    cmds.checkBox(label="Invisible",onCommand=("invisible(True)"),offCommand=("invisible(False)"))
    #skp=cmds.checkBox(label="Skylight Portal",onCommand=("skylightPortal(True)"),offCommand=("skylightPortal(False)"))
    #sskp=cmds.checkBox(label="Simple Skylight Portal",onCommand=("simpleSkylightPortal(True)"),offCommand=("simpleSkylightPortal(False)"),enable=False) 
    cmds.checkBox(label="Store With Irradiance Map",onCommand=("storeWithIrradianceMap(True)"),offCommand=("storeWithIrradianceMap(False)")) 
    
    cmds.separator( height=12, style='in')
    
    cmds.checkBox(label="Affect Diffuse",onCommand=("affectDiffuse(True)"),offCommand=("affectDiffuse(False)"), value=True)
    cmds.checkBox(label="Affect Specular",onCommand=("affectSpecular(True)"),offCommand=("affectSpecular(False)"), value=True)
    cmds.checkBox(label="Affect Reflections",onCommand=("affectReflections(True)"),offCommand=("affectReflections(False)"), value=True)
    cmds.checkBox(label="Shadows",onCommand=("shadows(True)"),offCommand=("shadows(False)"), value=True)
    cmds.separator( height=15, style='in')
    
    cmds.setParent("..")
    cmds.setParent("..")
    cmds.setParent("..")
     
    cmds.frameLayout(label='Individual Attributes',backgroundColor=(0.341,0.341,0.341), collapsable=True,collapse=True)
    cmds.scrollLayout(height=200,childResizable=True)    
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    cmds.frameLayout( label='VRayLightSphere',backgroundColor=(0.341,0.341,0.341), collapsable=True)
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    radiusField=cmds.floatSliderGrp(label="Radius",field=True,width=266, minValue=0, maxValue=10, fieldMinValue=0, fieldMaxValue=1000000000,value=1, precision=3,dragCommand=setRadius,changeCommand=setRadius,adjustableColumn=True,columnAlign=(1,"left"))
    sphereSegmentsField=cmds.intSliderGrp(label="Sphere Segments",field=True,width=266, minValue=3, maxValue=64, fieldMinValue=1, fieldMaxValue=1000000000,value=20,dragCommand=setSphereSegments,changeCommand=setSphereSegments,adjustableColumn=True,columnAlign=(1,"left"))
        
    cmds.separator( height=15, style='in')
    
    cmds.setParent("..")
    cmds.setParent("..")
    
    cmds.frameLayout( label='VRayLightDome',backgroundColor=(0.341,0.341,0.341), collapsable=True)
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    cmds.checkBox(label="Dome Spherical",onCommand=("domeSpherical(True)"),offCommand=("domeSpherical(False)"))
    cmds.checkBox(label="Use Ray Distance",onCommand=("useRayDistance(True)"),offCommand=("useRayDistance(False)"))
    rayDistanceField=cmds.floatSliderGrp(label="Ray Distance",field=True,width=266,enable=False, minValue=0, maxValue=100000, fieldMinValue=0, fieldMaxValue=1000000000,value=100000,dragCommand=setRayDistance,changeCommand=setRayDistance,precision=3,adjustableColumn=True,columnAlign=(1,"left"))
    
    cmds.separator( height=15, style='in')
    
    cmds.setParent("..")
    cmds.setParent("..")
    
    cmds.frameLayout( label='VRayLightRect',backgroundColor=(0.341,0.341,0.341), collapsable=True)
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    doubleSidedBox=cmds.checkBox(label="Double Sided",onCommand=("doubleSided(True)"),offCommand=("doubleSided(False)"))
    skp=cmds.checkBox(label="Skylight Portal",onCommand=("skylightPortal(True)"),offCommand=("skylightPortal(False)"))
    sskp=cmds.checkBox(label="Simple Skylight Portal",onCommand=("simpleSkylightPortal(True)"),offCommand=("simpleSkylightPortal(False)"),enable=False)
    
    cmds.separator( height=15, style='in')
    
    cmds.setParent("..")
    cmds.setParent("..")
    
    cmds.frameLayout( label='VRayLightIES',backgroundColor=(0.341,0.341,0.341), collapsable=True)
    cmds.columnLayout(adjustableColumn=True,rowSpacing=2,columnAttach=("both",8))
    
    cmds.checkBox(label="Area Speculars",onCommand=("areaSpeculars(True)"),offCommand=("areaSpeculars(False)"), value=True)
    #skp=cmds.checkBox(label="Skylight Portal",onCommand=("skylightPortal(True)"),offCommand=("skylightPortal(False)"))
    #sskp=cmds.checkBox(label="Simple Skylight Portal",onCommand=("simpleSkylightPortal(True)"),offCommand=("simpleSkylightPortal(False)"),enable=False)
    
    #cmds.separator( height=15, style='in')
    
    cmds.setParent("..")
    cmds.setParent("..")
    
    cmds.setParent("..")
    cmds.setParent("..")
    
    cmds.setParent("..")
    
    cmds.separator( height=15, style='in')
    
    cmds.columnLayout(adjustableColumn=True,columnAttach=("both",80))    
    cmds.button(label="close",align="center", command=deleteWindow)
    cmds.setParent("..")
   
    cmds.separator( height=15, style='in')
    
    cmds.showWindow(myWindow)
Пример #50
0
def separator():
	cmds.separator(style="in", w=275, h=10)
Пример #51
0
def dbtrace_show_output(trace_object, output_file):
    """
    Button command to open up a window displaying the current trace output.

    output_file: Name of the file to show
    """
    global DBTRACE_OUTPUT_FILTER
    global DBTRACE_OUTPUT_FRAME
    global DBTRACE_OUTPUT_WINDOW
    global DBTRACE_OUTPUT_TEXT
    global DBTRACE_OUTPUT_CONTENT

    reload_command = 'maya.debug.dbtrace_ui.dbtrace_show_output("{}","{}")'.format(
        trace_object, output_file)
    filter_data = ''

    # Build the window components if they don't already exist
    if not cmds.window(DBTRACE_OUTPUT_WINDOW, exists=True):
        DBTRACE_OUTPUT_WINDOW = cmds.window(DBTRACE_OUTPUT_WINDOW)

        DBTRACE_OUTPUT_FRAME = cmds.formLayout(DBTRACE_OUTPUT_FRAME)

        # Section 1, the controls
        top_row = cmds.rowLayout(rowAttach=[(1, 'both', 0)],
                                 numberOfColumns=4,
                                 adjustableColumn=4,
                                 columnAlign=[(1, 'center'), (2, 'center'),
                                              (3, 'right'), (4, 'left')],
                                 columnAttach=[(1, 'both', 0), (2, 'both', 0),
                                               (3, 'both', 0), (4, 'both', 0)])
        cmds.button('Refresh', command=reload_command)
        cmds.separator(style='single')
        cmds.text(label=maya.stringTable['y_dbtrace_ui.kOutputHighlight'])
        DBTRACE_OUTPUT_FILTER = cmds.textField(
            DBTRACE_OUTPUT_FILTER,
            text='',
            alwaysInvokeEnterCommandOnReturn=True,
            annotation=maya.stringTable['y_dbtrace_ui.kShowOutputFilterInfo'])
        cmds.textField(DBTRACE_OUTPUT_FILTER,
                       edit=True,
                       enterCommand=reload_command)
        cmds.setParent('..')

        # Section 2, the file content
        DBTRACE_OUTPUT_CONTENT = cmds.scrollLayout(DBTRACE_OUTPUT_CONTENT,
                                                   childResizable=True)
        DBTRACE_OUTPUT_TEXT = cmds.textScrollList(DBTRACE_OUTPUT_TEXT,
                                                  numberOfRows=1,
                                                  allowMultiSelection=True,
                                                  append=['Temporary text'])

        cmds.formLayout(DBTRACE_OUTPUT_FRAME,
                        edit=True,
                        attachControl=[(DBTRACE_OUTPUT_CONTENT, 'top', 5,
                                        top_row)],
                        attachForm=[(top_row, 'top', 0), (top_row, 'left', 0),
                                    (top_row, 'right', 0),
                                    (DBTRACE_OUTPUT_CONTENT, 'left', 0),
                                    (DBTRACE_OUTPUT_CONTENT, 'right', 0),
                                    (DBTRACE_OUTPUT_CONTENT, 'bottom', 0)])
    else:
        filter_data = cmds.textField(DBTRACE_OUTPUT_FILTER,
                                     query=True,
                                     text=True)

    # Populate the window components with the current trace output
    cmds.window(DBTRACE_OUTPUT_WINDOW,
                edit=True,
                title='dbtrace Output for {} in {}'.format(
                    trace_object, output_file),
                iconName='dbtrace Output')

    cmds.setParent(DBTRACE_OUTPUT_CONTENT)

    # From the contents of the file construct three synchronized arrays of
    # descriptive elements, one per line:
    #       line_id:     Unique ID of the for selection purposes
    #       line_text:   Contents of the line
    #       line_select: True|False saying whether it matched the filter data or not
    try:
        output_fd = open(output_file, 'r')
        line_number = 0
        line_id = []
        line_text = []
        line_select = []
        for line in output_fd:
            line_number += 1
            this_id = 'line{}'.format(line_number)
            line_id.append(this_id)
            line_text.append(line.rstrip())
            if filter_data != '' and re.search(filter_data, line) is not None:
                line_select.append(this_id)
        output_fd.close()
    except Exception:
        line_id = ['line0']
        line_text = ['...File not found...']
        line_select = []

    cmds.textScrollList(DBTRACE_OUTPUT_TEXT, edit=True, removeAll=True)
    cmds.textScrollList(DBTRACE_OUTPUT_TEXT,
                        edit=True,
                        numberOfRows=len(line_text),
                        append=line_text,
                        uniqueTag=line_id,
                        selectUniqueTagItem=line_select)
    cmds.showWindow()
Пример #52
0
    def __init__(self):
        # Setup the scene the Turbine way
        utils.sceneSetup(self)
        """ Dict for UIElements """
        self.UIElements = {}

        self.rigFiles = {}
        self.rigs = {}
        self.setupFile = {}
        self.rigFile = {}
        self.characterNamespace = {}
        self.setupDir = {}
        self.characterName = {}

        refUtils = referenceUtils.Reference_Utils()

        self.rigFiles['rigFiles'] = refUtils.findRigs()[0]
        self.rigs['rigs'] = refUtils.findRigs()[1]
        print self.rigFiles['rigFiles']
        print self.rigs['rigs']

        print self.rigs['rigs']
        """ If the window exists, delete it. """
        if cmds.window("charRefWindow", exists=True):
            cmds.deleteUI("charRefWindow")

        self.windowWidth = 420
        self.windowHeight = 300

        fieldWidth = (self.windowWidth - 10)
        fieldHeight = (self.windowHeight - 60)
        self.buttonWidth = fieldWidth

        columnOffset = 5
        buttonColumnWidth = self.buttonWidth + (2 * columnOffset)
        textScrollWidth = (self.windowWidth - buttonColumnWidth)

        # Create the main window
        mainWindow = self.UIElements["window"] = cmds.window(
            "charRefWindow",
            width=self.windowWidth,
            height=self.windowHeight,
            s=True)

        # Create a couple flow layouts to hold the UI Elements for setup tools
        self.UIElements["buttonColumnLayout"] = cmds.flowLayout(
            h=self.windowHeight, v=True)

        self.UIElements["rigList"] = cmds.textScrollList(
            numberOfRows=20,
            allowMultiSelection=False,
            append=self.rigs['rigs'],
            width=fieldWidth,
            h=fieldHeight,
            fn="boldLabelFont",
            dcc=self.getFileForReference)

        cmds.separator(height=5, style='in')

        self.UIElements['button'] = cmds.button(label='Reference Character',
                                                width=self.buttonWidth,
                                                c=self.setupPicker_UI)

        cmds.setParent(self.UIElements["buttonColumnLayout"])

        cmds.showWindow(self.UIElements["window"])
Пример #53
0
def translatorOptions(parent, action, initialSettings, resultCallback):
    defaults = {
        "activeCamera": "<Current>",
        "exportAnim": False,
        "startFrame": 1,
        "endFrame": 100,
        "stepFrame": 1
    }

    createGlobalNodes()

    if initialSettings:
        logger.debug("Parsing initial translator settings %s" %
                     initialSettings)

        opts = initialSettings.split(";")
        for opt in opts:
            opt = opt.strip()

            if opt == "":
                continue

            name, value = opt.split("=")
            if name in defaults:
                if isinstance(defaults[name], basestring):
                    defaults[name] = value
                elif isinstance(defaults[name], bool):
                    defaults[name] = bool(value)
                elif isinstance(defaults[name], int):
                    defaults[name] = int(value)
                else:
                    logger.warning("Unhandled param %s in translator options" %
                                   name)

    if action == "post":
        mc.setParent(parent)
        mc.setUITemplate("DefaultTemplate", pushTemplate=True)
        mc.columnLayout(adj=True)

        mc.optionMenuGrp("as_exportOpts_activeCamera", label="Render camera")
        mc.menuItem(label='<Current>', divider=True)
        for camera in mc.ls(type='camera'):
            if mc.getAttr(camera + '.orthographic'):
                continue
            if not mc.getAttr(camera + ".renderable"):
                continue

            mc.menuItem(label=camera)

        mc.separator(style="single")

        def exportAnimChanged(value):
            mc.intSliderGrp("as_exportOpts_startFrame",
                            edit=True,
                            enable=value)

            mc.intSliderGrp("as_exportOpts_endFrame", edit=True, enable=value)

            mc.intSliderGrp("as_exportOpts_stepFrame", edit=True, enable=value)

        exportAnim = defaults["exportAnim"]
        mc.checkBoxGrp("as_exportOpts_exportAnim",
                       numberOfCheckBoxes=1,
                       label=" ",
                       label1="Animation",
                       cc=exportAnimChanged,
                       value1=exportAnim)

        mc.intSliderGrp("as_exportOpts_startFrame",
                        label="Start:",
                        field=True,
                        min=1,
                        max=1000,
                        enable=exportAnim,
                        value=defaults["startFrame"])

        mc.intSliderGrp("as_exportOpts_endFrame",
                        label="End:",
                        field=True,
                        min=1,
                        max=1000,
                        enable=exportAnim,
                        value=defaults["endFrame"])

        mc.intSliderGrp("as_exportOpts_stepFrame",
                        label="Step:",
                        field=True,
                        min=1,
                        max=100,
                        enable=exportAnim,
                        value=defaults["stepFrame"])

    elif action == "query":
        options = ""

        value = mc.optionMenuGrp("as_exportOpts_activeCamera",
                                 query=True,
                                 value=True)

        # Replace current by the active camera.
        if value == "<Current>":
            if om.MGlobal.mayaState() == om.MGlobal.kInteractive:
                camera = om.MDagPath()
                omui.M3dView.active3dView().getCamera(camera)

                if mc.getAttr(camera.partialPathName() + ".renderable"):
                    value = camera.partialPathName()
                else:
                    logger.warning("Active camera not renderable. Ignoring.")
                    value = ""
            else:
                logger.warning("Active camera specified for maya batch.")
                value = ""

        if value:
            options += "activeCamera=" + value + ";"

        exportAnim = mc.checkBoxGrp("as_exportOpts_exportAnim",
                                    query=True,
                                    value1=True)
        if exportAnim:
            options += "exportAnim=true;"

            value = mc.intSliderGrp("as_exportOpts_startFrame",
                                    query=True,
                                    value=True)
            options += "startFrame=" + str(value) + ";"

            value = mc.intSliderGrp("as_exportOpts_endFrame",
                                    query=True,
                                    value=True)
            options += "endFrame=" + str(value) + ";"

            value = mc.intSliderGrp("as_exportOpts_stepFrame",
                                    query=True,
                                    value=True)
            options += "stepFrame=" + str(value) + ";"

        logger.debug("calling translator callback, options = %s" % options)
        mel.eval('%s "%s"' % (resultCallback, options))
Пример #54
0
def locatorSurfaceUI():
    '''
	UI for locatorSurface()
	'''
    # Window
    window = 'locatorSurfaceUI'
    if mc.window(window, q=True, ex=1): mc.deleteUI(window)
    window = mc.window(window, t='Locator Surface')
    # Layout
    FL = mc.formLayout(numberOfDivisions=100)
    # UI Elements
    #---
    # Surface
    surfaceTFB = mc.textFieldButtonGrp('locatorSurfaceTFB',
                                       label='Source Surface',
                                       text='',
                                       buttonLabel='Load Selected')
    # Prefix
    prefixTFG = mc.textFieldGrp('locatorSurfacePrefixTFG',
                                label='Prefix',
                                text='')
    # Scale
    scaleFSG = mc.floatSliderGrp('locatorSurfaceScaleFSG',
                                 label='Locator Scale',
                                 field=True,
                                 minValue=0.0,
                                 maxValue=1.0,
                                 fieldMinValue=0.0,
                                 fieldMaxValue=10.0,
                                 value=0.75,
                                 pre=3)
    # Use Control Points
    useCvCBG = mc.checkBoxGrp('locatorSurfaceUseCvCBG',
                              l='Specify CVs',
                              ncb=1,
                              v1=False)

    # Control Points layout
    cvFrameL = mc.frameLayout('locatorSurfaceCvFL',
                              l='Control Points',
                              cll=0,
                              en=0)
    cvFormL = mc.formLayout(numberOfDivisions=100)
    controlPointTSL = mc.textScrollList('locatorSurfaceCpTSL',
                                        numberOfRows=8,
                                        allowMultiSelection=True)
    # TSL Buttons
    cvAddB = mc.button('locatorSurfaceAddCvB',
                       l='Add',
                       c='glTools.ui.utils.addCvsToTSL("' + controlPointTSL +
                       '")',
                       en=False)
    cvRemB = mc.button('locatorSurfaceRemCvB',
                       l='Remove',
                       c='glTools.ui.utils.removeFromTSL("' + controlPointTSL +
                       '")',
                       en=False)

    mc.setParent('..')
    mc.setParent('..')

    # Separator
    SEP = mc.separator(height=10, style='single')
    # Buttons
    createB = mc.button('locatorSurfaceCreateB',
                        l='Create',
                        c='glTools.ui.surface.locatorSurfaceFromUI()')
    cancelB = mc.button('locatorSurfaceCancelB',
                        l='Cancel',
                        c='mc.deleteUI("' + window + '")')

    # UI callback commands
    mc.textFieldButtonGrp(surfaceTFB,
                          e=True,
                          bc='glTools.ui.utils.loadSurfaceSel("' + surfaceTFB +
                          '","' + prefixTFG + '")')
    mc.checkBoxGrp('locatorSurfaceUseCvCBG',
                   e=True,
                   cc='glTools.ui.utils.checkBoxToggleLayout("' + useCvCBG +
                   '","' + cvFrameL + '")')

    # Form Layout - MAIN
    mc.formLayout(FL,
                  e=True,
                  af=[(surfaceTFB, 'top', 5), (surfaceTFB, 'left', 5),
                      (surfaceTFB, 'right', 5)])
    mc.formLayout(FL, e=True, ac=[(prefixTFG, 'top', 5, surfaceTFB)])
    mc.formLayout(FL,
                  e=True,
                  af=[(prefixTFG, 'left', 5), (prefixTFG, 'right', 5)])
    mc.formLayout(FL, e=True, ac=[(scaleFSG, 'top', 5, prefixTFG)])
    mc.formLayout(FL,
                  e=True,
                  af=[(scaleFSG, 'left', 5), (scaleFSG, 'right', 5)])
    mc.formLayout(FL, e=True, ac=[(useCvCBG, 'top', 5, scaleFSG)])
    mc.formLayout(FL, e=True, af=[(useCvCBG, 'left', 5)])
    mc.formLayout(FL, e=True, ac=[(cvFrameL, 'top', 5, useCvCBG)])
    mc.formLayout(FL,
                  e=True,
                  af=[(cvFrameL, 'left', 5), (cvFrameL, 'right', 5)])
    mc.formLayout(FL, e=True, ac=[(cvFrameL, 'bottom', 5, SEP)])
    mc.formLayout(FL, e=True, ac=[(SEP, 'bottom', 5, createB)])
    mc.formLayout(FL, e=True, af=[(SEP, 'left', 5), (SEP, 'right', 5)])
    mc.formLayout(FL, e=True, ac=[(createB, 'bottom', 5, cancelB)])
    mc.formLayout(FL, e=True, af=[(createB, 'left', 5), (createB, 'right', 5)])
    mc.formLayout(FL,
                  e=True,
                  af=[(cancelB, 'left', 5), (cancelB, 'right', 5),
                      (cancelB, 'bottom', 5)])

    # Form Layout - Control Points
    mc.formLayout(cvFormL,
                  e=True,
                  af=[(controlPointTSL, 'top', 5),
                      (controlPointTSL, 'left', 5),
                      (controlPointTSL, 'right', 5)])
    mc.formLayout(cvFormL, e=True, ac=[(controlPointTSL, 'bottom', 5, cvAddB)])
    mc.formLayout(cvFormL,
                  e=True,
                  af=[(cvAddB, 'left', 5), (cvAddB, 'bottom', 5)])
    mc.formLayout(cvFormL, e=True, ap=[(cvAddB, 'right', 5, 50)])
    mc.formLayout(cvFormL,
                  e=True,
                  af=[(cvRemB, 'right', 5), (cvRemB, 'bottom', 5)])
    mc.formLayout(cvFormL, e=True, ap=[(cvRemB, 'left', 5, 50)])

    # Show Window
    mc.showWindow(window)
Пример #55
0
def createUI():
    ''' Function to generate the user interface. '''

    windowID = "GUI"
    if mc.window(windowID, exists=True):
        mc.deleteUI(windowID)

    winControl = mc.window(windowID, title='Growth Control', w=100)

    mc.columnLayout(columnAttach=('both', 5),
                    rowSpacing=7,
                    columnWidth=10,
                    adjustableColumn=True)

    mc.rowLayout(nc=3,
                 cat=[(1, 'both', 1), (2, 'both', 10), (3, 'both', 1)],
                 adjustableColumn=2)
    mc.separator()
    scriptPath = os.environ['MAYA_SCRIPT_PATH'].split(";")[0]
    mc.image(image=scriptPath + '/thumbnail.png', h=150)
    mc.separator()
    mc.setParent('..')

    mc.separator()
    mc.text(label="Submeshes Names")
    submeshNamesCtrl = mc.scrollField(editable=True,
                                      wordWrap=True,
                                      text="MeshName",
                                      h=100)
    mc.separator(style='in')

    mc.text(label="Distribution Type")

    alignmentTypeCtrl = mc.radioCollection()
    mc.rowLayout(nc=3, cat=[(1, 'both', 10), (2, 'both', 10), (3, 'both', 10)])
    randomCtrl = mc.radioButton(label='Random',
                                align='center',
                                sl=True,
                                ann='random')
    alignedCtrl = mc.radioButton(label='Aligned', align='center')
    evenCtrl = mc.radioButton(label='Evenly Spaced', align='center')
    mc.setParent('..')
    mc.separator(style='in')

    mc.rowLayout(nc=3, cat=[(1, 'both', 1), (2, 'both', 10), (3, 'both', 1)])
    mc.separator()
    randRotCtrl = mc.checkBox(l='Random Yaw Rotation', v=True)
    mc.separator()
    mc.setParent('..')
    mc.separator(style='in')

    mc.rowLayout(nc=2,
                 cat=[(1, 'left', 5), (2, 'both', 5)],
                 adjustableColumn=2)
    numberText = mc.text("Number of instances")
    numberCtrl = mc.intField(v=100, w=1)
    mc.setParent('..')
    mc.separator(style='in')

    mc.rowLayout(nc=2,
                 cat=[(1, 'left', 5), (2, 'both', 5)],
                 adjustableColumn=2)
    widthText = mc.text("Instances along X-axis", enable=False)
    widthCtrl = mc.intField(v=20, w=1, min=1, max=100, step=1, enable=False)
    mc.setParent('..')
    mc.rowLayout(nc=2,
                 cat=[(1, 'left', 5), (2, 'both', 5)],
                 adjustableColumn=2)
    heightText = mc.text("Instances along Y-axis", enable=False)
    heightCtrl = mc.intField(v=20, w=1, min=1, max=100, step=1, enable=False)
    mc.setParent('..')
    mc.rowLayout(nc=2,
                 cat=[(1, 'left', 5), (2, 'both', 5)],
                 adjustableColumn=2)
    depthText = mc.text("Instances along Z-axis", enable=False)
    depthCtrl = mc.intField(v=20, w=1, min=1, max=100, step=1, enable=False)
    mc.setParent('..')
    mc.separator(style='in')

    mc.rowLayout(nc=3,
                 cat=[(1, 'both', 1), (2, 'both', 10), (3, 'both', 1)],
                 adjustableColumn=2)
    mc.separator()
    animatedCtrl = mc.checkBox(l='Animated Base Mesh', v=False)
    mc.separator()
    mc.setParent('..')
    mc.separator(style='in')

    mc.text(label="Growth Animation Type")

    mc.radioCollection()
    mc.rowLayout(nc=3,
                 cat=[(1, 'both', 10), (2, 'both', 10), (3, 'both', 10)],
                 adjustableColumn=1)
    uniformCtrl = mc.radioButton(label='Uniform', align='center')
    useSphereCtrl = mc.radioButton(label='Sphere Mask',
                                   align='center',
                                   sl=True)
    alongSurfaceCtrl = mc.radioButton(label='Along surface', align='center')
    mc.setParent('..')

    influenceTextCtrl = mc.text(label='Growth Influence Type')
    mc.radioCollection()
    mc.rowLayout(nc=2, cat=[(1, 'left', 10), (2, 'left', 10)])
    insideCtrl = mc.radioButton(label='Inside Sphere', align='center', sl=True)
    outsideCtrl = mc.radioButton(label='Outside Sphere', align='center')
    mc.setParent('..')

    mc.rowLayout(nc=2,
                 cat=[(1, 'left', 5), (2, 'both', 5)],
                 adjustableColumn=2)
    speedTextCtrl = mc.text(label='Submesh growth speed', vis=False)
    speedCtrl = mc.floatField(v=4, vis=False)
    mc.setParent('..')
    mc.separator(style='in')

    mc.rowLayout(nc=5,
                 adjustableColumn5=3,
                 cat=[(1, 'left', 1), (2, 'left', 2), (3, 'both', 5),
                      (4, 'right', 2), (5, 'right', 1)])
    mc.text(label="Start Frame")
    startFrameCtrl = mc.intField(w=60, v=1)
    mc.separator(w=5)
    mc.text(label="End Frame")
    endFrameCtrl = mc.intField(w=60, v=50)
    mc.setParent('..')
    mc.separator(style='in')

    mc.radioButton(randomCtrl,
                   e=True,
                   cc=ft.partial(switchRandomAlignmentSettings, numberText,
                                 numberCtrl))
    mc.radioButton(alignedCtrl,
                   e=True,
                   cc=ft.partial(switchAlignedAlignmentSettings, widthText,
                                 widthCtrl, heightText, heightCtrl, depthText,
                                 depthCtrl))
    mc.radioButton(evenCtrl,
                   e=True,
                   cc=ft.partial(switchRandomAlignmentSettings, numberText,
                                 numberCtrl))
    mc.radioButton(uniformCtrl,
                   e=True,
                   cc=ft.partial(switchInfluenceTypeSettings,
                                 influenceTextCtrl, insideCtrl, outsideCtrl))
    mc.radioButton(useSphereCtrl,
                   e=True,
                   cc=ft.partial(changeInfluenceTypeLabels, insideCtrl,
                                 outsideCtrl, 'Inside Sphere',
                                 'Outside Sphere'))
    mc.radioButton(alongSurfaceCtrl,
                   e=True,
                   cc=ft.partial(changeInfluenceTypeLabelsForAlongSurface,
                                 insideCtrl, outsideCtrl,
                                 'Inwards Towards Sphere',
                                 'Outwards From Sphere', speedTextCtrl,
                                 speedCtrl))

    mc.button(label="Generate, populate and animate!",
              command=ft.partial(populateGenerateAnimate, alignmentTypeCtrl,
                                 randomCtrl, alignedCtrl, evenCtrl,
                                 submeshNamesCtrl, useSphereCtrl,
                                 alongSurfaceCtrl, insideCtrl, startFrameCtrl,
                                 endFrameCtrl, numberCtrl, widthCtrl,
                                 heightCtrl, depthCtrl, animatedCtrl,
                                 speedCtrl, randRotCtrl))

    mc.separator(style='in')

    mc.showWindow(winControl)
import maya.cmds as cmds
import functools

# Creating the interface window by setting the number of columns required, their lengths and placing them in order
myWindow = cmds.window(title='Build Stairs',
                       sizeable=True,
                       resizeToFitChildren=True)
cmds.rowColumnLayout(numberOfColumns=3,
                     columnWidth=[(1, 100), (2, 60), (3, 65)],
                     columnOffset=[(1, 'right', 3)])

# Setting up names of the fields and cells for user input
cmds.text(label='Number of stairs ')
#  Specifing that the field 'Number of stairs' accepts only integer inputs
numberOfStairs = cmds.intField(minValue=1, value=10)
cmds.separator(height=10, style='none')

# Adding spaces between the subsequent rows
cmds.separator(height=10, style='none')
cmds.separator(height=10, style='none')
cmds.separator(height=10, style='none')

cmds.text(label='Size of each step')
cmds.separator(height=10, style='none')
cmds.separator(height=10, style='none')

cmds.text(label='Width ')
width = cmds.intField(minValue=1, value=2)
cmds.separator(height=10, style='none')

cmds.text(label='Height')
Пример #57
0
def uiCreation():

    if cmds.window("main", exists=True):
        cmds.deleteUI("main")

    overUI = cmds.window("main", title=windowName, mxb=False, s=False)
    cmds.window("main", e=True, wh=(10, 10), rtf=True)

    cmds.columnLayout('layout1', rs=4)

    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    cmds.frameLayout('transLayout', l=posScriptLabel)

    cmds.floatSliderGrp("s1",
                        l='Smooth',
                        f=True,
                        min=0.0,
                        max=6.0,
                        fmx=10,
                        v=goalSmooth,
                        cc=('goalSmooth=printSmoothV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Сглаживание позиции 2 до 5 ",
                        el="~1.5")

    cmds.floatSliderGrp("s2",
                        l='Scale',
                        f=True,
                        min=0.0,
                        max=2.0,
                        fmx=10,
                        v=timeScale,
                        cc=('timeScale=printScaleV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Скейл скорости симуляции 0.5 до 1 ",
                        el="~0.3")

    cmds.floatSliderGrp("s3",
                        l='Weight',
                        f=True,
                        min=0.0,
                        max=1.0,
                        v=goalW,
                        cc=('goalW=printWeightV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Сила притяжения частицы 0.5 ",
                        el="~0.5")

    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    cmds.frameLayout("rotLayout", l=rotScriptLabel)

    cmds.floatSliderGrp("s4",
                        l='Smooth',
                        f=True,
                        min=0.0,
                        max=6.0,
                        fmx=10,
                        v=goalSmoothRot,
                        cc=('goalSmoothRot=printRotSmoothV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Сглаживание позиции 2 до 5 ",
                        el="~0.5")

    cmds.floatSliderGrp("s5",
                        l='Scale',
                        f=True,
                        min=0.0,
                        max=2.0,
                        fmx=10,
                        v=timeScaleRot,
                        cc=('timeScaleRot=printRotScaleV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Скейл скорости симуляции 0.5 до 1 ",
                        el="~0.3")

    cmds.floatSliderGrp("s6",
                        l='Weight',
                        f=True,
                        min=0.0,
                        max=1.0,
                        v=goalWRot,
                        cc=('goalWRot=printRotWeightV()'),
                        pre=1,
                        cal=(1, "left"),
                        w=slWidth,
                        ann=" Сила притяжения частицы 0.5 ",
                        el="~0.5")

    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    cmds.frameLayout(
        "buttonLayout",
        l='     ---------------------------------------     BUTTONS')
    cmds.rowColumnLayout(numberOfColumns=3,
                         columnWidth=[(1, 165), (2, 130), (3, 165)])

    cmds.checkBox("checkCyclePos",
                  label="Translation loop",
                  v=cycle,
                  cc=('cycle=checkCyclePos()'))
    cmds.separator(h=buttonHeight / 2, style='none')
    cmds.checkBox("checkCycleRot",
                  label="Rotation loop",
                  v=cycleRot,
                  cc=('cycleRot=checkCycleRot()'))

    cmds.button(label="RUN translation sim",
                command=('translationStart()'),
                bgc=(0.3, 0.85, 1),
                h=buttonHeight)
    cmds.separator(h=buttonHeight / 2, style='none')
    cmds.button(label="RUN rotation sim",
                command=('rotationStart()'),
                bgc=(0.3, 0.85, 1),
                h=buttonHeight)

    cmds.button(label="^^^ RESET translation ^^^",
                command=('print "RESET translation"'),
                bgc=(0.2, 0.6, 0.2),
                h=buttonHeight,
                en=False)
    cmds.button(label="<<< RESET ALL >>>",
                command=('resetValues(); resetSliders()'),
                bgc=(0.6, 1, 0.45),
                h=buttonHeight)
    cmds.button(label="^^^ RESET rotation ^^^",
                command=('print "RESET rotation"'),
                bgc=(0.2, 0.6, 0.2),
                h=buttonHeight,
                en=False)

    cmds.text(l="^^ Translation description ^^", ann=posScriptAnnotation)
    cmds.button(label="!!! DELETE ALL !!!",
                command=('deleteMainLayer()'),
                bgc=(0.9, 0.5, 0.3),
                h=buttonHeight,
                ann="Удаляет главный слой со всеми анимациями оверлаппера")
    cmds.text(l="^^ Rotation description ^^", ann=rotScriptAnnotation)

    #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

    cmds.showWindow(overUI)
Пример #58
0
def create():
    '''
	Mocap Transfer UI.
	'''
    # ============
    # - Build UI -
    # ============

    # Window
    window = 'mocapTransferUI'
    if mc.window(window, q=True, ex=1): mc.deleteUI(window)
    window = mc.window(window, title='Mocap/Anim Transfer', sizeable=True)

    # FormLayout
    FL = mc.formLayout(numberOfDivisions=100)

    # Buttons
    transferB = mc.button(label='Transfer',
                          c='glTools.ui.mocapTransfer.transferFromUI()')
    closeB = mc.button(label='Close', c='mc.deleteUI("' + window + '")')

    # FrameLayout
    mc.setParent(FL)
    rangeLayout = mc.frameLayout(label='Bake Range', borderStyle='in')

    # TabLayout
    mc.setParent(FL)
    tabLayout = mc.tabLayout('mocapXferTabLayout',
                             innerMarginWidth=5,
                             innerMarginHeight=5)

    mc.formLayout(FL,
                  e=True,
                  af=[(closeB, 'left', 5), (closeB, 'right', 5),
                      (closeB, 'bottom', 5)])
    mc.formLayout(FL,
                  e=True,
                  af=[(transferB, 'left', 5), (transferB, 'right', 5)],
                  ac=[(transferB, 'bottom', 5, closeB)])
    mc.formLayout(FL,
                  e=True,
                  af=[(tabLayout, 'left', 5), (tabLayout, 'right', 5),
                      (tabLayout, 'top', 5)])
    mc.formLayout(FL,
                  e=True,
                  af=[(rangeLayout, 'left', 5), (rangeLayout, 'right', 5)],
                  ac=[(rangeLayout, 'top', 5, tabLayout),
                      (rangeLayout, 'bottom', 5, transferB)])

    # ----------------
    # - Range Layout -
    # ----------------

    mc.setParent(rangeLayout)

    # FormLayout
    bakeRangeFL = mc.formLayout(numberOfDivisions=100)

    mocap_rangeCBG = mc.checkBoxGrp('xferMocap_bakeRangeCBG',
                                    label='Specify Bake Range:',
                                    numberOfCheckBoxes=1,
                                    value1=0)
    mocap_startEndIFG = mc.intFieldGrp('xferMocap_startEndCBG',
                                       label='Bake Range Start/End:',
                                       numberOfFields=2,
                                       value1=0,
                                       value2=0,
                                       en=False)
    mocap_staticChanCBG = mc.checkBoxGrp('xferMocap_staticChanCBG',
                                         label='Delete Static Channels:',
                                         numberOfCheckBoxes=1,
                                         value1=0)

    mc.formLayout(bakeRangeFL,
                  e=True,
                  af=[(mocap_rangeCBG, 'left', 5),
                      (mocap_rangeCBG, 'right', 5),
                      (mocap_rangeCBG, 'top', 5)])
    mc.formLayout(bakeRangeFL,
                  e=True,
                  af=[(mocap_startEndIFG, 'left', 5),
                      (mocap_startEndIFG, 'right', 5)],
                  ac=[(mocap_startEndIFG, 'top', 5, mocap_rangeCBG)])
    mc.formLayout(bakeRangeFL,
                  e=True,
                  af=[(mocap_staticChanCBG, 'left', 5),
                      (mocap_staticChanCBG, 'right', 5)],
                  ac=[(mocap_staticChanCBG, 'top', 5, mocap_startEndIFG)])

    # UI Element Callbacks
    mc.checkBoxGrp(mocap_rangeCBG,
                   e=True,
                   cc='glTools.ui.mocapTransfer.toggleBakeRange()')

    # ---------------------
    # - FROM Mocap Layout -
    # ---------------------

    mc.setParent(tabLayout)

    # FormLayout
    fromMocapFL = mc.formLayout(numberOfDivisions=100)

    # Layout Elements
    fromMocap_mocapTFB = mc.textFieldButtonGrp('fromMocap_mocapTFB',
                                               label='Mocap NS:',
                                               text='',
                                               buttonLabel='<<<')
    fromMocap_rigTFB = mc.textFieldButtonGrp('fromMocap_rigTFB',
                                             label='Rig NS:',
                                             text='',
                                             buttonLabel='<<<')
    fromMocap_SEP = mc.separator(height=10, style='single')
    fromMocap_xferToRBG = mc.radioButtonGrp(
        'fromMocap_xferToRBG',
        label='Transfer To:',
        numberOfRadioButtons=2,
        labelArray2=['Controls', 'Overrides'],
        select=2)
    fromMocap_xferHandCBG = mc.checkBoxGrp('fromMocap_xferHandCBG',
                                           label='Transfer Fingers:',
                                           numberOfCheckBoxes=1,
                                           value1=0)

    mc.formLayout(fromMocapFL,
                  e=True,
                  af=[(fromMocap_mocapTFB, 'left', 5),
                      (fromMocap_mocapTFB, 'right', 5),
                      (fromMocap_mocapTFB, 'top', 5)])
    mc.formLayout(fromMocapFL,
                  e=True,
                  af=[(fromMocap_rigTFB, 'left', 5),
                      (fromMocap_rigTFB, 'right', 5)],
                  ac=[(fromMocap_rigTFB, 'top', 5, fromMocap_mocapTFB)])
    mc.formLayout(fromMocapFL,
                  e=True,
                  af=[(fromMocap_SEP, 'left', 5), (fromMocap_SEP, 'right', 5)],
                  ac=[(fromMocap_SEP, 'top', 5, fromMocap_rigTFB)])
    mc.formLayout(fromMocapFL,
                  e=True,
                  af=[(fromMocap_xferToRBG, 'left', 5),
                      (fromMocap_xferToRBG, 'right', 5)],
                  ac=[(fromMocap_xferToRBG, 'top', 5, fromMocap_SEP)])
    mc.formLayout(fromMocapFL,
                  e=True,
                  af=[(fromMocap_xferHandCBG, 'left', 5),
                      (fromMocap_xferHandCBG, 'right', 5)],
                  ac=[(fromMocap_xferHandCBG, 'top', 5, fromMocap_xferToRBG)])

    # UI Element Callbacks
    mc.textFieldButtonGrp(fromMocap_mocapTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' +
                          fromMocap_mocapTFB + '",topOnly=False)')
    mc.textFieldButtonGrp(fromMocap_rigTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' +
                          fromMocap_rigTFB + '",topOnly=False)')

    # -------------------
    # - TO Mocap Layout -
    # -------------------

    mc.setParent(tabLayout)

    # FormLayout
    toMocapFL = mc.formLayout(numberOfDivisions=100)

    # Layout Elements
    toMocap_rigTFB = mc.textFieldButtonGrp('toMocap_rigTFB',
                                           label='Rig NS:',
                                           text='',
                                           buttonLabel='<<<')
    toMocap_mocapTFB = mc.textFieldButtonGrp('toMocap_mocapTFB',
                                             label='Mocap NS:',
                                             text='',
                                             buttonLabel='<<<')

    mc.formLayout(toMocapFL,
                  e=True,
                  af=[(toMocap_rigTFB, 'left', 5),
                      (toMocap_rigTFB, 'right', 5),
                      (toMocap_rigTFB, 'top', 5)])
    mc.formLayout(toMocapFL,
                  e=True,
                  af=[(toMocap_mocapTFB, 'left', 5),
                      (toMocap_mocapTFB, 'right', 5)],
                  ac=[(toMocap_mocapTFB, 'top', 5, toMocap_rigTFB)])

    # UI Element Callbacks
    mc.textFieldButtonGrp(toMocap_rigTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' + toMocap_rigTFB +
                          '",topOnly=False)')
    mc.textFieldButtonGrp(toMocap_mocapTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' +
                          toMocap_mocapTFB + '",topOnly=False)')

    # ---------------------
    # - Rig TO Rig Layout -
    # ---------------------

    mc.setParent(tabLayout)

    # FormLayout
    rigToRigFL = mc.formLayout(numberOfDivisions=100)

    # Layout Elements
    rigToRig_srcTFB = mc.textFieldButtonGrp('rigToRig_srcTFB',
                                            label='Source Rig NS:',
                                            text='',
                                            buttonLabel='<<<')
    rigToRig_dstTFB = mc.textFieldButtonGrp('rigToRig_dstTFB',
                                            label='Destination Rig NS:',
                                            text='',
                                            buttonLabel='<<<')
    rigToRig_SEP = mc.separator(height=10, style='single')
    rigToRig_xferToRBG = mc.radioButtonGrp(
        'rigToRig_xferToRBG',
        label='Transfer To:',
        numberOfRadioButtons=2,
        labelArray2=['Controls', 'Overrides'],
        select=1)
    rigToRig_xferHandCBG = mc.checkBoxGrp('rigToRig_xferHandCBG',
                                          label='Transfer Fingers:',
                                          numberOfCheckBoxes=1,
                                          value1=0)
    rigToRig_xferAllTransCBG = mc.checkBoxGrp('rigToRig_xferAllTransCBG',
                                              label='Transfer AllTrans:',
                                              numberOfCheckBoxes=1,
                                              value1=0)

    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_srcTFB, 'left', 5),
                      (rigToRig_srcTFB, 'right', 5),
                      (rigToRig_srcTFB, 'top', 5)])
    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_dstTFB, 'left', 5),
                      (rigToRig_dstTFB, 'right', 5)],
                  ac=[(rigToRig_dstTFB, 'top', 5, rigToRig_srcTFB)])
    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_SEP, 'left', 5), (rigToRig_SEP, 'right', 5)],
                  ac=[(rigToRig_SEP, 'top', 5, rigToRig_dstTFB)])
    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_xferToRBG, 'left', 5),
                      (rigToRig_xferToRBG, 'right', 5)],
                  ac=[(rigToRig_xferToRBG, 'top', 5, rigToRig_SEP)])
    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_xferHandCBG, 'left', 5),
                      (rigToRig_xferHandCBG, 'right', 5)],
                  ac=[(rigToRig_xferHandCBG, 'top', 5, rigToRig_xferToRBG)])
    mc.formLayout(rigToRigFL,
                  e=True,
                  af=[(rigToRig_xferAllTransCBG, 'left', 5),
                      (rigToRig_xferAllTransCBG, 'right', 5)],
                  ac=[(rigToRig_xferAllTransCBG, 'top', 5,
                       rigToRig_xferHandCBG)])

    # UI Element Callbacks
    mc.textFieldButtonGrp(rigToRig_srcTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' + rigToRig_srcTFB +
                          '",topOnly=False)')
    mc.textFieldButtonGrp(rigToRig_dstTFB,
                          e=True,
                          bc='glTools.ui.utils.loadNsSel("' + rigToRig_dstTFB +
                          '",topOnly=False)')

    # ---------------------
    # - Label Layout Tabs -
    # ---------------------

    mc.tabLayout(tabLayout,
                 e=True,
                 tabLabel=((fromMocapFL, 'From Mocap'),
                           (toMocapFL, 'To Mocap'), (rigToRigFL,
                                                     'Rig To Rig')))

    # ==============
    # - Display UI -
    # ==============

    initializeBakeRange()

    mc.window(window, e=True, wh=[445, 330])
    mc.showWindow(window)
Пример #59
0
    def Show(self):

        if cmds.window(SetJointOrientUIInfo._winName, ex=1):
            cmds.deleteUI(SetJointOrientUIInfo._winName, wnd=1)
        cmds.window(SetJointOrientUIInfo._winName,
                    title=SetJointOrientUIInfo._title)

        cmds.columnLayout()

        cmds.text(h=3, l='')

        cmds.rowColumnLayout(nc=2, cw=[(1, 200), (2, 200)])
        self._uiInstTopObject.create()
        self._uiInstEndObject.create()
        cmds.popupMenu(p=self._uiInstEndObject._form)

        def setEnableForm(*args):
            if cmds.text(self._uiInstEndObject._text, q=1, en=1):
                cmds.text(self._uiInstEndObject._text, e=1, en=0)
                cmds.textField(self._uiInstEndObject._field, e=1, en=0)
            else:
                cmds.text(self._uiInstEndObject._text, e=1, en=1)
                cmds.textField(self._uiInstEndObject._field, e=1, en=1)

        cmds.menuItem(l='Enable', c=setEnableForm)
        cmds.setParent('..')

        cmds.text(h=3, l='')

        cmds.rowColumnLayout(nc=1, cw=[(1, 400)])
        cmds.separator()
        cmds.setParent('..')

        cmds.rowColumnLayout(nc=2, cw=[(1, 200), (2, 200)])
        self._uiInstUpObject.create()
        self._uiInstUpType.create([70, 100])
        cmds.optionMenuGrp(self._uiInstUpType._menu,
                           e=1,
                           cc=self.checkAndUpdateWorldUpAxis)
        cmds.setParent('..')

        cmds.text(h=3, l='')

        cmds.rowColumnLayout(nc=3, cw=[(1, 123), (2, 143), (3, 133)])
        self._uiInstAimAxis.create()
        cmds.optionMenuGrp(self._uiInstAimAxis._menu,
                           e=1,
                           cc=self.checkAndUpdateUpAxis)
        self._uiInstUpAxis.create()
        self._uiInstWorldUpAxis.create()
        cmds.setParent('..')

        cmds.text(h=3, l='')

        cmds.rowColumnLayout(nc=1, cw=[(1, 400)])
        cmds.separator()
        cmds.setParent('..')

        cmds.rowColumnLayout(nc=1, cw=[(1, 400)])
        self._uiInstButton.create(25)
        cmds.setParent('..')

        cmds.window(SetJointOrientUIInfo._winName,
                    e=1,
                    w=SetJointOrientUIInfo._width,
                    h=SetJointOrientUIInfo._height)
        cmds.showWindow(SetJointOrientUIInfo._winName)

        self.appendTopObjectCmd()
        self.checkAndUpdateUpAxis()
        self.checkAndUpdateWorldUpAxis()
        self.appendCmdsToTwoButtons()
Пример #60
-2
    def __enter__(self):
        '''
        Initialize the UI
        '''
        if mc.window(self.name, exists=True):
            mc.deleteUI(self.name)

        mc.window(self.name, title='ml :: '+self.title, iconName=self.title, width=self.width, height=self.height, menuBar=self.menu)
        
        
        if self.menu:
            self.createMenu()
        
        self.form = mc.formLayout()
        self.column = mc.columnLayout(adj=True)

        
        mc.rowLayout( numberOfColumns=2, columnWidth2=(34, self.width-34), adjustableColumn=2, 
                    columnAlign2=('right','left'),
                    columnAttach=[(1, 'both', 0), (2, 'both', 8)] )

        #if we can find an icon, use that, otherwise do the text version
        if self.icon:
            mc.iconTextStaticLabel(style='iconOnly', image1=self.icon)
        else:
            mc.text(label=' _ _ |\n| | | |')
            
        if not self.menu:
            mc.popupMenu(button=1)
            mc.menuItem(label='Help', command=(_showHelpCommand(wikiURL+'#'+self.name)))
        
        mc.text(label=self.info)
        mc.setParent('..')
        mc.separator(height=8, style='single')
        return self