0

I am trying to create a UI that creates pop up menu items from a list. I've been about to do this with just a normal radial button set up:

Cams = cmds.listCameras(p=True)
PBCamera = cmds.radioCollection()

cmds.button(l="go", c=partial(btnCmd,PBCamera))
for i in Cams:
    btnName = str(i)
    RCam = cmds.radioButton( btnName, label=btnName)
    PBCamera = cmds.radioCollection( PBCamera, edit=True)


def btnCmd(name,*arg):
    radioCol = cmds.radioCollection(PBCamera, query=True, sl=True)
    getSelectRadioVal = cmds.radioButton(radioCol, query=True, label=True)
    print getSelectRadioVal

The problem I am having is when I try to switch it over to cmds.menuItem() a number of errors happen. Wondering the best way to create a pop up menu from list.

Chanda Korat
  • 2,453
  • 2
  • 19
  • 23
Adam Baker
  • 44
  • 8

0 Answers0