• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python core.deleteUI函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中pymel.core.deleteUI函数的典型用法代码示例。如果您正苦于以下问题:Python deleteUI函数的具体用法?Python deleteUI怎么用?Python deleteUI使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了deleteUI函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: loadDriven

 def loadDriven(self, *args): 
     """
      Load object name for driven object in text field
     """
     sel = pm.ls(sl=True, fl=True)
     pm.textFieldButtonGrp(self.drivenField, edit=True, text=sel[0])  
     
     # Clear the menu items so list doesn't grow
     items = pm.optionMenu(self.drivenAttField, q=True, ill=True)
     if(items):
             pm.setParent(self.drivenAttField, menu=True)
             for each in items:
                     pm.deleteUI(each)
     
     # Check if blendshape
     if 'BlendShape' in str(type(sel[0])):  
         bs = sel[0]
     
         temp = pm.aliasAttr(bs, q=1)
         temp.sort()
         targets = []
         for each in temp:
             if each.startswith('weight'): continue
             targets.append(each)
     
         for tgt in targets:
             try:
                 pm.menuItem(parent=self.drivenAttField, label=tgt)
             except Exception, e:
                 print e
                 pm.warning('%s failed to create / connect' % tgt)
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:31,代码来源:ms_sdkGui.py


示例2: __init__

	def __init__(self, baseUi, parent):
		BaseUi.__init__(self, parent)
		self.uiparent = parent
		self.baseUi = baseUi
		self.tmpJnts = []
		self.defaultAxis = 'y'

		#ui
		try:
			pm.deleteUI(self.rigCol)
		except: pass

		with pm.columnLayout(adj=True, rs=3, parent=self.uiparent) as self.rigCol:
			with pm.rowColumnLayout(nc=2, co=[(1, 'left', 155), (2, 'left', 5)]):
				pm.text(l='axis')
				with pm.optionMenu(w=60) as self.axisMenu:
					pm.menuItem(l='x')
					pm.menuItem(l='y')
					pm.menuItem(l='z')
			with pm.columnLayout(adj=True, rs=2, co=['left', 165]):	
				self.ribbonChkBox = pm.checkBox(l='Ribbon Lo/Hi', v=False)
			with pm.rowColumnLayout(nc=3, co=[(1, 'left', 30), (2, 'left', 5), (3, 'left', 5)]):
				pm.text(l='tmpJnts')
				self.tmpJntsTxtFld = pm.textField(w=230, ed=False)
				self.loadTmpJntButt = pm.button(l='<<', c=pm.Callback(self.loadTmpJnts))

			

		self.axisMenu.setValue(self.defaultAxis)
		self.baseUi.clearElemSideTxtFld()
开发者ID:myCodeTD,项目名称:pkmel,代码行数:30,代码来源:crm_ui.py


示例3: createUI

def createUI():
    if pm.window( moduleWin, exists = True, q = True ):
        pm.deleteUI( moduleWin)

    ModuleUI()
    
    
开发者ID:Mortaciunea,项目名称:yart,代码行数:5,代码来源:moduleUI.py


示例4: GUI

def GUI():
    winName = 'squishy_ik_win'

    if pmc.window(winName, exists=1):
        pmc.deleteUI(winName)
    win = pmc.window(winName, t='Squishy IK')
    pmc.formLayout(numberOfDivisions=100)
    pmc.rowColumnLayout(nc=2, rs=[15, 15], columnOffset=(1, 'both', 5))
    pmc.text(l='1 - Create Placement Locators')
    pmc.button(l='Make Locators', c=pmc.Callback(makeAutoRigLocators))

    pmc.separator()
    pmc.separator()

    pmc.text(l='2 - Place locators where the spine begins and ends')
    pmc.button(l='Select Locators', c=pmc.Callback(selectAutoRigLocators))

    pmc.separator()
    pmc.separator()

    pmc.text(l='3 - With the locators place, go ahead and create the rig!')
    pmc.button(l='Create Squishy Spine', c=pmc.Callback(squishySplineIkCallback))

    pmc.separator()
    pmc.separator()

    pmc.text(l='4 - Select the joints to add to the skin cluster')
    pmc.button(l='Select Bind Joints', c=pmc.Callback(selectSquishyJointsCallback))

    win.show()
