I am trying to get the selection that was listed in the qMenu and based on
the user selection from the qMenu - camSelBtn, it will display the
selection into a qLineEdit - currentCamTxt
However while I am able to get the menu working, the grabbing of text of
the selection is not working.
def camMenu(self):
allCams = cmds.ls(type='camera', visible = 1)
camLs = cmds.listRelatives(allCams, p=1)
menu = QMenu("menu", self.camSelBtn)
for n in camLs:
menu.addAction(QAction(n, menu))
self.camSelBtn.setMenu(menu)
def createConnections(self):
self.connect(self.setCameraBtn, SIGNAL('clicked()'), self.setCamera)
def setCamera(self):
for sel in self.camMenu.menu():
self.currentCamTxt.setText()
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/2c9cdcc9-9263-4b8b-a7ce-47fbe9004cff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.