本文整理匯總了Python中maya.cmds.frameLayout方法的典型用法代碼示例。如果您正苦於以下問題:Python cmds.frameLayout方法的具體用法?Python cmds.frameLayout怎麽用?Python cmds.frameLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類maya.cmds
的用法示例。
在下文中一共展示了cmds.frameLayout方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: finish
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import frameLayout [as 別名]
def finish(self):
'''
Finalize the UI
'''
mc.setParent(self.form)
frame = mc.frameLayout(labelVisible=False)
mc.helpLine()
mc.formLayout( self.form, edit=True,
attachForm=((self.column, 'top', 0), (self.column, 'left', 0),
(self.column, 'right', 0), (frame, 'left', 0),
(frame, 'bottom', 0), (frame, 'right', 0)),
attachNone=((self.column, 'bottom'), (frame, 'top')) )
mc.showWindow(self.name)
mc.window(self.name, edit=True, width=self.width, height=self.height)
示例2: dpChangeType
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import frameLayout [as 別名]
def dpChangeType(self, *args):
""" Get and return the user selected type of controls.
Change interface to be more clear.
"""
typeSelectedRadioButton = cmds.radioCollection(self.typeCollection, query=True, select=True)
self.userType = cmds.radioButton(typeSelectedRadioButton, query=True, annotation=True)
if self.userType == TYPE_BS:
cmds.frameLayout(self.bsLayout, edit=True, enable=True, collapse=False)
cmds.frameLayout(self.jointsLayout, edit=True, enable=False, collapse=True)
cmds.checkBox(self.eyelidCB, edit=True, enable=True)
elif self.userType == TYPE_JOINTS:
cmds.frameLayout(self.bsLayout, edit=True, enable=False, collapse=True)
cmds.frameLayout(self.jointsLayout, edit=True, enable=True, collapse=False)
cmds.checkBox(self.eyelidCB, edit=True, enable=False)
示例3: createModuleLayout
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import frameLayout [as 別名]
def createModuleLayout(self, *args):
""" Create the Module Layout, so it will exists in the right as a new options to editModules.
"""
# MODULE LAYOUT:
self.moduleLayout = self.langDic[self.langName][self.title]+" - "+self.userGuideName
self.moduleFrameLayout = cmds.frameLayout(self.moduleLayout , label=self.moduleLayout, collapsable=True, collapse=False, parent="modulesLayoutA")
self.topColumn = cmds.columnLayout(self.moduleLayout+"_TopColumn", adjustableColumn=True, parent=self.moduleFrameLayout)
# here we have just the column layouts to be populated by modules.
示例4: jobSelectedGuide
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import frameLayout [as 別名]
def jobSelectedGuide(self):
""" This scriptJob read if the selected item in the scene is a guideModule and reload the UI.
"""
# run the UI part:
selectedGuideNodeList = []
selectedList = []
# get selected items:
selectedList = cmds.ls(selection=True, long=True)
if selectedList:
updatedGuideNodeList = []
needUpdateSelect = False
for selectedItem in selectedList:
if cmds.objExists(selectedItem+"."+GUIDE_BASE_ATTR) and cmds.getAttr(selectedItem+"."+GUIDE_BASE_ATTR) == 1:
if not ":" in selectedItem[selectedItem.rfind("|"):]:
newGuide = self.setupDuplicatedGuide(selectedItem)
updatedGuideNodeList.append(newGuide)
needUpdateSelect = True
else:
selectedGuideNodeList.append(selectedItem)
if needUpdateSelect:
self.jobReloadUI()
cmds.select(updatedGuideNodeList)
# re-create module layout:
if selectedGuideNodeList:
for moduleInstance in self.moduleInstancesList:
cmds.button(moduleInstance.selectButton, edit=True, label=" ", backgroundColor=(0.5, 0.5, 0.5))
for selectedGuide in selectedGuideNodeList:
selectedGuideInfo = cmds.getAttr(selectedGuide+"."+MODULE_INSTANCE_INFO_ATTR)
if selectedGuideInfo == str(moduleInstance):
moduleInstance.reCreateEditSelectedModuleLayout(bSelect=False)
# delete module layout:
else:
try:
cmds.frameLayout('editSelectedModuleLayoutA', edit=True, label=self.langDic[self.langName]['i011_selectedModule'])
cmds.deleteUI("selectedColumn")
for moduleInstance in self.moduleInstancesList:
cmds.button(moduleInstance.selectButton, edit=True, label=" ", backgroundColor=(0.5, 0.5, 0.5))
except:
pass
# re-select items:
#if selectedList:
# cmds.select(selectedList)
# call reload the geometries in skin UI:
self.reloadPopulatedGeoms()
示例5: _independent_panel
# 需要導入模塊: from maya import cmds [as 別名]
# 或者: from maya.cmds import frameLayout [as 別名]
def _independent_panel(width, height, off_screen=False):
"""Create capture-window context without decorations
Arguments:
width (int): Width of panel
height (int): Height of panel
Example:
>>> with _independent_panel(800, 600):
... cmds.capture()
"""
# center panel on screen
screen_width, screen_height = _get_screen_size()
topLeft = [int((screen_height-height)/2.0),
int((screen_width-width)/2.0)]
window = cmds.window(width=width,
height=height,
topLeftCorner=topLeft,
menuBarVisible=False,
titleBar=False,
visible=not off_screen)
cmds.paneLayout()
panel = cmds.modelPanel(menuBarVisible=False,
label='CapturePanel')
# Hide icons under panel menus
bar_layout = cmds.modelPanel(panel, q=True, barLayout=True)
cmds.frameLayout(bar_layout, edit=True, collapse=True)
if not off_screen:
cmds.showWindow(window)
# Set the modelEditor of the modelPanel as the active view so it takes
# the playback focus. Does seem redundant with the `refresh` added in.
editor = cmds.modelPanel(panel, query=True, modelEditor=True)
cmds.modelEditor(editor, edit=True, activeView=True)
# Force a draw refresh of Maya so it keeps focus on the new panel
# This focus is required to force preview playback in the independent panel
cmds.refresh(force=True)
try:
yield panel
finally:
# Delete the panel to fix memory leak (about 5 mb per capture)
cmds.deleteUI(panel, panel=True)
cmds.deleteUI(window)