开发者ID:taozenforce,项目名称:cogswelladvancedrigging2014,代码行数:30,代码来源:primitives.py


示例5: createUI

def createUI():
    global m2uwin
    if m2uwin is not None:
        pm.deleteUI(m2uwin, window=True)
    
    v = m2u.getVersion()
    m2uwin = pm.window( title="m2u "+v+" (maya)", iconName='m2u',
                        widthHeight=(150, 300) )
    pm.columnLayout()
    pm.rowLayout(numberOfColumns = 2)
    pm.button( label='Connect', c=cbConnect )
    pm.button( label='Setup Cameras', c=cbSetupCamera )
    pm.setParent('..')
    pm.checkBox( label='Sync Camera', onc = cbSyncCamera,
                 ofc = cbSyncCameraOff, v = False)
    pm.checkBox( label='Sync Objects', onc = cbSyncObjects,
                 ofc = cbSyncObjectsOff, v = False)
    pm.checkBox( label='Sync Visibility', onc = cbSyncVisibility,
                 ofc = cbSyncVisibilityOff, v = False)
    pm.separator()
    pm.button( label='Fetch Selected', c = cbFetchSelected)
    pm.button( label='Send Selected To Editor', c = cbSendSelectedToEd)
    #pm.button( label='Import Content Test', c = cbUDKImportContent)
    pm.setParent( '..' )
    pm.showWindow( m2uwin )
开发者ID:m2u,项目名称:m2u,代码行数:25,代码来源:mayaInternalUI.py


示例6: gui

def gui():
    '''
    # gui for the script
    '''
    win = 'rigid_body_win'
    if pm.window(win, exists= True):
        pm.deleteUI(win)
        
    if pm.windowPref(win, exists= True):
        pm.windowPref(win, remove= True)
    
    global obj_scroll_list, name_field, tab_layout
    
    my_win = pm.window(win, title= 'BAKE', toolbox= True, width= 300)
    tab_layout = pm.tabLayout()
    
    ui_creator = pm.columnLayout(adjustableColumn= False)
    name_field = pm.textFieldGrp(label = 'System Name', text= 'Name',
                                 columnWidth2= [145, 150])
    obj_scroll_list = pm.textScrollList(width= 300, height= 200,
                                    allowMultiSelection= True)
    pm.rowColumnLayout(nc=3, columnWidth= ([1,100], [2,100], [1,100]))
    pm.button(label= 'Load', command= pm.Callback(load_objects), width= 100)
    pm.button(label= '+', command= pm.Callback(add_objects), width= 100)
    pm.button(label= '-', command= pm.Callback(remove_objects), width= 100)
    
    pm.setParent('..')
    pm.button(label= 'Create Baking System', height= 50, width= 300,
              command= pm.Callback(create_baking_system))
    
    pm.tabLayout( tab_layout, edit=True, tabLabel=((ui_creator, 'Setup')))
    
    my_win.show()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:33,代码来源:baker.py


示例7: helpWin

    def helpWin(self,*args):
        """
         Display the help window
        """
        if(pm.window('msArmRigHelpWin',exists=True)):
            pm.deleteUI('msArmRigHelpWin',window=True)

        with pm.window('msArmRigHelpWin',title="Arm Rig Help",rtf=True) as mainWin:
            with pm.columnLayout():
                pm.text('   Locators should be placed for:')
                pm.text('               Shoulder')
                pm.text('               Elbow')
                pm.text('               Wrist')
                pm.text('\n')
                pm.text('   Upper Torso: Shoulder insertion. Clavicle or upper back joint.')
                pm.text('   Lower Torso: COG or something following the root.')
                pm.text('   World Mover: World mover control or equivalent.')
                pm.text('   (Used for space switch setup).')
                pm.text('\n')
                pm.text('   Switch Control: Place IK / FK switch on this control, usually the Hand control.')
                pm.text('   Switch control should be in place and zeroed.')
                pm.text('\n')
                pm.text('   Note: Locators should not be zeroed. They should have their world space')
                pm.text('   values in their translate attributes in the channel box.')        
                pm.text('\n')

                mainWin.show()
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:27,代码来源:ms_armRig.py


