This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| from PySide.QtCore import * | |
| from PySide.QtGui import * | |
| class xxxx(QListWidget): | |
| def __init__(self, parent=None): | |
| super(xxxx, self).__init__(parent) | |
| self.installEventFilter(self) | |
| # def paintEvent(self, event): |
This file contains hidden or 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
| import os | |
| import sys | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtGui import * | |
| from PyQt4 import uic | |
| import socket | |
| class MyWindow(QDialog): |
This file contains hidden or 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
| import maya.OpenMaya as om | |
| import maya.cmds as mc | |
| from PyQt4 import QtCore, QtGui | |
| callbacks = [] | |
| def do_something(*args): | |
| if QtGui.qApp.mouseButtons()==QtCore.Qt.MidButton: | |
| print "anything",mc.currentTime(q=1) |
This file contains hidden or 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 random import randint | |
| from time import sleep | |
| import os | |
| def slow_func( ): | |
| print 'in slow_func, start processing: %s' % os.environ['SHOT'] | |
| sleep(randint(2,7)) | |
| print 'in slow_func, done processing: %s' % os.environ['SHOT'] |
This file contains hidden or 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
| #!/usr/bin/env python2 | |
| import os | |
| import sys | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtGui import * | |
| from PyQt4 import uic | |
| import signal | |
| signal.signal(signal.SIGINT, signal.SIG_DFL) |
This file contains hidden or 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
| import maya.cmds as cmds | |
| import maya.mel as mel | |
| import maya.utils as mutils | |
| import maya.OpenMayaUI as apiUI | |
| from PyQt4 import QtGui, QtCore | |
| import sip | |
| import time | |
| import sys | |
| from PyQt4.QtCore import * |
This file contains hidden or 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
| import maya.cmds as cmds | |
| import maya.utils as mutils | |
| import maya.OpenMayaUI as apiUI | |
| from PyQt4 import QtGui, QtCore | |
| import sip | |
| from PyQt4.QtCore import * | |
| from PyQt4.QtGui import * | |
| def toQtObject(mayaName): |
This file contains hidden or 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
| import maya.cmds as cmds | |
| import maya.utils as mutils | |
| def AEaddImgBrowserModule( plug, uiLabel, annot): | |
| cmds.rowLayout( nc=3 ) | |
| cmds.text(l=uiLabel) | |
| p=cmds.textField('imagePathField') | |
| cmds.symbolButton('browser',i="navButtonBrowse.png" ) |