当前位置: 首页>>代码示例>>Python>>正文


Python cmds.layout函数代码示例

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


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

示例1: updateLayoutEnabled

 def updateLayoutEnabled(self):
     '''
     updates UI enabled/disabled flag based on layer data availability
     '''
     enabled = LayerDataModel.getInstance().layerDataAvailable==True
     cmds.layout(self.cmdLayout.innerLayout,e=True,enable=enabled)
     cmds.layout(self.cmdLayout.buttonForm,e=True,enable=enabled)
开发者ID:BigMacchia,项目名称:ngSkinTools,代码行数:7,代码来源:initTransferWindow.py

示例2: updateLayoutEnabled

 def updateLayoutEnabled(self):
     '''
     updates UI enabled/disabled flag based on layer data availability
     '''
     enabled = self.dataModel.isEnabled()
     cmds.layout(self.cmdLayout.innerLayout,e=True,enable=enabled)
     cmds.layout(self.cmdLayout.buttonForm,e=True,enable=enabled)
开发者ID:leandropim,项目名称:Tapp,代码行数:7,代码来源:initTransferWindow.py

示例3: changePrefix

 def changePrefix(s, element, text):
     text = text.strip().title()
     if text and 2 < len(text) < 30 and "@" not in text:
         cmds.layout(element, e=True, bgc=(0.3,1,0.3))
         s.data["pref"] = text
         s.save()
     else:
         cmds.control(element, e=True, bgc=(1,0.4,0.4))
开发者ID:internetimagery,项目名称:gameAnimExport,代码行数:8,代码来源:__init__.py

示例4: closeTodo

 def closeTodo():  # Animate todo closed. Fancy.
     if cmds.layout(gui, ex=True):
         height = cmds.layout(gui, q=True, h=True)
         for i in range(20):
             i = (100 - i*5) / 100.0
             cmds.layout(gui, e=True, h=height * i)
             cmds.refresh()
             time.sleep(0.01)
     s._buidTodoTasks()
开发者ID:internetimagery,项目名称:todo,代码行数:9,代码来源:Original.__init__.py

示例5: __init__

    def __init__(self):      
        if mc.layout(self.layoutname, query=True, exists=True) == True:
            mc.deleteUI(self.layoutname, lay=True)
        if mc.layout(self.layoutname, query=True, exists=True) != True:
            self.windowName = mc.loadUI(f=self._UI_File)
            mc.showWindow(self.windowName)

            allowedAreas = ['right', 'left']
            self.layout=mc.dockControl(area='right', content=self.windowName, l='SP_2012', w=390, h=490, allowedArea=allowedAreas)
            self.layoutname=mc.dockControl(self.layout,q=1,fpn=1)
开发者ID:wildparky,项目名称:spielenPipeline,代码行数:10,代码来源:model.py

示例6: createUI

    def createUI( self, win, index):
# min/max of the attr need to be set correcty, not yet
		win.cRange.append( mc.floatSliderGrp( label=self.niceName, fieldStep=.1, precision=3, field=True, min=0, fieldMinValue=-1000000, max=5, fieldMaxValue=1000000, cc='bt_randomizer.updateChannel( ' + str(index) + ', 1)', dc='bt_randomizer.updateChannel( ' + str(index) + ', 0)' ))
# Offset - then modify the stepping of the float field
		win.cOffset.append( mc.floatFieldGrp( label='Offset', precision=3, numberOfFields=1, value1=0, cc='bt_randomizer.updateChannel( ' + str(index) + ', 1)', dc='bt_randomizer.updateChannel( ' + str(index) + ', 0)' ))
		mc.floatField( (win.cOffset[-1] + '|' + mc.layout( win.cOffset[-1], q=1, ca=1)[1]), e=1, step=.1)
# Step - then modify the stepping of the float field
		win.cStep.append( mc.floatFieldGrp( label='Step', precision=3, numberOfFields=1, value1=0, cc='bt_randomizer.updateChannel( ' + str(index) + ', 1)', dc='bt_randomizer.updateChannel( ' + str(index) + ', 0)' ))
		mc.floatField( (win.cStep[-1] + '|' + mc.layout( win.cStep[-1], q=1, ca=1)[1]), e=1, step=.1)
		mc.separator( style="in", h=20)
开发者ID:cyrillef,项目名称:apps.exchange.packager,代码行数:10,代码来源:bt_randomizer.py

示例7: filterListByType

	def filterListByType(self, nodeType):
		if len(self.itemList) > 0:
			for item in self.itemList:
				classification = []
				classification.append(item.nodeType)
				classification.extend(cmds.getClassification(item.nodeType))
				clsStr = '|'.join(classification)
				if nodeType in clsStr:
					cmds.layout(item.listItemLayoutId, edit = 1, manage = 1)
				else:
					cmds.layout(item.listItemLayoutId, edit = 1, manage = 0)
开发者ID:Blackpepperjam,项目名称:blackpepperjam,代码行数:11,代码来源:bpj_shaderAndTextureLister.py

示例8: _GUI_Delete

 def _GUI_Delete(s):
     """
     Overriding deletion for a fancy removal animation.
     """
     if cmds.layout(s._root, ex=True):
         height = cmds.layout(s._root, q=True, h=True)
         for i in range(20):
             i = (100 - i*5) / 100.0
             cmds.layout(s._root, e=True, h=height * i)
             cmds.refresh()
             time.sleep(0.01)
         element.MayaElement._GUI_Delete(s)
开发者ID:internetimagery,项目名称:todo,代码行数:12,代码来源:todo.py

示例9: show

 def show(cls, menu_type, menu_name, preferences, **kwargs):
     """create marking menu"""
     cls.hide(kwargs["b"])
     if not menu_name:
         return
     if menu_type == cls.MEL:
         cls._mel(menu_name, p=cmds.layout(cmds.getPanel(up=True), q=True, p=True), aob=True, mm=True, **kwargs)
     elif menu_type == cls.PYTHON:
         cls._python(menu_name, p=cmds.layout(cmds.getPanel(up=True), q=True, p=True), aob=True, mm=True, **kwargs)
     else:
         cls._preset(menu_name, preferences, p=cmds.layout(cmds.getPanel(up=True), q=True, p=True), aob=True,
                     mm=True, **kwargs)
开发者ID:DavideAlidosi,项目名称:May9,代码行数:12,代码来源:Engine.py

示例10: sample

def sample(strYaya,*agre):
    cmds.deleteUI('layout_'+strYaya.split('saww')[1])
    
    main_column_num = cmds.layout('main_layout',q=True,numberOfChildren=True)
    for d in range(main_column_num):
        rowlayoutNum = cmds.rowLayout('sadw'+str(d),q=True,numberOfChildren=True)
        if rowlayoutNum<12 or rowlayoutNum>0:
            for i in range(12 - int(rowlayoutNum)):
                try:
                    layPos = cmds.layout('sadw'+str(int(d)+1),q=True,childArray=True)
                    cmds.columnLayout(layPos[0] ,e=True,parent='sadw'+str(d)) 
                except:
                    pass
开发者ID:PertyCoy,项目名称:programming,代码行数:13,代码来源:sim_flowLayout.py

示例11: delete

 def delete(s):
     # Delete itself
     with warn:
         ans = cmds.confirmDialog(
             t=s.i18n["clips.deleteClip"],
             m=s.i18n["clips.deleteConfirm"],
             button=[s.i18n["yes"], s.i18n["no"]],
             defaultButton=s.i18n["yes"],
             cancelButton=s.i18n["no"],
             dismissString=s.i18n["no"]
             )
         if ans == s.i18n["yes"]: # Are we ok to delete??
             s.char.removeClip(s.clip)
             cmds.layout(s.wrapper, e=True, m=False)
开发者ID:internetimagery,项目名称:clipStore,代码行数:14,代码来源:clips.py

示例12: updateToTool

    def updateToTool(self):
        '''
        update controls to current tool
        '''
        isPainting = self.isPainting()
        cmds.control(self.cmdLayout.innerLayout,e=True,enable=isPainting)
        cmds.button(self.cmdLayout.buttons[1],e=True,label="Flood" if isPainting else "Paint")

        if (isPainting):        
            self.controls.brushRadiusSlider.setValue(cmds.artUserPaintCtx(self.TOOL_PAINT,q=True,radius=True))
        self.controls.brushRadiusSlider.setEnabled(isPainting)
        
        layersAvailable = LayerDataModel.getInstance().layerDataAvailable
        cmds.layout(self.cmdLayout.buttonForm,e=True,enable=layersAvailable)