示例8: ui_fixComponentShading

def ui_fixComponentShading(*args):
    ### UI setup
    global UI_name

    UI_name = [ 'chk_find', 'chk_fix', 'chk_layer', 'btn_run' ]

    if pm.window( 'fix_component_shading', exists=True ):
        pm.deleteUI( 'fix_component_shading', window=True )
        
    ui_layout['window'] = pm.window( 'fix_component_shading', title='Fix Component Shading', sizeable=False, h=200, w=200 )
    ui_layout['mainLayout'] = pm.columnLayout( columnAlign='left', columnAttach=['left', 0] )

    pm.checkBox( UI_name[0], label=' Find Component Shading Object', value=1, w=200, p=ui_layout['mainLayout'] )
    pm.checkBox( UI_name[1], label=' Fix Component Shading Object', w=200, p=ui_layout['mainLayout'] )
    pm.checkBox( UI_name[2], label=' Fix Ecah Render Layer', w=200, p=ui_layout['mainLayout'] )

    ui_layout['ui_sub1'] = pm.formLayout(p=ui_layout['mainLayout'] )
    btn = pm.button( UI_name[3] ,label=' Execute !', command=pm.Callback( doExecution ), w=100, p=ui_layout['ui_sub1'] )
    pm.formLayout( ui_layout['ui_sub1'], e=True, attachForm=[ (btn, 'left', 50 ) ] )
    
    pm.separator( h=8, w=200, style='single', p=ui_layout['mainLayout'] )
    
    ui_layout['ui_sub2'] = pm.columnLayout(p=ui_layout['mainLayout'] )
    pm.text(label=' --- This script will keep the material \n in the CURRENT render layer, so \n it better to run it in MASTER layer! --- ', bgc=[0.05, 0.05, 0.05], align='left', p=ui_layout['ui_sub2'] )
    
    pm.showWindow( ui_layout['window'] )
开发者ID:kzchen,项目名称:Maya_TD_tools,代码行数:26,代码来源:fixFaceAssignment_v05.py


示例9: _delete_login_menu

def _delete_login_menu():
    """
    Deletes the displayed Shotgun user login menu.
    """

    if pm.menu(MENU_LOGIN, exists=True):
        pm.deleteUI(MENU_LOGIN)
开发者ID:shotgunsoftware,项目名称:tk-maya,代码行数:7,代码来源:plugin_logic.py


示例10: __init__

    def __init__(self, *args, **kwargs):

        self.log           = logging.getLogger(self.__class__.__name__)
        self._refreshEvent = None

        if 'name' in kwargs:
            name = kwargs.pop('name')
        elif 'n' in kwargs:
            name = kwargs.pop('n')
        else:
            name = ''

        self._name = '{0}{1}'.format(self.__class__.__name__, name)

        if 'title' in kwargs:
            title = kwargs.pop('title')
        elif 't' in kwargs:
            title = kwargs.pop('t')
        else:
            title = ''

        kwargs['title'] = '{0} | {1}'.format(self.TITLE, title) if title else self.TITLE

        if pm.window(self._name, exists = True):
            pm.deleteUI(self._name)

        self._window = pm.window(self._name, *args, **kwargs)
开发者ID:jenosavel,项目名称:jhRigBuilder,代码行数:27,代码来源:gui.py


示例11: ui

