launchformaya.py 文件源码

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

项目:scriptsmenu 作者: Colorbleed 项目源码 文件源码
def to_shelf(action):
    """
    Copy clicked menu item to the currently active Maya shelf 

    :param action: the action instance which is clicked
    :type action: QtGui.QAction

    :return: None
    """

    shelftoplevel = mel.eval("$gShelfTopLevel = $gShelfTopLevel;")
    current_active_shelf = cmds.tabLayout(shelftoplevel,
                                          query=True,
                                          selectTab=True)

    cmds.shelfButton(command=action.process_command(),
                     sourceType="python",
                     parent=current_active_shelf,
                     image=action.iconfile or "pythonFamily.png",
                     annotation=action.statusTip(),
                     imageOverlayLabel=action.label or "")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号