开发者ID:leandropim,项目名称:Tapp,代码行数:14,代码来源:tabPaint.py

示例13: updatePlaneMode

 def updatePlaneMode(self, planeMode, unused):        
     if(self.currentPlaneMode == planeMode):
         return
     
     #hide advanced options UI
     if(self.currentPlaneMode is not None and self.currentPlaneMode.advancedSettingsUI is not None):
         cmds.layout(self.currentPlaneMode.advancedSettingsUI, edit=True, visible=False)
     
     self.currentPlaneMode = planeMode
     
     #show advanced options UI
     if(self.currentPlaneMode.advancedSettingsUI is not None):
         cmds.layout(self.currentPlaneMode.advancedSettingsUI, edit=True, visible=True)
         
     self.updatePreviewPlane()
开发者ID:ill,项目名称:CoplanarJointOrient,代码行数:15,代码来源:CoplanarJointOrient.py

示例14: startUp

def startUp():
	print( '########## mayaWrangler >>>>>>>>>>>>>>>>>>>>>>>>' )
	# todo embedd in interface:
	wantSecondsCurrentTimeField = 1
	wantCurrentTimeFieldInt = 1
	wantCurrentTimeToMinMaxPopup = 1
	wantTweakGraphEditPopup = 1
	wantShelfSwitcherMM = 1

	if not m.layout( lyout, ex=1 ):
		raise IOError, 'timeSlider layout: ' + lyout + ' does not exist (yet)! :/'
	print ('check! layout: ' + str(lyout) + ' exists!')
	if not m.control( currTimeField, ex=1 ):
		raise IOError, 'currTimeField: ' + currTimeField + ' does not exist (yet)! :/'
	print ('check! currTimeField: ' + str(currTimeField) + ' exists!')

	if wantSecondsCurrentTimeField:
		createSecondsCurrentTimeField()
	if wantCurrentTimeFieldInt:
		makeCurrentTimeFieldInt()
	if wantCurrentTimeToMinMaxPopup:
		addCurrentTimeToMinMaxPopup()
	if wantTweakGraphEditPopup:
		createTweakGraphEditPopup()
	if wantShelfSwitcherMM:
		import shelfSwitcher
		shelfSwitcher.build()
	print( '########## mayaWrangler <<<<<<<<<<<<<<<<<<<<<<<<<' )
开发者ID:ewerybody,项目名称:melDrop,代码行数:28,代码来源:mayaWranglerUI.py

示例15: __init__

    def __init__(self):
        MPx.MPxCommand.__init__( self )

        #add env variable for maya scripts path
        CSIDL_PERSONAL = 5       # My Documents
        SHGFP_TYPE_CURRENT = 1   # Get current, not default value

        docs = ctypes.create_unicode_buffer(ctypes.wintypes.MAX_PATH)
        ctypes.windll.shell32.SHGetFolderPathW(None, CSIDL_PERSONAL, None, SHGFP_TYPE_CURRENT, docs)

        mayaENVfile = docs.value + "/maya/2016/Maya.env"

        os.chmod( mayaENVfile, 0o664 )
        mayaEnv = open( mayaENVfile, 'a' )
        mayaEnvR = open( mayaENVfile, 'r' )

        readEnv = mayaEnvR.readlines()
        lineSet = set(readEnv)

        newline = "MAYA_MODULE_PATH= C:\Program Files\Autodesk\Maya2016\plugin-ins\CGassetManager"
        newlineSpaces = "\n\nMAYA_MODULE_PATH= C:\Program Files\Autodesk\Maya2016\plugin-ins\CGassetManager"

        if not newline in lineSet:
            mayaEnv.writelines(newlineSpaces)

        mayaEnv.close()
        mayaEnvR.close()

        #rehash the maya script cache
        mel.eval( "rehash;" )

        if cmds.layout( "PM_plugins", exists=True ):
            pass
        else:
            mel.eval( "loadNewShelf \"shelf_PM_plugins\";" )
开发者ID:jorge3186,项目名称:CG_Asset_Manager,代码行数:35,代码来源:CG_Asset_Manager.py


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