I have a gui from qtdesigner in maya with a ListBox(item) in the gui. I want the objects in the scene to be listed in the gui window.
Take a look at my code. the list of Water and Fire open up in a new window, and the print ListObjects command lists the objects in the scene in the script editor.
How do I get the objects to list in the new window AND THEN, how do I get the list to populate in the designated gui window. (I also have a 'refresh' button for the gui list, any
help there would be appreciated as well.
- Code: Select all
import maya.cmds as cmds
import maya.mel as mel
listObjects = cmds.ls(g=True, cameras=True, lights=True)
cmds.textScrollList(numberOfRows=8, allowMultiSelection=True, append=['Fire', 'Water'])