def ui():
    columnWidth1st = 120

    if pm.window('AlembicMasterUI', q=True, exists=True) : pm.deleteUI('AlembicMasterUI')

    with pm.window('AlembicMasterUI',menuBar=True, s=True):
        with pm.columnLayout(adj=True):
            with pm.frameLayout( label='Export Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_TFG', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG', 0, 'Alembic (*.abc)'  ) )
                        
                    with pm.rowLayout(nc=2, adj=2 ):
                        startFrame=pm.animation.playbackOptions(q=1, minTime=1)
                        EndFrame=pm.animation.playbackOptions(q=1, maxTime=1)
                        
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Export',bgc=(0.19,0.29,0.19),c=pm.Callback(exportScene))
                        
                    pm.radioButtonGrp( 'timeRange_RBG', label='Time range :', 
                        labelArray3=['Camera Setting','Time Slider', 'Start/End'], 
                        numberOfRadioButtons=3, 
                        select=1, 
                        cw = [1,columnWidth1st],
                        on1=pm.Callback( callback_timerangeSelect, 1), 
                        on2=pm.Callback( callback_timerangeSelect, 2),
                        on3=pm.Callback( callback_timerangeSelect, 3),
                        )
                        
                    pm.floatFieldGrp( 'timeRange_FFG', label='Start / End : ', value1=1, value2=24, numberOfFields=2, cw = [1,117], en=False)
            
            with pm.frameLayout( label='Rebuild Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='New Scene', bgc=(0.24,0.49,0.24), c=pm.Callback(buildscene))
                    
            with pm.frameLayout( label='Import Alembic', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_ABC2', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_ABC2', 1, 'Alembic (*.abc)' ) )

                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Import', bgc=(0.19,0.19,0.28), c=pm.Callback(importAbcFile))
                        
            with pm.frameLayout( label='Save Scene', mw=3, mh=3,cll=True, bs='etchedIn'):
                with pm.columnLayout(adj=True):
                    with pm.rowLayout(nc=3, adj=2):
                        pm.text(label='file :', w=columnWidth1st, align='right')
                        pm.textField('path_TFG2', text="D:/")
                        pm.symbolButton( image='navButtonBrowse.png', c=pm.Callback( browseIt, 'path_TFG2', 0 ) )
                    with pm.rowLayout(nc=2, adj=2):
                        pm.text(l='',w=columnWidth1st)
                        pm.button(l='Save Scene', w=64, bgc=(0.22,0.23,0.43), c=pm.Callback(saveScene))
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:60,代码来源:AlembicMasterExporter_old.py


示例12: rebuild

    def rebuild(self):

        children = self._container.getChildArray()

        if children:
            for child in self._container.getChildArray():
                pm.deleteUI(child)

        self._fields = []

        with self._container:

            for index in range(self._attribute.numElements()):

                name = self._attribute[index].get()

                if not name:
                    continue

                self._fields.append(LinkField(
                    attribute = self._attribute[index],
                    *self._fieldArgs,
                    **self._fieldKwargs
                ))

            if not self._fields:
                pm.textField(text = '', editable = False, *self._fieldArgs, **self._fieldKwargs)
开发者ID:jenosavel,项目名称:jhRigBuilder,代码行数:27,代码来源:gui.py


示例13: gui

def gui():
    '''
    creates the gui for the tool
    '''
    win = 'uvtools'
    if(pm.window(win, ex = True)):
        pm.deleteUI(win)
        
    if(pm.windowPref(win, ex = True)):
        pm.windowPref(win, remove = True)
        
        
    global scroll_list, dyn_uis
        
    myWin = pm.window(win, title='Anim UV Tool' , sizeable = True, mnb = True, width = 500, height = 400, backgroundColor= [.68,.68,.68])
    pm.scrollLayout(width= 500)
    pm.button(label= 'Creates Nodes', command= create_nodes, width= 500)
    
    row_layout = pm.rowColumnLayout(numberOfColumns= 3, columnWidth= [[1, 150], [2, 10], [3, 340]])
    pm.columnLayout(adjustableColumn= False, width=150)
    scroll_list = pm.textScrollList(width= 150, height= 200, selectCommand= pm.Callback(create_ui))
    pm.button(label= 'List Nodes', command= list_nodes, width= 148)
    pm.setParent(row_layout)
   
    pm.text(label= '')

    dyn_uis = pm.columnLayout(adjustableColumn= False, width= 340)
    
    # listing the nodes at start up
    list_nodes()
    
    myWin.show()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:32,代码来源:AnimUVTool.py


示例14: __init__

    def __init__(self):
        self.window = 'sdkflip'
        self.title = 'ec Set Driven Key Utility'
        self.width_height = (312, 289)

        if py.window(self.window, exists=True):
            py.deleteUI(self.window)
        py.window(self.window, title=self.title, wh=self.width_height, sizeable=False)
        py.scrollLayout(horizontalScrollBarThickness=16, verticalScrollBarThickness=16)
        py.rowLayout("objRow", numberOfColumns=4, columnAlign2=("left", "right"), p="sdkflip")
        py.columnLayout("objCol", p="objRow")
        self.source_field = py.textField("sourceText", tx="Source Driver", p="objCol")
        py.columnLayout("objbutCol", p="objRow")
        py.button(label="<<", width=30, height=20, p="objbutCol", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_gui_fun, "sourcetxt"))
        py.columnLayout("tarCol", p="objRow")
        self.target_field = py.textField("targetText", tx="Target Driver", p="tarCol")
        py.columnLayout("tarbutCol", p="objRow")
        py.button(label="<<", width=30, height=20, p="tarbutCol", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_gui_fun, "targettxt"))
        py.frameLayout("scrollFrame", label="Driver Attributes", cll=False, borderStyle="etchedIn", p="sdkflip")
        py.rowLayout("scrollRow", p="scrollFrame")
        self.scroll_list = py.textScrollList("attrList", w=300, h=200, numberOfRows=8, allowMultiSelection=True, p="scrollRow")
        py.rowLayout("comRow", numberOfColumns=4, p="sdkflip")
        py.text("preText", l="Target Prefix", p="comRow")
        self.prefix_field = py.textField("prefixText", tx="rt", w=70, p="comRow")
        py.button(label="Mirror", width=80, height=30, p="comRow", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_sdk_flip, True))
        py.button(label="Copy", width=80, height=30, p="comRow", bgc=(0.8, 0.8, 0.8), command=py.Callback(self.ec_sdk_flip, False))

        py.showWindow(self.window)
