def toQtObject(mayaName):
"""
Convert a Maya ui path to a Qt object
@param mayaName: Maya UI Path to convert (Ex: "scriptEditorPanel1Window|TearOffPane|scriptEditorPanel1|testButton" )
@return: PyQt representation of that object
"""
ptr = apiUI.MQtUtil.findControl(mayaName)
if ptr is None:
ptr = apiUI.MQtUtil.findLayout(mayaName)
if ptr is None:
ptr = apiUI.MQtUtil.findMenuItem(mayaName)
if ptr is not None:
return sip.wrapinstance(long(ptr), QtCore.QObject)
评论列表
文章目录