lightManager2016Below.py 文件源码

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

项目:PythonForMayaSamples 作者: dgovil 项目源码 文件源码
def getMayaMainWindow():
    """
    Since Maya is Qt, we can parent our UIs to it.
    This means that we don't have to manage our UI and can leave it to Maya.

    Returns:
        QtWidgets.QMainWindow: The Maya MainWindow
    """
    # We use the OpenMayaUI API to get a reference to Maya's MainWindow
    win = omui.MQtUtil_mainWindow()
    # Then we can use the wrapInstance method to convert it to something python can understand
    # In this case, we're converting it to a QMainWindow
    ptr = wrapInstance(long(win), QtWidgets.QMainWindow)
    # Finally we return this to whoever wants it
    return ptr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号