Last active
January 4, 2017 07:53
-
-
Save mikebourbeauart/3c7aba2d0c288fa6b0c8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from PySide import QtCore, QtGui | |
from shiboken import wrapInstance | |
import maya.OpenMayaUI as mui | |
mainWin = wrapInstance(long(mui.MQtUtil.mainWindow()), QtGui.QWidget) | |
action = QtGui.QAction(mainWin) | |
action.setShortcut(QtGui.QKeySequence(QtCore.Qt.Key_Tab)) | |
action.setShortcutContext(QtCore.Qt.ApplicationShortcut) | |
def foo(): | |
import mb_pandora_master | |
reload(mb_pandora_master) | |
mb_pandora_master.run() | |
print "tabbed" | |
action.triggered.connect(foo) | |
mainWin.addAction(action) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment