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


Python cmds.frameLayout方法代码示例

本文整理汇总了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) 
开发者ID:morganloomis,项目名称:ml_tools,代码行数:20,代码来源:ml_utilities.py

示例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) 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:16,代码来源:dpFacialControl.py

示例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. 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:10,代码来源:dpBaseClass.py

示例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() 
开发者ID:nilouco,项目名称:dpAutoRigSystem,代码行数:49,代码来源:dpAutoRig.py

示例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) 
开发者ID:bumpybox,项目名称:pyblish-bumpybox,代码行数:52,代码来源:capture.py


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