How does this look import PySide.QtGui import pymel.core as pm from maya import OpenMayaUI as omui import shiboken from PysideCode.scroller.uiCode import scrollerUI from PySide import QtGui, QtCore from PySide.QtGui import QWidget
pointer = omui.MQtUtil.mainWindow() mayaMainWindow = shiboken.wrapInstance(long(pointer), QWidget) class mainWindow(PySide.QtGui.QMainWindow, scrollerUI.Ui_MainWindow): def __init__(self, parent=mayaMainWindow): super(mainWindow, self).__init__(parent) self.setupUi(self) #connections #self.pushButton.clicked.connect(self.reList) self.listView.clicked.connect(self.selectionHandler) self.lineEdit.textChanged.connect(self.filterHandler) self.statusbar.showMessage('You selected it') for node in pm.selected(): item = QtGui.QStandardItem() item.setText(str(node)) item.setData(node.longName()) self.model.appendRow(item) def selectionHandler(self, index): index = self.proxy.mapToSource(index) item = self.model.itemFromIndex(index) pm.select(item.data()) def filterHandler(self): regex = '.*{}.*'.format(self._lineedit.text().replace(' ', '.*')) self.proxy.setFilterRegExp(regex) self.proxy.invalidateFilter() if __name__ == "__main__": global win try: win.close() win.deleteLater() except: pass win = mainWindow() win.show() -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/438c7579-25cc-4f63-9eec-e0c1008a322e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.