本文整理汇总了Python中maya.cmds.menuBarLayout函数的典型用法代码示例。如果您正苦于以下问题:Python menuBarLayout函数的具体用法?Python menuBarLayout怎么用?Python menuBarLayout使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了menuBarLayout函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: UI
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)
开发者ID:Jamesgary2015,项目名称:FBXExport,代码行数:30,代码来源:FBXExport.py
示例2: __init__
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)
开发者ID:edeglau,项目名称:storage,代码行数:26,代码来源:HoofRig_Toe.py
示例3: create_controller_window
def create_controller_window(self, winName="Controller"):
global colMenu
if cmds.window(self.winName, exists=True):
cmds.deleteUI(self.winName)
self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=150, h=100 )
cmds.menuBarLayout(h=30)
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=150)
cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
getCtrlType=["cluster", "circle"]
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=1, cellWidthHeight=(150, 20))
# colMenu=cmds.optionMenu( label='ControllerType')
# for each in getCtrlType:
# cmds.menuItem( label=each)
cmds.button (label='make cluster control', p='listBuildButtonLayout', command = self.make_cluster_ctrl)
cmds.button (label='make circle control', p='listBuildButtonLayout', command = self.make_circle_ctrl)
cmds.button (label='make locator control', p='listBuildButtonLayout', command = self.make_loc_ctrl)
cmds.showWindow(self.window)
开发者ID:edeglau,项目名称:storage,代码行数:26,代码来源:FinallingRig.py
示例4: buildGUI
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)
开发者ID:Quazo,项目名称:breakingpoint,代码行数:30,代码来源:jf_shaderLinker.py
示例5: create_select_array_window
def create_select_array_window(self):
if cmds.window(self.winName, exists=True):
cmds.deleteUI(self.winName)
self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=270, h=550 )
cmds.menuBarLayout(h=30)
self.fileMenu = cmds.menu( label='Clean Interface', pmc=self.clear_superflous_windows)
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=200)
cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
cmds.rowLayout (' rMainRow ', w=350, 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=(80, 20))
cmds.button (label='Grab Node', p='listBuildButtonLayout', command = self._get_node_property)
cmds.button (label='Grab Name', p='listBuildButtonLayout', command = self._get_name_property)
cmds.button (label='Filter Node', p='listBuildButtonLayout', command = self._create_list_by_node_filter)
cmds.popupMenu(button=1)
cmds.menuItem (label='filter selected by type and make list', command = self._create_list_by_node_filter)
cmds.menuItem (label='filter selected by type and add to list', command = self._add_list_by_node_filter)
cmds.button (label='Filter Name', p='listBuildButtonLayout', command = self._create_list_by_name_filter)
cmds.popupMenu(button=1)
cmds.menuItem (label='filter selected by name and make list', command = self._create_list_by_name_filter)
cmds.menuItem (label='filter selected by name and add to list', command = self._add_list_by_name_filter)
cmds.button (label='All Node', p='listBuildButtonLayout', command = self._create_list_by_all_node)
cmds.popupMenu(button=1)
cmds.menuItem (label='select all scene by type and make list', command = self._create_list_by_all_node)
cmds.menuItem (label='select all scene by type and add to list', command = self._add_list_by_all_node)
cmds.button (label='All Name', p='listBuildButtonLayout', command = self._create_list_by_all_name)
cmds.popupMenu(button=1)
cmds.menuItem (label='select all scene by name and make list', command = self._create_list_by_all_name)
cmds.menuItem (label='select all scene by name and add to list', command = self._add_list_by_all_name)
cmds.text (label='Name or node type field', p='selectArrayColumn')
cmds.gridLayout('searchLayout', p='selectArrayColumn', numberOfColumns=2, cellWidthHeight=(80, 25))
self.nodeName=cmds.textField(w=120, h=25, p='searchLayout')
cmds.button (label='Find', command = self._find_in_list, p='searchLayout', w=20, ann='find this name in list below')
cmds.popupMenu(button=1)
cmds.menuItem (label='Select in list only', command = self._find_in_list)
cmds.menuItem (label='Select in list and scene', command = self._find_in_listAndSelect)
self.listCountLabel=cmds.text (label='Selection list', p='selectArrayColumn')
self.nodeList=cmds.textScrollList( numberOfRows=8, ra=1, allowMultiSelection=True, sc=self.list_item_selectability, io=True, w=220, h=300, p='selectArrayColumn')
cmds.gridLayout('listArrangmentButtonLayout', p='selectArrayColumn', numberOfColumns=4, cellWidthHeight=(40, 20))
cmds.button (label='clr', command = self._clear_list, p='listArrangmentButtonLayout')
cmds.button (label='+', command = self._add_selected_to_list, p='listArrangmentButtonLayout')
cmds.button (label='-', command = self._remove_from_list, p='listArrangmentButtonLayout')
cmds.button (label='><', command = self._swap_with_selected, p='listArrangmentButtonLayout', ann='swap out selected in list with selected in scene')
cmds.button (label='sel all', command = self._select_all_in_list, p='listArrangmentButtonLayout', w=50, ann='select all')
cmds.button (label='sel- ', command = self._clear_selection, p='listArrangmentButtonLayout', w=40, ann='select none')
cmds.button (label='sort', command = self._sort_list, p='listArrangmentButtonLayout', w=40, ann='sort alphabetically-numerally')
cmds.button (label='set', command = self._make_set_from_selection_list, p='listArrangmentButtonLayout', w=40, ann='create set from selected in list')
cmds.text (label='Author: Elise Deglau',w=120, al='left', p='selectArrayColumn')
cmds.text (label="elisedeglau.wordpress.com/2014/03/25/select-palette/", hl=1, w=300, al='left', p='selectArrayColumn')
cmds.text (label='This work is licensed under a Creative Commons License', hl=1, w=300, al='left', p='selectArrayColumn')
cmds.text (label='http://creativecommons.org/licenses/by/4.0/', hl=1, w=350, al='left', p='selectArrayColumn')
cmds.showWindow(self.window)
开发者ID:edeglau,项目名称:storage,代码行数:59,代码来源:MayaSelectArray.py
示例6: createUI
def createUI():
preUI()
mc.window( 'gitMayaWin', title="Git Tools", iconName='', widthHeight=(200, 55) )
mc.menuBarLayout()
mc.menu( label='File' )
mc.menuItem( label='Create Repo', c=lambda *args: createRepo() )
mc.setParent( '..' )
mc.columnLayout( adjustableColumn=True )
mc.rowLayout( numberOfColumns=3, columnWidth3=(80, 80, 80))
mc.button( label='Create Repo', w=80, h=80)
mc.button( label='Clone Repo', w=80, h=80)
mc.setParent( '..' )
mc.separator(h=10, style='none')
mc.textFieldButtonGrp( 'repoPath', label='Repo Path', text='', buttonLabel='Browse', bc=lambda *args: getFolder() )
mc.button( label='Refresh', c=lambda *args: initRepo() )
mc.separator(h=10, style='none')
mc.tabLayout(innerMarginWidth=5, innerMarginHeight=5)
mc.columnLayout( 'Files', adjustableColumn=True )
mc.rowColumnLayout(nc=5)
mc.separator(h=20, style='none')
mc.text(l='Working Copy Changes')
mc.separator(h=20, style='none')
mc.separator(h=20, style='none')
mc.text(l='Staged Changes')
mc.columnLayout( 'workingChangesColor', adjustableColumn=True)
mc.setParent( '..' )
mc.textScrollList( 'workingChanges', numberOfRows=16, allowMultiSelection=True)
mc.columnLayout( adjustableColumn=True )
mc.button( label='>>', c=lambda *args: addChanged())
mc.button( label='>' )
mc.separator(h=30, style='none')
mc.button( label='<', c=lambda *args: remSelected())
mc.button( label='<<' )
mc.setParent( '..' )
mc.columnLayout( 'stagedChangesColor', adjustableColumn=True )
mc.setParent( '..' )
mc.textScrollList( 'stagedChanges', numberOfRows=16, allowMultiSelection=True)
mc.setParent( '..' )
mc.textFieldButtonGrp( 'commitMessage', label='Message', text='', buttonLabel='Commit', bc=lambda *args: doCommit() )
mc.separator(h=20)
mc.setParent( '..' )
mc.columnLayout( 'History', adjustableColumn=True )
mc.intFieldGrp( 'commitCount', numberOfFields=1, label='Number of Commits', value1=10, cc=lambda *args: getCommits())
mc.scrollLayout(h=250, horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
mc.rowColumnLayout( 'commitsGrid', numberOfColumns=2, cw=([1,450],[2,150]) )
mc.setParent( '..' )
mc.setParent( '..' )
mc.text(l='Commited Changes')
mc.textScrollList( 'commitChanges', numberOfRows=16, allowMultiSelection=True)
mc.showWindow( 'gitMayaWin' )
postUI()
开发者ID:artbycrunk,项目名称:maya-git,代码行数:55,代码来源:ui.py
示例7: create_colour_window
def create_colour_window(self, winName="Colors"):
global colMenu
if cmds.window(self.winName, exists=True):
cmds.deleteUI(self.winName)
self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=300, h=100 )
cmds.menuBarLayout(h=30)
stringField='''"Colours" (launches window)colour multiple objects(controllers) without having to go through
attribute editor
* Step 1: select object(s)
* Step 2: launch window
* Step 3: set colour from dropdown menu
* Step 4: press "go" will change the display colors of all selected items'''
self.fileMenu = cmds.menu( label='Help', hm=1, pmc=lambda *args:toolClass.helpWin(stringField))
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=150)
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=(150, 20))
colMenu=cmds.optionMenu( label='Colors', w=150)
cmds.menuItem( label='Bright Red' )#1
cmds.menuItem( label='Bright Blue' )#2
cmds.menuItem( label='Bright Green' )#3
cmds.menuItem( label='Bright Yellow' )#4
cmds.menuItem( label='Dark Yellow' )#5
cmds.menuItem( label='Dull Green' )#6
cmds.menuItem( label='Dark Red' )#7
cmds.menuItem( label='Dark Purple' )#8
cmds.menuItem( label='Darkest Blue' ) #9
cmds.menuItem( label='Dark Green' ) #10
cmds.menuItem( label='Dark Blue' )#11
cmds.menuItem( label='Darkest Blue' )#12
cmds.menuItem( label='Light Pink' ) #13
cmds.menuItem( label='Light Brown' )#14
cmds.menuItem( label='Light Blue' )#15
cmds.menuItem( label='Maroon' )#16
cmds.menuItem( label='Torquise' )#17
cmds.menuItem( label='Skin' )#18
cmds.menuItem( label='Brown' )#19
cmds.menuItem( label='White' )#20
cmds.menuItem( label='Pink' )#21
cmds.menuItem( label='Forest Green' )#22
cmds.menuItem( label='Teal Green' )#23
cmds.menuItem( label='Purple' )#24
cmds.menuItem( label='Black' ) #25
cmds.menuItem( label='Grey' ) #26
cmds.button (label='Go', w=150, p='listBuildButtonLayout', command = self._change_colour)
cmds.showWindow(self.window)
开发者ID:edeglau,项目名称:storage,代码行数:53,代码来源:Colours.py
示例8: UI
def UI():
rlmAttrs()
images=os.path.join(mc.workspace(q=1,rd=1),"images",mc.getAttr("renderLayerManager.shotName"))
if (mc.window('rcFileManage',exists=True)): mc.deleteUI('rcFileManage')
mc.window('rcFileManage', mxb=0,title=' ',tlb=False,)
###Main
mc.columnLayout('renderLayers2Files')#,bgc=[0.2,0.2,0.2]
mc.image(image=iconPath+'toptitle.png')
mc.cmdScrollFieldReporter(clr=1,hf=0,w=700,h=80,bgc=[0,0,0])
print '//rc.Tools'
mc.setParent('..')
mc.rowColumnLayout(numberOfColumns=3,columnWidth=[(1,row1),(2,row2),(3,480)])
mc.text(al='right',font=ui.titleFont,label=' Image Prefix: ')
mc.menuBarLayout()
mc.menu(label='Shot Name/')
mc.menuItem(label='<RenderLayer>/<RenderLayer>',c=partial(runMethod,'set.imagePrefix','("S__L__L")'))
mc.menuItem(label='<RenderLayer>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("S__L__L.P")'))
mc.menuItem(label='<RenderLayer>/<RenderPass>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("S__L__P__L.P")'))
mc.menu(label='...')
mc.menuItem(label='<RenderLayer>/<RenderLayer>',c=partial(runMethod,'set.imagePrefix','("L__L")'))
mc.menuItem(label='<RenderLayer>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("L__L.P")'))
mc.menuItem(label='<RenderLayer>/<RenderPass>/<RenderLayer>.<RenderPass>',c=partial(runMethod,'set.imagePrefix','("L__P__L.P")'))
mc.setParent('..')
mc.textField('imageFilePrefix',font=ui.fieldFont,en=1,text=mc.getAttr('defaultRenderGlobals.imageFilePrefix'))
mc.setParent('..')
mc.setParent('..')
###ListsUI
mc.rowColumnLayout('listLayout',numberOfColumns=3,columnWidth=[(1,102),(2,browselistWidth), (3, targetlistWidth)])#LISTS LAYOUT
mc.columnLayout()
mc.separator(h=10,style='in')
mc.rowColumnLayout(numberOfColumns=2)
mc.text('UNITS: ',align='right',fn='tinyBoldLabelFont')
mc.text(str(mc.currentUnit(query=True)),align='left',fn='tinyBoldLabelFont')
mc.text('FPS: ',align='right',fn='tinyBoldLabelFont')
mc.text(str(sceneData.fps()),align='left',fn='tinyBoldLabelFont')
mc.text('RENDER: ',align='left',fn='tinyBoldLabelFont')
mc.text(str(mc.getAttr('defaultResolution.width'))+'x'+str(mc.getAttr('defaultResolution.height')),align='left',fn='tinyBoldLabelFont')
mc.setParent('..')
mc.setParent('listLayout')
bldBrowseList()
mc.setParent('listLayout')
bldTargetList('browser')
mc.setParent('listLayout')
mc.showWindow()
开发者ID:RobRuckus,项目名称:rcTools,代码行数:51,代码来源:rcFileManager.py
示例9: create
def create(self):
if cmds.window(self.winName, exists=True):
cmds.deleteUI(self.winName)
self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=320, h=600 )
cmds.menuBarLayout(h=30)
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=200)
cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
cmds.rowLayout (' rMainRow ', w=320, 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=(120, 20))
cmds.button (label='Schematic', p='listBuildButtonLayout', ann="This will open a schematic for selected character", command = self._schematic)
cmds.button (label='CombineSelectMirror', p='listBuildButtonLayout', ann="This will add opposite control to the selection", command = self._combine_select)
cmds.button (label='MirrorTransform', p='listBuildButtonLayout', ann="This will mirror the transform to the opposite controller", command = self._mirror_transform)
# cmds.button (label='MirrorTransformFace', p='listBuildButtonLayout', ann="This will mirror the transform to the opposite controller", command = self._mirror_transform_face)
cmds.button (label='MatchTransform', p='listBuildButtonLayout', ann="This will match the relative transform of the first selection", command = self._match_transform)
cmds.button (label='MatchMatrix', p='listBuildButtonLayout', ann="This will match the exact matrix of the first selection", command = self._match_matrix)
#cmds.button (label='SelectMouth', p='listBuildButtonLayout', ann="This will select the characters mouth",command = self._select_mouth)
cmds.button (label='mirrorSelect', p='listBuildButtonLayout', ann="This will change the selection to the mirror controller of the current selected",command = self._mirror_select)
cmds.button (label='mirrorMouth', p='listBuildButtonLayout', ann="This will mirror one side of the mouth to the other(will not affect control box attributes)", command = self._mirror_mouth)
cmds.button (label='mirrorBrows', p='listBuildButtonLayout', ann="This will mirror a brow position to the other(will not affect control box attributes)", command = self._mirror_brows)
cmds.button (label='mirrorEyes', p='listBuildButtonLayout', ann="This will mirror an eye position to the other", command = self._mirror_eyes)
cmds.button (label='mirrorFace', p='listBuildButtonLayout', ann="This will mirror the entire face to the other(will not affect control box attributes)", command = self._mirror_face)
cmds.button (label='ResetMouth', p='listBuildButtonLayout', ann="This will reset the mouth positions(anim transform controls only - will not affect control box attributes)",command = self._reset_mouth)
cmds.button (label='ResetSelected', p='listBuildButtonLayout', ann="This will reset the selected to 0.0(transforms only - will not affect control box attributes)", command = self._reset_selected)
cmds.button (label='DisplayAnim', p='listBuildButtonLayout', ann="This sets the viewport to show only poly and curve", command = self._display_anim)
# cmds.button (label='Shapes', p='listBuildButtonLayout', command = self._make_shape)
#cmds.text(label="")
cmds.text(label="FK=IK")
#cmds.separator()
cmds.text(label="")
cmds.button (label='ArmIK_2_FK', p='listBuildButtonLayout', ann="This will match the arm IK chain to the FK position",command = self._ikToFK_Arm)
cmds.button (label='ArmFK_2_IK', p='listBuildButtonLayout', ann="This will match the arm FK chain to the IK position", command = self._fkToIK_Arm)
cmds.button (label='LegIK_2_FK', p='listBuildButtonLayout', ann="This will match the leg IK chain to the FK position",command = self._ikToFK_Leg)
cmds.button (label='LegFK_2_IK', p='listBuildButtonLayout', ann="This will match the leg FK chain to the IK position", command = self._fkToIK_Leg)
cmds.text(label="other tools")
cmds.text(label="")
cmds.button (label='SelectArray', p='listBuildButtonLayout', ann="This is a custom tool to build up a user selection array or search and filter for specific nodes/names", command = self._select_array)
cmds.button (label='Switch Arm Cnst', p='listBuildButtonLayout', ann="resets arm in position on constraint switch", command = self._switch_arm_ik_cnstrnt)
#cmds.symbolButton (p='listBuildButtonLayout', command = self.Face, image="D:\myGraphics\icons\SP.jpg")
cmds.showWindow(self.window)
开发者ID:edeglau,项目名称:storage,代码行数:47,代码来源:Anim_tools.py
示例10: appendUI
def appendUI():
"""UI for appendPath script"""
#create window with 3 text fields, buttons call up proc to add path
if cmds.window("appendPath", exists=True):
cmds.deleteUI("appendPath")
widgets["win"] = cmds.window("appendPath", t="zbw_appendPath", w=500, h=210, s=False)
#create some menus for saving and loading
cmds.setParent(widgets["win"])
widgets["menu"] = cmds.menuBarLayout()
widgets["menuFile"] = cmds.menu(label="file")
cmds.menuItem(l='Clear Values', c=clearValues)
cmds.menuItem(l="Save Add Paths", c=saveValues)
cmds.menuItem(l="Load Add Paths", c=loadValues)
widgets["tabLO"] = cmds.tabLayout(h=210)
widgets["columnLO"] = cmds.columnLayout("Add Paths", w=500)
widgets["path1"] = cmds.textFieldButtonGrp(l="path1", cal=[(1, "left"), (2,"left"),(3,"left")], cw3=(40, 410, 50), bl="<<<", bc=partial(addToField, 1))
widgets["path2"] = cmds.textFieldButtonGrp(l="path2", cal=[(1, "left"), (2,"left"),(3,"left")], cw3=(40, 410, 50), bl="<<<", bc=partial(addToField, 2))
widgets["path3"] = cmds.textFieldButtonGrp(l="path3", cal=[(1, "left"), (2,"left"),(3,"left")], cw3=(40, 410, 50), bl="<<<", bc=partial(addToField, 3))
cmds.separator(h=10, st="single")
widgets["buttonRCL"] = cmds.rowColumnLayout(nc=3, w=500, cw=[(1,123),(2,247 ),(3,123)])
widgets["addCloseBut"] = cmds.button(l="Add and Close", w=120, h=30, bgc=(.6, .8, .6), c=applyClose)
widgets["addBut"] = cmds.button(l="Add Paths!", w=245, h=30, bgc=(.8, .8, .6), c=apply)
widgets["closeBut"] = cmds.button(l="Close", w=120, h=30, bgc=(.8,.6,.6), c=close)
cmds.setParent(widgets["columnLO"])
cmds.separator(h=5, style="single")
cmds.text("Click the '<<<' buttons to browse for paths to add. Click the 'Add' button to add those \npaths to the 'sys.path' list. Use the 'ViewPath' tab to view current list of paths.", al="center")
cmds.text("Use 'file->save' to save the selected paths. Use 'file->load' to load previously saved paths")
#back to window
cmds.setParent(widgets["tabLO"])
widgets["columnLO2"] = cmds.columnLayout("View Paths", w=500)
cmds.text("Double-click to display full path in script editor")
widgets["listTSL"] = cmds.textScrollList(w=500, h=100, fn="smallPlainLabelFont", append=["click button below", "to refresh this list!"], dcc=printMe)
refresh()
cmds.separator(h=5, style="single")
widgets["columnLO3"] = cmds.columnLayout(w=500)
widgets["refreshBut"] = cmds.button(l="Refresh Paths", w=500, h=20, bgc=(.5, .5, .6), c=refresh)
cmds.rowColumnLayout(nc=3, cw=[(1,200),(2,150 ),(3,150)])
widgets["removeBut"] = cmds.button(l="Remove Selected", w=180, h=20, bgc=(.7, .5, .5), c=removePath)
widgets["topBut"] = cmds.button(l="Selected To Top", w=130, h=20, bgc=(.7, .5, .5), c=topPath)
widgets["bottomBut"] = cmds.button(l="Selected To Bottom", w=130, h=20, bgc=(.7, .5, .5), c=bottomPath)
#load (and check) previous saves
cmds.showWindow(widgets["win"])
cmds.window(widgets["win"], e=True, w=500, h=210)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:57,代码来源:zbw_appendPath.py
示例11: buildUI
def buildUI(self,*args):
if cmds.window(self.winname, exists=True):
self.closeUI()
self.getSettings()
mTCWin = cmds.window(self.winname, title = 'Motion To Curve', rtf = True, width = 270, minimizeButton=False,
maximizeButton=False, sizeable=False)
cmds.columnLayout(adjustableColumn = True)
menuBarLayout = cmds.menuBarLayout()
cmds.menu(label='Edit')
cmds.menuItem(label='Reset Settings', command = partial(self.resetSettings))
cmds.setParent('..')
cmds.frameLayout(label='', borderStyle='etchedIn',lv=False, cll = False, w=260)
cmds.separator(style='none')
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 80), adjustableColumn=2, columnAlign=(1, 'right'), ct2=['both','both'], co2=[0,5])
cmds.text('n_txt_alignTo',label = 'Track Axis:', ann = "Determines which Axis to track motion")
cmds.rowLayout(numberOfColumns=3, columnWidth3=(40,40,40), adjustableColumn=3, columnAlign=(1, 'right'), ct3=['both','both','both'], co3=[0,5,0])
self.axisX = cmds.checkBox('n_cB_mTCWin_trackX', l='X', v = self.trackX)
self.axisY = cmds.checkBox('n_cB_mTCWin_trackY',l='Y', v = self.trackY)
self.axisZ = cmds.checkBox('n_cB_mTCWin_trackZ', l='Z', v = self.trackZ)
cmds.setParent('..')
cmds.setParent('..')
cmds.separator(style='none')
cmds.setParent('..')
cmds.frameLayout(label='', borderStyle='etchedIn',lv=False)
cmds.separator(style='none')
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 80), adjustableColumn=2, columnAlign=(1, 'right'), ct2=['both','both'], co2=[0,5])
cmds.text(label = 'Start Time:', ann = "Frame number to start track")
cmds.intField('n_iF_mTC_sTime', v = self.sTime)
cmds.setParent( '..' )
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 80), adjustableColumn=2, columnAlign=(1, 'right'), ct2=['both','both'], co2=[0,5])
cmds.text(label = 'End Time:', ann = "Frame number to end track")
cmds.intField('n_iF_mTC_eTime', v = self.eTime)
cmds.setParent('..')
cmds.separator(style='none')
cmds.setParent('..')
cmds.frameLayout(label='', borderStyle='etchedIn',lv=False)
cmds.separator(style='none')
cmds.rowLayout(numberOfColumns=2, columnWidth2=(120, 80), adjustableColumn=2, columnAlign=(1, 'right'), ct2=['both','both'], co2=[0,5])
cmds.text(label = 'Frame Sampling:', ann = "How often, in frames, to sample data for curve points")
cmds.intField('n_iF_mTC_fSamples', v = self.fSamples)
cmds.setParent('..')
cmds.separator(style='none')
cmds.setParent('..')
#Add in bottom button row
cmds.rowLayout( numberOfColumns=3, columnWidth3=(88,88,88), adjustableColumn=3, columnAlign=(1, 'right'), ct3=['both','both','both'], co3=[0,0,0])
cmds.button(label = "Track", command = partial(self.track))
cmds.button(label = "Apply", command = partial(self.apply))
cmds.button(label = "Close", command = partial(self.closeUI))
cmds.setParent( '..' )
cmds.showWindow(mTCWin)
开发者ID:Kainev,项目名称:kToolset_OBSOLETE,代码行数:57,代码来源:kT_motionToCurve.py
示例12: multi_function_window
def multi_function_window(self, winName="Colors"):
global colMenu
if cmds.window(self.winName, exists=True):
cmds.deleteUI(self.winName)
self.window = cmds.window(self.winName, title=self.winTitle, tbm=1, w=300, h=100 )
cmds.menuBarLayout(h=30)
stringField='''"MultiFunctions" (launches window)does a mass constraint or extrude. Constrains all items
to the first selected item or extrudes first selected item as a tube along several
curves
* Step 1: select object to constrain items to(or run on path)
* Step 2: select multiple objects to constrain (or run a path on)
* Step 3: select function from dropdown menu
* Step 4: if using paths, set length and wide spans
* Step 5: Press go'''
self.fileMenu = cmds.menu( label='Help', hm=1, pmc=lambda *args:toolClass.helpWin(stringField))
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=300)
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('listBuildLayout', p='selectArrayColumn', numberOfColumns=1, cellWidthHeight=(300, 20))
colMenu=cmds.optionMenu( label='Functions', w=300)
cmds.menuItem( label="orient_constraint" )#1
cmds.menuItem( label="aim_constraint")#2
cmds.menuItem( label="parent_constraint")#3
cmds.menuItem( label="point_constraint" )#4
cmds.menuItem( label="extrude_tube")#5
cmds.menuItem( label="extrude_path")#5
cmds.menuItem( label="xform")#6
# cmds.menuItem( label="multi point")#6
# cmds.menuItem( label="multi rivet")#6
cmds.gridLayout('dimensions', p='selectArrayColumn', numberOfColumns=2, cellWidthHeight=(150, 20))
cmds.text("length spans(extrude)")
self.selfU=cmds.textField(text="12")
cmds.text("width spans(extrude)")
self.selfV=cmds.textField(text="1")
cmds.gridLayout('listBuildButtonLayout', p='selectArrayColumn', numberOfColumns=1, cellWidthHeight=(300, 20))
cmds.button (label='Go', w=150, p='listBuildButtonLayout', command = lambda *args:self.perform_multi_function(selfU=cmds.textField(self.selfU, q=1,text=1), selfV=cmds.textField(self.selfV, q=1,text=1)))
# cmds.button (label='Go', w=150, p='listBuildButtonLayout', command = self.perform_multi_function)
cmds.showWindow(self.window)
开发者ID:edeglau,项目名称:storage,代码行数:44,代码来源:multiFunctions.py
示例13: helpWin
def helpWin(self, stringField):
'''--------------------------------------------------------------------------------------------------------------------------------------
Interface Layout
--------------------------------------------------------------------------------------------------------------------------------------'''
# def helpPage(self, arg=None):
winName = "Description"
winTitle = winName
if cmds.window(winName, exists=True):
deleteUI(winName)
window = cmds.window(winName, title=winTitle, tbm=1, w=700, h=400 )
cmds.menuBarLayout(h=30)
cmds.rowColumnLayout (' selectArrayRow ', nr=1, w=700)
cmds.frameLayout('LrRow', label='', lv=0, nch=1, borderStyle='out', bv=1, p='selectArrayRow')
cmds.rowLayout (' rMainRow ', w=700, numberOfColumns=6, p='selectArrayRow')
cmds.columnLayout ('selectArrayColumn', parent = 'rMainRow')
cmds.setParent ('selectArrayColumn')
cmds.gridLayout('txvaluemeter', p='selectArrayColumn', numberOfColumns=2, cellWidthHeight=(700, 400))
self.list=cmds.scrollField( editable=False, wordWrap=True, ebg=1,bgc=[0.11, 0.15, 0.15], w=700, text=str(stringField))
cmds.showWindow(window)
开发者ID:edeglau,项目名称:storage,代码行数:19,代码来源:plot.py
示例14: SundayUIToolsDockedShaderliner
def SundayUIToolsDockedShaderliner():
if cmds.dockControl('sundayShaderlinerInTheDock', query = True, exists = True):
cmds.deleteUI('sundayShaderlinerInTheDock')
shaderlinerlinerLayout = cmds.paneLayout('sundayShaderlinerInTheDockPane', parent = mel.eval('$temp1=$gMainWindow'))
cmds.dockControl('sundayShaderlinerInTheDock', width = 275, area = 'left', label = 'Shaderliner', content = shaderlinerlinerLayout, allowedArea = [
'right',
'left'])
cmds.setParent(cmds.paneLayout('sundayShaderlinerInTheDockPane', query = True, fullPathName = True))
cmds.menuBarLayout('sundayShaderlinerInTheDockMenuBarLayout')
cmds.flowLayout(columnSpacing = 5)
cmds.separator(style = 'none', width = 1)
cmds.iconTextButton(image = SundayImage + 'SundayRefresh.png', width = 28, height = 28, command = 'import SundayUIToolsPy\nreload(SundayUIToolsPy)\nSundayUIToolsPy.SundayUIToolsDockedShaderlinerUpdate()')
if cmds.optionVar(query = 'SundayShaderlinerSwatch'):
cmds.iconTextButton('SundayShaderlinerIcon', image = SundayImage + 'SundaySolidSphere.png', width = 30, height = 30, command = 'import SundayUIToolsPy\nreload(SundayUIToolsPy)\nSundayUIToolsPy.SundayUIToolsDockedShaderlinerSwatchToggle()')
else:
cmds.iconTextButton('SundayShaderlinerIcon', image = SundayImage + 'SundaySolidSphereColor.png', width = 30, height = 30, command = 'import SundayUIToolsPy\nreload(SundayUIToolsPy)\nSundayUIToolsPy.SundayUIToolsDockedShaderlinerSwatchToggle()')
cmds.setParent('..')
SundayUIToolsDockedShaderlinerUpdate()
开发者ID:elliottjames,项目名称:jeeves,代码行数:19,代码来源:SundayUIToolsPy.py
示例15: menus
def menus(self):
######### modify for inheritence ###########
#self.widgets["testMenu"] = cmds.menu(l="test")
self.widgets["menu"] = cmds.menuBarLayout()
self.widgets["menuFile"] = cmds.menu(label="file")
cmds.menuItem(l='reset values', c=self.resetValues)
cmds.menuItem(l="save values", c=self.saveValues)
cmds.menuItem(l="load values", c=self.loadValues)
self.widgets["menuHelp"] = cmds.menu(l="help")
cmds.menuItem(l="print help", c=self.printHelp)
开发者ID:zethwillie,项目名称:zbw_python_tools,代码行数:10,代码来源:zbw_window.py
示例16: content
def content(self):
'''
"content" - see the 'window.py' module for more information about how this "content" method functions
'''
self.form1 = cmds.formLayout( 'openPipelineProjectManagerGUI_form', numberOfDivisions=100 )
self.menuBarLayout0 = cmds.menuBarLayout()
self.menu01 = cmds.menu(label='options')
cmds.menuItem(label="Refresh Objects Field", subMenu=0, parent=self.menu01, command=lambda *args:self.updateTextField() )
cmds.menuItem(label="Reload", subMenu=0, parent=self.menu01, command=lambda *args:self.reload() )
cmds.menuItem(label="Save Prefs", subMenu=0, parent=self.menu01, command=lambda *args:self.savePrefs() )
cmds.menuItem(label="Load Prefs", subMenu=0, parent=self.menu01, command=lambda *args:self.loadPrefs() )
cmds.setParent(self.menuBarLayout0)
cmds.setParent(self.form1)
self.diagnosticUI_UIObjects_scrollField = cmds.scrollField('diagnosticUI_UIObjects_scrollField', parent=self.form1, ww=1, editable=0)
self.diagnosticUImainUI_btn = cmds.button(l="Open Pipeline Main GUI", parent=self.form1, bgc=(.85, .85, .85), c=lambda *args:self.buttonRelease('openPipelineMainUI'))
self.diagnosticUIProjManager_btn = cmds.button(l="Project Manager GUI", parent=self.form1, bgc=(.8, .8, .8), c=lambda *args:self.buttonRelease('openPipelineProjectManagerGUI'))
self.diagnosticUISaveMaster_btn = cmds.button(l="Save Master GUI", parent=self.form1, bgc=(.75, .75, .75), c=lambda *args:self.buttonRelease('openPipelineSaveMasterGUI'))
self.diagnosticUIProjDialog_btn = cmds.button(l="Project Dialogue GUI", parent=self.form1, bgc=(.7, .7, .7), c=lambda *args:self.buttonRelease('openPipelineProjDialogGUI'))
#Attach elements to form
cmds.formLayout(
self.form1,
edit=True,
attachPosition=[
(self.menuBarLayout0, 'top', 0, 0),
(self.menuBarLayout0, 'left', 0, 0),
(self.menuBarLayout0, 'right', 0, 100),
(self.diagnosticUImainUI_btn, 'left', 5, 0),
(self.diagnosticUImainUI_btn, 'right', 5, 100),
(self.diagnosticUI_UIObjects_scrollField, 'left', 5, 0),
(self.diagnosticUI_UIObjects_scrollField, 'right', 5, 100),
(self.diagnosticUIProjManager_btn, 'left', 5, 0),
(self.diagnosticUIProjManager_btn, 'right', 5, 100),
(self.diagnosticUISaveMaster_btn, 'left', 5, 0),
(self.diagnosticUISaveMaster_btn, 'right', 5, 100),
(self.diagnosticUIProjDialog_btn, 'left', 5, 0),
(self.diagnosticUIProjDialog_btn, 'right', 5, 100),
(self.diagnosticUIProjDialog_btn, 'bottom', 2, 100),
],
attachControl=[
(self.diagnosticUI_UIObjects_scrollField, 'top', 2, self.menuBarLayout0),
(self.diagnosticUI_UIObjects_scrollField, 'bottom', 2, self.diagnosticUImainUI_btn),
(self.diagnosticUImainUI_btn, 'bottom', 2, self.diagnosticUIProjManager_btn),
(self.diagnosticUIProjManager_btn, 'bottom', 2, self.diagnosticUISaveMaster_btn),
(self.diagnosticUISaveMaster_btn, 'bottom', 2, self.diagnosticUIProjDialog_btn),
]
)
return [self.form1]
开发者ID:benderonline,项目名称:OpenPipeline,代码行数:54,代码来源:diagnosticUI.py
示例17: _choser_gen_group_window
def _choser_gen_group_window(self, getListAttr):
choose_gen_grp_win = "Pick from below"
if cmds.window(choose_gen_grp_win, exists=True):
cmds.deleteUI(choose_gen_grp_win)
window = cmds.window(choose_gen_grp_win, t
|
请发表评论