#----------------------------------------
from PyQt4 import QtGui, QtCore, uic
import platform, sys, random
import maya.cmds as cmds
os = platform.system()
if os == "Windows":
uiFile = 'path_to_ui'
else:
uiFile = 'path_to_ui'
form_class, base_class = uic.loadUiType(uiFile)
class textureReleaseUI(form_class, base_class):
def __init__(self, parent=mui.getMayaWindow()):
super(textureReleaseUI, self).__init__(parent)
self.setupUi( self )
self.initUI()
def initUI(self):
pixmap = QtGui.QPixmap("Y:\dev\python\mnmModelToolsHeader.jpg")
self.header.setPixmap(pixmap)
self.connectSignals()
def connectSignals(self):
self.connect(self.orient_btn, QtCore.SIGNAL('pressed()'), orientTip)
self.connect(self.clean_btn, QtCore.SIGNAL('pressed()'), main)
self.connect(self.rename_btn, QtCore.SIGNAL('pressed()'), checkNaming)
self.connect(self.none_btn, QtCore.SIGNAL('pressed()'), printLines)
def runUI():
#global app
global win
#app=QtGui.QApplication(sys.argv)
win = textureReleaseUI()
win.show()
#sys.exit(app.exec_())
runUI()
--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To post to this group, send email to python_in...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
class textureReleaseUI(form_class, base_class):
def __init__(self, parent=mui.getMayaWindow()):
super(textureReleaseUI, self).__init__(parent)
self.setupUi( self )
self.initUI()
def initUI(self):
self.header = QtGui.QLabel(self.centralwidget)
self.header.setGeometry(QtCore.QRect(0,-5,500,81))
self.header.setPixmap(QtGui.QPixmap('\mnmModelToolsHeader.jpg'))
self.header.setObjectName('header')
self.setCentralWidget(self.centralwidget)
self.connectSignals()
def connectSignals(self):
self.connect(self.orient_btn, QtCore.SIGNAL('pressed()'), orientTip)
self.connect(self.clean_btn, QtCore.SIGNAL('pressed()'), main)
self.connect(self.rename_btn, QtCore.SIGNAL('pressed()'), checkNaming)
self.connect(self.none_btn, QtCore.SIGNAL('pressed()'), printLines)
Thank you very much for the help!
Salvador