开发者ID:coxevan,项目名称:tech_art_tools,代码行数:28,代码来源:ecSDKMirror.py


示例15: __init__

 def __init__(self):
     winName = 'SineRigWin333'
     if pm.window(winName, exists=1):
         pm.deleteUI(winName,window=1)
     win = pm.window(winName, t='SineRig')
     
     pm.columnLayout(adj=1)
     pm.text('X Axis should be joint chain aim axis.')
     # Control
     self.cnt_fld = pm.textFieldButtonGrp(l='Control',bl='Load')
     pm.textFieldButtonGrp( self.cnt_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.cnt_fld,e=1,text=pm.ls(sl=1)[0]) )
     
     # Name
     self.name_fld = pm.textFieldGrp(l='Name')
     
     # Base jnt
     self.base_fld = pm.textFieldButtonGrp(l='Base Joint',bl='Load')
     pm.textFieldButtonGrp( self.base_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.base_fld,e=1,text=pm.ls(sl=1)[0]) ) 
     
     # Tip jnt
     self.tip_fld = pm.textFieldButtonGrp(l='Tip Joint',bl='Load')
     pm.textFieldButtonGrp( self.tip_fld, e=1, bc=lambda: pm.textFieldButtonGrp(self.tip_fld,e=1,text=pm.ls(sl=1)[0]) )        
     
     # Create button
     pm.button(l="Create",c=self.createRig)
     
     ##### Development Aide
     pm.textFieldButtonGrp(self.cnt_fld,e=1,text='TopFin_Base_ctrlA')
     pm.textFieldGrp(self.name_fld,e=1,text='Fin')
     pm.textFieldButtonGrp(self.base_fld,e=1,text='TopFinA_jnt_1')        
     pm.textFieldButtonGrp(self.tip_fld,e=1,text='TopFinA_jnt_12')        
     
     pm.showWindow(win)
开发者ID:Mauricio3000,项目名称:MSH_Maya,代码行数:33,代码来源:SineRig_ui.py


示例16: ui

def ui():
    if pm.window(win, q=True, exists=True ): 
        pm.deleteUI(win)

    with pm.window(win, wh=[300,600], t=title):
        with pm.frameLayout( lv=False, cll=False, mw=1, mh=1):
            with pm.columnLayout(adj=True):
                with pm.tabLayout(tv=False):
                    with pm.frameLayout(lv=False, cll=False, mw=2, mh=2, bv=False):
                        with pm.rowLayout(nc=3, adj=2):
                            pm.image( image = shelfIcon )
                            pm.text(l=' %s'%title, fn='boldLabelFont', align='left')
                            pm.image( image = alfredIcon )

                pm.separator( h=8, style='in')
                
                with pm.frameLayout(lv=False, cll=False, mw=0, mh=0, bv=False):
                    with pm.frameLayout(lv=False, cll=False, mw=3, mh=3, bv=False):

    # Scene -----------------------
                        with pm.frameLayout(l='Scene', cll=True, mw=3, mh=3 ):
                            with pm.columnLayout(adj=True):

                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='Reference Editor 2 : ', align='right', w=150)
                                    pm.button(label='Open UI...', w=180, en=False )   

                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='File Traveler : ', align='right', w=150)
                                    pm.button(label='Open UI...', w=180, en=False ) 

    # Camera -----------------------
                        with pm.frameLayout(l='Camera', cll=True, mw=3, mh=3 ):
                            with pm.columnLayout(adj=True):

                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='Create Camera : ', align='right', w=150)
                                    with pm.columnLayout():
                                        pm.button(label='Create Turntable Camera', w=180, en=False )
                                        pm.button(label='Create Frustum Camera', w=180, en=False )
                                        pm.button(label='Create Stereo Camera', w=180, en=False )   

                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='Set Camera Playback Range : ', align='right', w=150)
                                    pm.button(label='set', c=pm.Callback( sm.setCamPlaybackRange ), w=180 )  
                                    
                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='HUD : ', align='right', w=150)
                                    pm.button(label='Scene Name HUD', w=180, en=False )

                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='Export Camera : ', align='right', w=150)
                                    pm.button(label='for After Effect...', w=180, en=False )
                                
    # Asset -----------------------
                        with pm.frameLayout(l='Asset', cll=True, mw=3, mh=3 ):
                            with pm.columnLayout(adj=True):
                                with pm.rowLayout( nc=10 ):
                                    pm.text(label='Toggle Display CharacterGeo : ', align='right', w=150)
                                    pm.button(label='( preview / render )', c=pm.Callback( sm.toggleDisplayCharacterGeo ), w=180 )
开发者ID:kyuhoChoi,项目名称:mayaTools,代码行数:60,代码来源:ui.py


示例17: __init__

    def __init__(self):
        """A GUI Class

        Args:
           args (None): Just in case...

        """
        self.name='aw_assimilator'
        self.width=200
        self.height=120
        self.title_blue_cl=[.1,.15,.2]
        self.close_red_cl=[0.5,0.2,0.2]
        self.go_green_cl=[.1,.4,.2]
        if pm.window(self.name, q=True, exists=True):
            pm.deleteUI(self.name)
        if pm.windowPref(self.name, ex=True):
            pm.windowPref(self.name, r=True)
        self.win = pm.window(self.name,widthHeight=(self.width, self.height),title=self.name)
        # Window creation 
        self.column_layout = pm.columnLayout(w=self.width)
        # Text Spacers!
        pm.text(l="\nSelect Source then Targets\n", fn='boldLabelFont', al='center', w=self.width, bgc=self.title_blue_cl)
        pm.text(l="", al='center')
        pm.text(l="Ready?", al='center', w=self.width)
        pm.text(l="", al='center', w=self.width)
        # Make a button and assign a command to it
        self.flow_layout=pm.flowLayout(w=self.width)
        pm.button('assimilateBtn',command=lambda *args: self.aw_assimilator(),label="Yes!", p=self.flow_layout, w=self.width/2, bgc=self.go_green_cl)
        pm.button('assimilateKillBtn',command=lambda *args: pm.deleteUI(self.name),label="Cancel", p=self.flow_layout, w=self.width/2-3, bgc=self.close_red_cl)
        self.win.show()
