__init__.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:mayakit 作者: danbradham 项目源码 文件源码
def create_shelf():
    '''Create the bns shelf'''

    tab_layout = mel.eval('$pytmp=$gShelfTopLevel')
    shelf_exists = cmds.shelfLayout(SHELF_NAME, exists=True)

    if shelf_exists:
        cmds.deleteUI(SHELF_NAME, layout=True)

    shelf = cmds.shelfLayout(SHELF_NAME, parent=tab_layout)

    for button, kwargs in SHELF_BUTTONS.items():

        try:
            img = QtGui.QImage(kwargs['image'])
            kwargs['width'] = img.width()
            kwargs['height'] = img.height()

            cmds.shelfButton(label=button, parent=shelf, **kwargs)
        except:
            print button + ' failed...'
            print kwargs
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号