We all know that wen can get the main Maya window with $gMainWindow.
print $gMainWindow; //MayaWindow
因为Maya2011 和 Maya2012是使用Qt编写的界面,所以我们可十分轻松的获取Maya的主窗口。
Because the UI of Maya2011 and Maya2012 was based on Qt, os we can super easy to get the main window.
#from PyQt4 import QtGui from PySide import QtGui for widget in QtGui.qApp.allWidgets(): print widget.objectName()
引用
......
qt_scrollarea_viewport
selectedDispLayer
ShadedBtn
iconTextCheckBox4
formLayout20
tabLayout2
MayaWindow
qt_dockwidget_floatbutton
HotboxEast2
formLayout5
popupMenu48
selectButton3
objPickMenuIcon
......
qt_scrollarea_viewport
selectedDispLayer
ShadedBtn
iconTextCheckBox4
formLayout20
tabLayout2
MayaWindow
qt_dockwidget_floatbutton
HotboxEast2
formLayout5
popupMenu48
selectButton3
objPickMenuIcon
......