开发者ID:creuter23,项目名称:tools,代码行数:30,代码来源:aw_assimilator.py


示例18: UI

def UI():
	# find ui files
	ehm_uiPath = pm.internalVar( uad=True ) + 'scripts/ehm_tools/ui/'
	
	# delete window if exists
	if pm.window( 'offsetBlends.ui', q=True,  exists=True ):
		pm.deleteUI( 'offsetBlends.ui' )
	
	# load ui
	uiFile = pm.loadUI( uiFile = ehm_uiPath + 'offsetBlends.ui' )

	# connect base button
	pm.button( "ofb_selectBase_btn", edit=True, command = "offsetBlends.addToTextField('ofb_base_tf')" )

	# connect modified button
	pm.button( "ofb_selectModified_btn", edit=True, command = "offsetBlends.addToTextField('ofb_modified_tf')" )

	# connect  object to change buttons
	pm.button( "ofb_selectGeos_btn", edit=True, command = "offsetBlends.addToTextScroll('ofb_geos_tsl')" )

	# connect  apply change buttons
	pm.button( "ofb_apply_btn", edit=True, command = "offsetBlends.OffsetBlends()" )

	# show ui
	pm.showWindow( uiFile )
开发者ID:satishgoda,项目名称:EHM_tools,代码行数:25,代码来源:offsetBlends.py


示例19: __init__

 def __init__(self, path):
     
     self.path = path # the path to save the presets
     
     preset_win = 'preset_win'
     if pm.window(preset_win, exists= True):
         pm.deleteUI(preset_win)
         
     if pm.windowPref(preset_win, exists= True):
         pm.windowPref(preset_win, remove= True)
         
     temp_win = pm.window(preset_win, title= 'presets', width= 300,sizeable= False)
     
     pm.columnLayout(adjustableColumn= True)
     pm.text(label= '')
     
     pm.text(label= 'Preset Name')
     self.field = pm.textField()
     pm.text(label= '')
     pm.text(label= 'Description')
     pm.text(label= '')
     self.scroll = pm.scrollField(width= 300, wordWrap= True)
     pm.text(label= '')
     pm.button(label= 'Create Preset', command= pm.Callback(self.create_preset))
     pm.text(label= '')
     
     temp_win.show()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:27,代码来源:lights.py


示例20: gui

def gui():
    
    '''
    Main Interface
    '''
    win = "Layout"

    if pm.window(win, exists=True):
        pm.deleteUI(win, window=True)
    win = pm.window("Layout", w=300)
    main = pm.columnLayout()
    scroll = pm.scrollLayout(w=400, height=200)
    
    get_references()
    global asset_1, asset_2, asset_3
    asset_1 = Asset_Widget(scroll, 'trafficLight')
    asset_2 = Asset_Widget(scroll, 'mailBox1')
    asset_3 = Asset_Widget(scroll, 'mailBox2')
    
    '''
    asset_widget(scroll)
    asset_widget(scroll)
    asset_widget(scroll)
    asset_widget(scroll)
    '''
    
    win.show()
开发者ID:creuter23,项目名称:fs-tech-artist,代码行数:27,代码来源:SnyderAaron_layout_gen1.py



注:本文中的pymel.core.deleteUI函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python core.duplicate函数代码示例发布时间:2022-05-25
下一篇:
Python core.delete函数代码示例发布时间:2022-05-25
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap